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

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

Issue 659563006: Add live region root to the cached properties of an AXObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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/AXScrollView.cpp
diff --git a/Source/core/accessibility/AXScrollView.cpp b/Source/core/accessibility/AXScrollView.cpp
index 70a7c94cdceb56e03eb295fe453bf47c6fe67938..1662c2db66f8686eda6b162041d63aa2339e70e1 100644
--- a/Source/core/accessibility/AXScrollView.cpp
+++ b/Source/core/accessibility/AXScrollView.cpp
@@ -143,11 +143,21 @@ void AXScrollView::clearChildren()
bool AXScrollView::computeAccessibilityIsIgnored() const
{
+ // We just want to match whatever's returned by our web area, which is a child of this
+ // object. Normally cached attribute values may only search up the tree. We can't just
+ // call accessibilityIsIgnored on the web area, because the web area may search up its
+ // ancestors and call this function recursively, and we'd loop until a stack overflow.
+
+ // Instead, we first update the cached accessibilityIsIgnored value for this node to
+ // false, call accessibilityIsIgnored on the web area, then return the mathcing value.
+ m_cachedIsIgnored = false;
+ m_lastModificationCount = axObjectCache()->modificationCount();
+
AXObject* webArea = webAreaObject();
- if (!webArea)
- return true;
+ if (webArea)
+ return webArea->accessibilityIsIgnored();
- return webArea->accessibilityIsIgnored();
+ return false;
aboxhall 2014/10/27 17:29:53 Why did this change from true to false?
dmazzoni 2014/10/27 18:08:25 Good catch - should be true. Thanks.
}
void AXScrollView::addChildren()

Powered by Google App Engine
This is Rietveld 408576698