Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012, Google Inc. All rights reserved. | 2 * Copyright (C) 2012, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 564 role = buttonRoleType(); | 564 role = buttonRoleType(); |
| 565 | 565 |
| 566 role = remapAriaRoleDueToParent(role); | 566 role = remapAriaRoleDueToParent(role); |
| 567 | 567 |
| 568 if (role) | 568 if (role) |
| 569 return role; | 569 return role; |
| 570 | 570 |
| 571 return UnknownRole; | 571 return UnknownRole; |
| 572 } | 572 } |
| 573 | 573 |
| 574 void AXNodeObject::accessibilityChildrenFromAttribute(QualifiedName attr, AXObje ct::AXObjectVector& children) const | 574 void AXNodeObject::accessibilityChildrenFromAttribute(QualifiedName attr, AXObje ct::AXObjectVector& children, bool includeHiddenObjects) const |
| 575 { | 575 { |
| 576 HeapVector<Member<Element>> elements; | 576 HeapVector<Member<Element>> elements; |
| 577 elementsFromAttribute(elements, attr); | 577 elementsFromAttribute(elements, attr); |
| 578 | 578 |
| 579 AXObjectCacheImpl& cache = axObjectCache(); | 579 AXObjectCacheImpl& cache = axObjectCache(); |
| 580 for (const auto& element : elements) { | 580 for (const auto& element : elements) { |
| 581 if (AXObject* child = cache.getOrCreate(element)) | 581 if (AXObject* child = cache.getOrCreate(element)) { |
| 582 if (!includeHiddenObjects && child->isHiddenForTextAlternativeCalcul ation()) | |
|
aboxhall
2016/07/08 17:12:35
Why not just call child->accessibilityIsIgnored()
| |
| 583 continue; | |
| 582 children.append(child); | 584 children.append(child); |
| 585 } | |
| 583 } | 586 } |
| 584 } | 587 } |
| 585 | 588 |
| 586 // This only returns true if this is the element that actually has the | 589 // This only returns true if this is the element that actually has the |
| 587 // contentEditable attribute set, unlike node->hasEditableStyle() which will | 590 // contentEditable attribute set, unlike node->hasEditableStyle() which will |
| 588 // also return true if an ancestor is editable. | 591 // also return true if an ancestor is editable. |
| 589 bool AXNodeObject::hasContentEditableAttributeSet() const | 592 bool AXNodeObject::hasContentEditableAttributeSet() const |
| 590 { | 593 { |
| 591 const AtomicString& contentEditableValue = getAttribute(contenteditableAttr) ; | 594 const AtomicString& contentEditableValue = getAttribute(contenteditableAttr) ; |
| 592 if (contentEditableValue.isNull()) | 595 if (contentEditableValue.isNull()) |
| (...skipping 2240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2833 return placeholder; | 2836 return placeholder; |
| 2834 } | 2837 } |
| 2835 | 2838 |
| 2836 DEFINE_TRACE(AXNodeObject) | 2839 DEFINE_TRACE(AXNodeObject) |
| 2837 { | 2840 { |
| 2838 visitor->trace(m_node); | 2841 visitor->trace(m_node); |
| 2839 AXObject::trace(visitor); | 2842 AXObject::trace(visitor); |
| 2840 } | 2843 } |
| 2841 | 2844 |
| 2842 } // namespace blink | 2845 } // namespace blink |
| OLD | NEW |