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

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: Address feedback 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
« no previous file with comments | « Source/core/accessibility/AXRenderObject.cpp ('k') | Source/web/WebAXObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AXScrollView.cpp
diff --git a/Source/core/accessibility/AXScrollView.cpp b/Source/core/accessibility/AXScrollView.cpp
index 70a7c94cdceb56e03eb295fe453bf47c6fe67938..4a7ccc6f1ad37ff7523eba127dc18fa3b0c9e0c4 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 true;
}
void AXScrollView::addChildren()
« no previous file with comments | « Source/core/accessibility/AXRenderObject.cpp ('k') | Source/web/WebAXObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698