Changeset 220065 in webkit
- Timestamp:
- Jul 31, 2017, 7:37:37 AM (9 years ago)
- Location:
- branches/safari-604-branch
- 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
-
branches/safari-604-branch/LayoutTests/ChangeLog
r220061 r220065 1 2017-07-31 Jason Marcell <jmarcell@apple.com> 2 3 Cherry-pick r220042. rdar://problem/33619586 4 5 2017-07-29 Nan Wang <n_wang@apple.com> 6 7 AX: findMatchingObjects doesn't work when the startObject is ignored 8 https://bugs.webkit.org/show_bug.cgi?id=174965 9 10 Reviewed by Chris Fleizach. 11 12 * accessibility/mac/search-predicate-from-ignored-element-expected.txt: Added. 13 * accessibility/mac/search-predicate-from-ignored-element.html: Added. 14 1 15 2017-07-31 Jason Marcell <jmarcell@apple.com> 2 16 -
branches/safari-604-branch/Source/WebCore/ChangeLog
r220061 r220065 1 2017-07-31 Jason Marcell <jmarcell@apple.com> 2 3 Cherry-pick r220042. rdar://problem/33619586 4 5 2017-07-29 Nan Wang <n_wang@apple.com> 6 7 AX: findMatchingObjects doesn't work when the startObject is ignored 8 https://bugs.webkit.org/show_bug.cgi?id=174965 9 10 Reviewed by Chris Fleizach. 11 12 findMatchingObjects would return a wrong element if we pass in an ignored 13 start object. To fix this, we should use the closest accessible sibling as 14 the start object. 15 16 Test: accessibility/mac/search-predicate-from-ignored-element.html 17 18 * accessibility/AccessibilityObject.cpp: 19 (WebCore::appendChildrenToArray): 20 1 21 2017-07-31 Jason Marcell <jmarcell@apple.com> 2 22 -
branches/safari-604-branch/Source/WebCore/accessibility/AccessibilityObject.cpp
r219922 r220065 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.