| 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;
|
|
|