Chromium Code Reviews

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

Issue 482903002: Get rid of loops looking for the first Element ancestor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix nits Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | Source/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AXNodeObject.cpp
diff --git a/Source/core/accessibility/AXNodeObject.cpp b/Source/core/accessibility/AXNodeObject.cpp
index f491712b61d56f1a5d2dc2cf3688dcaf4ad5975c..3661aa9e3093b528247ac76b69b75a377cfb2a01 100644
--- a/Source/core/accessibility/AXNodeObject.cpp
+++ b/Source/core/accessibility/AXNodeObject.cpp
@@ -397,8 +397,8 @@ Element* AXNodeObject::mouseButtonListener() const
return 0;
// check if our parent is a mouse button listener
- while (node && !node->isElementNode())
- node = node->parentNode();
+ if (!node->isElementNode())
+ node = node->parentElement();
if (!node)
return 0;
« no previous file with comments | « no previous file | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine