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

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

Issue 53423003: WIP: Update AXObjects when a modal dialog is opened/closed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update tree 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
« no previous file with comments | « Source/core/accessibility/AXObject.h ('k') | Source/core/accessibility/AXObjectCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AXObject.cpp
diff --git a/Source/core/accessibility/AXObject.cpp b/Source/core/accessibility/AXObject.cpp
index 89571671459129f3fccd380d24bd99f7b67c9038..3f5aff5c40e152e33bfc863b6b4d52810f90bd39 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;
+ 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()
« no previous file with comments | « Source/core/accessibility/AXObject.h ('k') | Source/core/accessibility/AXObjectCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698