Bug 243565

Summary: AX: AccessibilityObject::visibleCharacterRange sometimes returns content from the previous viewport boundary
Product: WebKit Reporter: Tyler Wilcock <tyler_w>
Component: AccessibilityAssignee: Tyler Wilcock <tyler_w>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, andresg_22, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Tyler Wilcock 2022-08-04 16:03:41 PDT
AccessibilityObject::visibleCharacterRange sometimes returns content from the previous viewport boundary.

This is a regression from https://bugs.webkit.org/show_bug.cgi?id=243286.
Comment 1 Radar WebKit Bug Importer 2022-08-04 16:03:53 PDT
<rdar://problem/98153603>
Comment 2 Tyler Wilcock 2022-08-04 17:05:13 PDT
Created attachment 461410 [details]
Patch
Comment 3 Tyler Wilcock 2022-08-04 17:09:56 PDT
rdar://96884540
Comment 4 chris fleizach 2022-08-12 09:01:54 PDT
Comment on attachment 461410 [details]
Patch

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

> Source/WebCore/accessibility/AccessibilityObject.cpp:848
> +        if (lineStartBoundaryPoint && lineStartBoundaryPoint->container.ptr() == startBoundary.container.ptr()) {

can you not do equality check on a RetainPtr ?
Comment 5 Tyler Wilcock 2022-08-12 10:05:46 PDT
(In reply to chris fleizach from comment #4)
> Comment on attachment 461410 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=461410&action=review
> 
> > Source/WebCore/accessibility/AccessibilityObject.cpp:848
> > +        if (lineStartBoundaryPoint && lineStartBoundaryPoint->container.ptr() == startBoundary.container.ptr()) {
> 
> can you not do equality check on a RetainPtr ?
These are Ref<Node>s, and unfortunately Ref's don't currently have an operator== implementation.
Comment 6 EWS 2022-08-12 11:15:02 PDT
Committed 253385@main (2559a63f0d9c): <https://commits.webkit.org/253385@main>

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