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

Unified Diff: Source/modules/accessibility/AXObject.cpp

Issue 1050533002: Slightly upgrade caching of descendant of barren parent. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXObject.cpp
diff --git a/Source/modules/accessibility/AXObject.cpp b/Source/modules/accessibility/AXObject.cpp
index d451350c269b3c73125e32f061c7b31bacc2fce0..7264084d6244957d2b491cb92e1da4e7182f268f 100644
--- a/Source/modules/accessibility/AXObject.cpp
+++ b/Source/modules/accessibility/AXObject.cpp
@@ -431,9 +431,11 @@ bool AXObject::isDescendantOfBarrenParent() const
bool AXObject::computeIsDescendantOfBarrenParent() const
{
- for (AXObject* object = parentObject(); object; object = object->parentObject()) {
- if (!object->canHaveChildren())
+ if (AXObject* parent = parentObject()) {
+ if (!parent->canHaveChildren())
return true;
+
+ return parent->isDescendantOfBarrenParent();
}
return false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698