Chromium Code Reviews| Index: third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp |
| diff --git a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp |
| index 176a48c22a4dae8e21ccf8f2e1964df99cea1061..0fac0ed59fead26b13e612665f76aace87a369f7 100644 |
| --- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp |
| +++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp |
| @@ -571,15 +571,18 @@ AccessibilityRole AXNodeObject::determineAriaRoleAttribute() const |
| return UnknownRole; |
| } |
| -void AXNodeObject::accessibilityChildrenFromAttribute(QualifiedName attr, AXObject::AXObjectVector& children) const |
| +void AXNodeObject::accessibilityChildrenFromAttribute(QualifiedName attr, AXObject::AXObjectVector& children, bool includeHiddenObjects) const |
| { |
| HeapVector<Member<Element>> elements; |
| elementsFromAttribute(elements, attr); |
| AXObjectCacheImpl& cache = axObjectCache(); |
| for (const auto& element : elements) { |
| - if (AXObject* child = cache.getOrCreate(element)) |
| + if (AXObject* child = cache.getOrCreate(element)) { |
| + if (!includeHiddenObjects && child->isHiddenForTextAlternativeCalculation()) |
|
aboxhall
2016/07/08 17:12:35
Why not just call child->accessibilityIsIgnored()
|
| + continue; |
| children.append(child); |
| + } |
| } |
| } |