Bug 247350 - AX: Render tree continuations can cause parts of the AX tree to be duplicated
Summary: AX: Render tree continuations can cause parts of the AX tree to be duplicated
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tyler Wilcock
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-11-01 18:09 PDT by Tyler Wilcock
Modified: 2022-11-05 13:39 PDT (History)
10 users (show)

See Also:


Attachments
Patch (2.54 KB, patch)
2022-11-02 10:33 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (2.64 KB, patch)
2022-11-02 10:43 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (2.83 KB, patch)
2022-11-02 10:46 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tyler Wilcock 2022-11-01 18:09:15 PDT
We partially solved this in https://bugs.webkit.org/show_bug.cgi?id=157818, but that change isn't enough to prevent the problem in all cases.
Comment 1 Radar WebKit Bug Importer 2022-11-01 18:09:26 PDT
<rdar://problem/101835073>
Comment 2 Tyler Wilcock 2022-11-02 10:33:05 PDT
Created attachment 463364 [details]
Patch
Comment 3 Tyler Wilcock 2022-11-02 10:38:18 PDT
rdar://101506601
Comment 4 chris fleizach 2022-11-02 10:39:59 PDT
Comment on attachment 463364 [details]
Patch

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

> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:408
> +            return nextObject->nextSibling();

do we need to check if return nextObject->nextSibling(); == nil and then fall down to next case?
Comment 5 Tyler Wilcock 2022-11-02 10:43:32 PDT
Created attachment 463365 [details]
Patch
Comment 6 Tyler Wilcock 2022-11-02 10:44:29 PDT
(In reply to chris fleizach from comment #4)
> Comment on attachment 463364 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=463364&action=review
> 
> > Source/WebCore/accessibility/AccessibilityRenderObject.cpp:408
> > +            return nextObject->nextSibling();
> 
> do we need to check if return nextObject->nextSibling(); == nil and then
> fall down to next case?
No, because if we aren't able to compute a non-null nextSibling by this point then there is nothing left to do besides also returning nullptr. I've re-ordered the logic a bit in the latest revision to make this more clear.
Comment 7 Tyler Wilcock 2022-11-02 10:46:33 PDT
Created attachment 463366 [details]
Patch
Comment 8 Andres Gonzalez 2022-11-02 11:32:14 PDT
(In reply to Tyler Wilcock from comment #7)
> Created attachment 463366 [details]
> Patch

Don't we have a similar problem with previousSibling?
Comment 9 Tyler Wilcock 2022-11-02 11:37:11 PDT
(In reply to Andres Gonzalez from comment #8)
> (In reply to Tyler Wilcock from comment #7)
> > Created attachment 463366 [details]
> > Patch
> 
> Don't we have a similar problem with previousSibling?
Yeah, we might need to apply the same fix to previousSibling in the future. This fix is especially important for nextSibling because it's used in AccessibilityRenderObject::addChildren, while previousSibling is not. We can re-evaluate later on.
Comment 10 EWS 2022-11-05 13:39:11 PDT
Committed 256363@main (ade47b72cbb4): <https://commits.webkit.org/256363@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 463366 [details].