Adopt is/toHTMLMapElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118235

Reviewed by Andreas Kling.

To enhance readability, this patch adopts is/toHTMLMapElement.
This also helps out to reduce duplicated use of static_cast.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::getDocumentLinks):
(WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesMapName):
(WebCore::keyMatchesLowercasedMapName):
* dom/TreeScope.cpp:
(WebCore::TreeScope::getImageMap):
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::imageElement):
* html/HTMLMapElement.h:
(WebCore::isHTMLMapElement):
(WebCore::toHTMLMapElement):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152387 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: Items the img aria role aren't inserting an object replacement character
https://bugs.webkit.org/show_bug.cgi?id=118259

Source/WebCore: 

Reviewed by Tim Horton.

VoiceOver relies on object replacement characters being emitted when asking for selected text.
This has worked if a real <img> is used, but if role="img" is used on a <div>, for example,
no emission is performed, which leads to missed elements in text.

Test: platform/mac/accessibility/aria-image-emits-object-replacement.html

* editing/TextIterator.cpp:
(WebCore::isRendererReplacedElement):
(WebCore::TextIterator::advance):

LayoutTests: 

Reviewed by Reviewed by Tim Horton.

* accessibility/non-native-image-crash-expected.txt:
* platform/mac/accessibility/aria-image-emits-object-replacement-expected.txt: Added.
* platform/mac/accessibility/aria-image-emits-object-replacement.html: Added.
* platform/mac/accessibility/img-fallsback-to-title-expected.txt:
     Update expected tests where role="img" now emits replacement character.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152388 268f45cc-cd09-0410-ab3c-d52691b4dbfc