Bug 256218

Summary: AX: Allow 1px difference in results for mac/bounds-for-range.html
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: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

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].