⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 220065 in webkit


Ignore:
Timestamp:
Jul 31, 2017, 7:37:37 AM (9 years ago)
Author:
jmarcell@apple.com
Message:

Cherry-pick r220042. rdar://problem/33619586

Location:
branches/safari-604-branch
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-604-branch/LayoutTests/ChangeLog

    r220061 r220065  
     12017-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
    1152017-07-31  Jason Marcell  <jmarcell@apple.com>
    216
  • branches/safari-604-branch/Source/WebCore/ChangeLog

    r220061 r220065  
     12017-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
    1212017-07-31  Jason Marcell  <jmarcell@apple.com>
    222
  • branches/safari-604-branch/Source/WebCore/accessibility/AccessibilityObject.cpp

    r219922 r220065  
    611611    size_t endIndex = isForward ? 0 : childrenSize;
    612612
     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   
    613628    size_t searchPosition = startObject ? searchChildren.find(startObject) : WTF::notFound;
     629   
    614630    if (searchPosition != WTF::notFound) {
    615631        if (isForward)
Note: See TracChangeset for help on using the changeset viewer.