Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Unified Diff: Source/core/accessibility/AccessibilityRenderObject.cpp

Issue 18251004: Introduce isHTMLAreaElement and toHTMLAreaElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/accessibility/AXObjectCache.cpp ('k') | Source/core/html/HTMLAreaElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
« no previous file with comments | « Source/core/accessibility/AXObjectCache.cpp ('k') | Source/core/html/HTMLAreaElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698