Chromium Code Reviews| 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() |