WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
174965
AX: findMatchingObjects doesn't work when the startObject is ignored
https://bugs.webkit.org/show_bug.cgi?id=174965
Summary
AX: findMatchingObjects doesn't work when the startObject is ignored
Nan Wang
Reported
2017-07-28 19:40:58 PDT
When we pass an ignored object as the start object to findMatchingObjects, we are getting either the first element or last element of the container. <
rdar://problem/31823926
>
Attachments
patch
(6.44 KB, patch)
2017-07-28 19:46 PDT
,
Nan Wang
no flags
Details
Formatted Diff
Diff
patch
(6.39 KB, patch)
2017-07-29 02:39 PDT
,
Nan Wang
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Nan Wang
Comment 1
2017-07-28 19:46:21 PDT
Created
attachment 316694
[details]
patch
chris fleizach
Comment 2
2017-07-29 00:38:55 PDT
Comment on
attachment 316694
[details]
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
Nan Wang
Comment 3
2017-07-29 01:59:33 PDT
Comment on
attachment 316694
[details]
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
Nan Wang
Comment 4
2017-07-29 02:39:52 PDT
Created
attachment 316708
[details]
patch update from review
WebKit Commit Bot
Comment 5
2017-07-29 03:27:04 PDT
Comment on
attachment 316708
[details]
patch Clearing flags on attachment: 316708 Committed
r220042
: <
http://trac.webkit.org/changeset/220042
>
WebKit Commit Bot
Comment 6
2017-07-29 03:27:05 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug