Bug 243286 - AX: AccessibilityObject::accessibilityVisibleCharacterRange misses the first line of a paragraph split across pages (part two)
Summary: AX: AccessibilityObject::accessibilityVisibleCharacterRange misses the first ...
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-07-27 23:55 PDT by Tyler Wilcock
Modified: 2022-07-28 11:17 PDT (History)
10 users (show)

See Also:


Attachments
Patch (4.16 KB, patch)
2022-07-28 00:06 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-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].