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

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

Issue 18888002: Introduce isHTMLAnchorElement and toHTMLAnchorElement (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
Index: Source/core/accessibility/AccessibilityNodeObject.cpp
diff --git a/Source/core/accessibility/AccessibilityNodeObject.cpp b/Source/core/accessibility/AccessibilityNodeObject.cpp
index 5a19c00731087a4125aea8e594aa325ebcf7321b..5f5ba91c626143af94a7682236c33295c465a8ab 100644
--- a/Source/core/accessibility/AccessibilityNodeObject.cpp
+++ b/Source/core/accessibility/AccessibilityNodeObject.cpp
@@ -33,6 +33,7 @@
#include "core/dom/NodeTraversal.h"
#include "core/dom/Text.h"
#include "core/dom/UserGestureIndicator.h"
+#include "core/html/HTMLAnchorElement.h"
#include "core/html/HTMLFrameElementBase.h"
#include "core/html/HTMLInputElement.h"
#include "core/html/HTMLLabelElement.h"
@@ -1368,7 +1369,7 @@ Element* AccessibilityNodeObject::anchorElement() const
// search up the DOM tree for an anchor element
// NOTE: this assumes that any non-image with an anchor is an HTMLAnchorElement
for ( ; node; node = node->parentNode()) {
- if (node->hasTagName(aTag) || (node->renderer() && cache->getOrCreate(node->renderer())->isAnchor()))
+ if (isHTMLAnchorElement(node) || (node->renderer() && cache->getOrCreate(node->renderer())->isAnchor()))
return toElement(node);
}
« no previous file with comments | « Source/WebKit/chromium/src/DOMUtilitiesPrivate.cpp ('k') | Source/core/accessibility/AccessibilityRenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698