Index: Source/core/accessibility/AccessibilityRenderObject.cpp |
diff --git a/Source/core/accessibility/AccessibilityRenderObject.cpp b/Source/core/accessibility/AccessibilityRenderObject.cpp |
index cdb352cf720390a5def41f561ce40d88327fa9e5..bd9806d5bb3d2431cba9b7f380fbe714393c7555 100644 |
--- a/Source/core/accessibility/AccessibilityRenderObject.cpp |
+++ b/Source/core/accessibility/AccessibilityRenderObject.cpp |
@@ -1397,8 +1397,8 @@ AccessibilityObject* AccessibilityRenderObject::accessibilityHitTest(const IntPo |
return 0; |
Node* node = hitTestResult.innerNode()->deprecatedShadowAncestorNode(); |
- if (node->hasTagName(areaTag)) |
- return accessibilityImageMapHitTest(static_cast<HTMLAreaElement*>(node), point); |
+ if (isHTMLAreaElement(node)) |
+ return accessibilityImageMapHitTest(toHTMLAreaElement(node), point); |
if (node->hasTagName(optionTag)) |
node = toHTMLOptionElement(node)->ownerSelectElement(); |
@@ -2351,9 +2351,9 @@ void AccessibilityRenderObject::addImageMapChildren() |
for (Element* current = ElementTraversal::firstWithin(map); current; current = ElementTraversal::next(current, map)) { |
// add an <area> element for this child if it has a link |
- if (current->hasTagName(areaTag) && current->isLink()) { |
+ if (isHTMLAreaElement(current) && current->isLink()) { |
AccessibilityImageMapLink* areaObject = static_cast<AccessibilityImageMapLink*>(axObjectCache()->getOrCreate(ImageMapLinkRole)); |
- areaObject->setHTMLAreaElement(static_cast<HTMLAreaElement*>(current)); |
+ areaObject->setHTMLAreaElement(toHTMLAreaElement(current)); |
areaObject->setHTMLMapElement(map); |
areaObject->setParent(this); |
if (!areaObject->accessibilityIsIgnored()) |