Bug 243286

Summary: AX: AccessibilityObject::accessibilityVisibleCharacterRange misses the first line of a paragraph split across pages (part two)
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   
See Also: https://bugs.webkit.org/show_bug.cgi?id=242880
Attachments:
Description Flags
Patch none

Description Tyler Wilcock 2022-07-27 23:55:21 PDT
In https://bugs.webkit.org/show_bug.cgi?id=242880, we made a change that prevented this issue in some (in reality, only a few) cases. However, after further testing, I've found other cases that are not fixed.
Comment 1 Radar WebKit Bug Importer 2022-07-27 23:55:31 PDT
<rdar://problem/97706360>
Comment 2 Tyler Wilcock 2022-07-28 00:06:34 PDT
Created attachment 461266 [details]
Patch
Comment 3 chris fleizach 2022-07-28 10:22:34 PDT
Comment on attachment 461266 [details]
Patch

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

> Source/WebCore/accessibility/AccessibilityObject.cpp:845
> +        float lastX = elementRect.x();

do we want the MaxX here of the rect rather than the origin?
Comment 4 Tyler Wilcock 2022-07-28 10:27:22 PDT
(In reply to chris fleizach from comment #3)
> Comment on attachment 461266 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=461266&action=review
> 
> > Source/WebCore/accessibility/AccessibilityObject.cpp:845
> > +        float lastX = elementRect.x();
> 
> do we want the MaxX here of the rect rather than the origin?

I don't think so as maxX includes width, which we expect to not be consistent (because paragraphs will extend different lengths down the line). So it wouldn't be a good indicator that we've crossed a viewport boundary.
Comment 5 EWS 2022-07-28 11:17:27 PDT
Committed 252920@main (f59072f13d29): <https://commits.webkit.org/252920@main>

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