Bug 256218 - AX: Allow 1px difference in results for mac/bounds-for-range.html
Summary: AX: Allow 1px difference in results for mac/bounds-for-range.html
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tyler Wilcock
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-05-02 11:34 PDT by Tyler Wilcock
Modified: 2023-05-02 20:32 PDT (History)
10 users (show)

See Also:


Attachments
Patch (7.65 KB, patch)
2023-05-02 11:36 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (7.60 KB, patch)
2023-05-02 12:06 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (8.24 KB, patch)
2023-05-02 16:11 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (8.27 KB, patch)
2023-05-02 16:19 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 2023-05-02 11:34:20 PDT
With https://bugs.webkit.org/show_bug.cgi?id=256179, there can sometimes be a 1px difference in the results for this test. Worse, the difference is only between EWS and my local machine (both are consistent, but different).
Comment 1 Radar WebKit Bug Importer 2023-05-02 11:34:37 PDT
<rdar://problem/108800436>
Comment 2 Tyler Wilcock 2023-05-02 11:36:21 PDT
Created attachment 466176 [details]
Patch
Comment 3 Tyler Wilcock 2023-05-02 12:06:32 PDT
Created attachment 466177 [details]
Patch
Comment 4 chris fleizach 2023-05-02 12:47:11 PDT
Comment on attachment 466177 [details]
Patch

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

> LayoutTests/accessibility/mac/bounds-for-range.html:27
> +    output += expectAny("textChild.boundsForRange(6,10)", ["{{-1.000000, -1.000000}, {60.000000, 18.000000}}", "{{-1.000000, -1.000000}, {61.000000, 18.000000}}"]);

should we make something for robust, like

expectWithVariance(textChild.boundsFor, "1, 1, 50, 18", "3.0")

and then you have the parse the frame but that's not too hard
Comment 5 Tyler Wilcock 2023-05-02 16:11:09 PDT
Created attachment 466182 [details]
Patch
Comment 6 Tyler Wilcock 2023-05-02 16:11:34 PDT
(In reply to chris fleizach from comment #4)
> Comment on attachment 466177 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=466177&action=review
> 
> > LayoutTests/accessibility/mac/bounds-for-range.html:27
> > +    output += expectAny("textChild.boundsForRange(6,10)", ["{{-1.000000, -1.000000}, {60.000000, 18.000000}}", "{{-1.000000, -1.000000}, {61.000000, 18.000000}}"]);
> 
> should we make something for robust, like
> 
> expectWithVariance(textChild.boundsFor, "1, 1, 50, 18", "3.0")
> 
> and then you have the parse the frame but that's not too hard
Fixed in the latest patch.
Comment 7 chris fleizach 2023-05-02 16:14:03 PDT
nice!
Comment 8 Tyler Wilcock 2023-05-02 16:19:16 PDT
Created attachment 466183 [details]
Patch
Comment 9 EWS 2023-05-02 20:32:29 PDT
Committed 263617@main (de2c64350b4c): <https://commits.webkit.org/263617@main>

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