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

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

Issue 59663005: Update the accessibility tree when a modal dialog is opened/closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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/AXObject.cpp
diff --git a/Source/core/accessibility/AXObject.cpp b/Source/core/accessibility/AXObject.cpp
index 645d886053c0f331e57822afabb9acd466199c57..e42cdbc5527d35ad30574cec5383660cc5a81bd1 100644
--- a/Source/core/accessibility/AXObject.cpp
+++ b/Source/core/accessibility/AXObject.cpp
@@ -289,14 +289,15 @@ AXObjectInclusion AXObject::defaultObjectInclusion() const
bool AXObject::isInertOrAriaHidden() const
{
- if (equalIgnoringCase(getAttribute(aria_hiddenAttr), "true"))
- return true;
- if (node() && node()->isInert())
- return true;
-
- for (AXObject* object = parentObject(); object; object = object->parentObject()) {
+ bool canBeInInertSubtree = true;
dmazzoni 2013/11/07 16:35:59 Do you mean "is allowed to be in inert subtreee" o
falken 2013/11/08 05:08:35 Done.
+ for (const AXObject* object = this; object; object = object->parentObject()) {
if (equalIgnoringCase(object->getAttribute(aria_hiddenAttr), "true"))
return true;
+ if (canBeInInertSubtree && object->node()) {
+ if (object->node()->isInert())
+ return true;
+ canBeInInertSubtree = false;
+ }
}
return false;
@@ -816,13 +817,15 @@ void AXObject::scrollToGlobalPoint(const IntPoint& globalPoint) const
}
}
-void AXObject::notifyIfIgnoredValueChanged()
+bool AXObject::notifyIfIgnoredValueChanged()
{
bool isIgnored = accessibilityIsIgnored();
if (lastKnownIsIgnoredValue() != isIgnored) {
axObjectCache()->childrenChanged(parentObject());
setLastKnownIsIgnoredValue(isIgnored);
+ return true;
}
+ return false;
}
void AXObject::selectionChanged()

Powered by Google App Engine
This is Rietveld 408576698