[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 00:38:55 PDT 2017


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

--- Comment #2 from chris fleizach <cfleizach 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

> 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?

> Source/WebCore/accessibility/AccessibilityObject.cpp:618
> +            AccessibilityObject* searchObject = startObject;

if you made searchObject = startObject->parent(), then your next while loop just looks like

while (searchObject && ...) which is a bit clearer

> 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

> 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

-- 
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/7e7fdf39/attachment.html>


More information about the webkit-unassigned mailing list