[Webkit-unassigned] [Bug 174965] AX: findMatchingObjects doesn't work when the startObject is ignored

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jul 29 01:59:33 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=174965

--- Comment #3 from Nan Wang <n_wang at apple.com> ---
Comment on attachment 316694
  --> https://bugs.webkit.org/attachment.cgi?id=316694
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=316694&action=review

>> Source/WebCore/accessibility/AccessibilityObject.cpp:615
>> +    if (startObject && searchPosition == WTF::notFound && childrenSize > 0) {
> 
> what does childrenSize == 0 mean in this context? it seems like we would still want to go up to find a valid start element

The function is appendChildrenToArray, I think if childrenSize == 0 means we don't want to append anything into this array.

>> Source/WebCore/accessibility/AccessibilityObject.cpp:617
>> +        if (startObject->isDescendantOfObject(object) && startObject->accessibilityIsIgnored()) {
> 
> does it matter that it's ignored? It's already not found in the children list right?

Probably right.

>> Source/WebCore/accessibility/AccessibilityObject.cpp:620
>> +            while (searchObject->parentObject() && searchObject->parentObject()->accessibilityIsIgnored())
> 
> do you want to stop if searchObject == object? if you go higher than that then searchChildren wouldn't be correct

Ok I'll add that

>> Source/WebCore/accessibility/AccessibilityObject.cpp:625
>> +            searchPosition = searchObject ? searchChildren.find(searchObject) : WTF::notFound;
> 
> this is the same line as 613
> 
> I wonder if you could delete this line, move line 613 here and then your first if check is just
> if (startObject && startObject->isIgnored()), because we know if it's ignore, searchPos == WTF::NotFound

Ok

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170729/0048e243/attachment.html>


More information about the webkit-unassigned mailing list