Changeset 220042 in webkit
- Timestamp:
- Jul 29, 2017, 3:27:00 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/accessibility/mac/search-predicate-from-ignored-element-expected.txt (added)
-
LayoutTests/accessibility/mac/search-predicate-from-ignored-element.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/accessibility/AccessibilityObject.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r220041 r220042 1 2017-07-29 Nan Wang <n_wang@apple.com> 2 3 AX: findMatchingObjects doesn't work when the startObject is ignored 4 https://bugs.webkit.org/show_bug.cgi?id=174965 5 6 Reviewed by Chris Fleizach. 7 8 * accessibility/mac/search-predicate-from-ignored-element-expected.txt: Added. 9 * accessibility/mac/search-predicate-from-ignored-element.html: Added. 10 1 11 2017-07-29 Aaron Chu <aaron_chu@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r220041 r220042 1 2017-07-29 Nan Wang <n_wang@apple.com> 2 3 AX: findMatchingObjects doesn't work when the startObject is ignored 4 https://bugs.webkit.org/show_bug.cgi?id=174965 5 6 Reviewed by Chris Fleizach. 7 8 findMatchingObjects would return a wrong element if we pass in an ignored 9 start object. To fix this, we should use the closest accessible sibling as 10 the start object. 11 12 Test: accessibility/mac/search-predicate-from-ignored-element.html 13 14 * accessibility/AccessibilityObject.cpp: 15 (WebCore::appendChildrenToArray): 16 1 17 2017-07-29 Aaron Chu <aaron_chu@apple.com> 2 18 -
trunk/Source/WebCore/accessibility/AccessibilityObject.cpp
r219751 r220042 611 611 size_t endIndex = isForward ? 0 : childrenSize; 612 612 613 // If the startObject is ignored, we should use an accessible sibling as a start element instead. 614 if (startObject && startObject->accessibilityIsIgnored() && startObject->isDescendantOfObject(object)) { 615 AccessibilityObject* parentObject = startObject->parentObject(); 616 // Go up the parent chain to find the highest ancestor that's also being ignored. 617 while (parentObject && parentObject->accessibilityIsIgnored()) { 618 if (parentObject == object) 619 break; 620 startObject = parentObject; 621 parentObject = parentObject->parentObject(); 622 } 623 // Get the un-ignored sibling based on the search direction, and update the searchPosition. 624 while (startObject && startObject->accessibilityIsIgnored()) 625 startObject = isForward ? startObject->previousSibling() : startObject->nextSibling(); 626 } 627 613 628 size_t searchPosition = startObject ? searchChildren.find(startObject) : WTF::notFound; 629 614 630 if (searchPosition != WTF::notFound) { 615 631 if (isForward)
Note:
See TracChangeset
for help on using the changeset viewer.