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

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

Issue 70213002: Update the accessibility tree when a modal dialog is opened/closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: sync and remove inert-node-is-hidden.html 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 | « LayoutTests/accessibility/inert-node-is-hidden-expected.txt ('k') | Source/core/html/HTMLDialogElement.cpp » ('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 1c247f6cb0658f79118d2aba496946f222f02182..0e5217e13569a5bf98765e7e2d155c280a4fd2b2 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 mightBeInInertSubtree = true;
+ for (const AXObject* object = this; object; object = object->parentObject()) {
if (equalIgnoringCase(object->getAttribute(aria_hiddenAttr), "true"))
return true;
+ if (mightBeInInertSubtree && object->node()) {
+ if (object->node()->isInert())
+ return true;
+ mightBeInInertSubtree = false;
+ }
}
return false;
« no previous file with comments | « LayoutTests/accessibility/inert-node-is-hidden-expected.txt ('k') | Source/core/html/HTMLDialogElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698