Bug 230217 - offsetLeft on display:inline element in vertical-rl parent can return a negative number
Summary: offsetLeft on display:inline element in vertical-rl parent can return a negat...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Martin Robinson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-09-13 07:16 PDT by Martin Robinson
Modified: 2021-09-15 05:10 PDT (History)
8 users (show)

See Also:


Attachments
Reduced testcase (369 bytes, text/html)
2021-09-13 07:16 PDT, Martin Robinson
no flags Details
Patch (5.75 KB, patch)
2021-09-14 07:35 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff
Patch (8.26 KB, patch)
2021-09-15 02:38 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Robinson 2021-09-13 07:16:20 PDT
Created attachment 438036 [details]
Reduced testcase

When an element has display:inline in a parent with writing-mode:vertical-rl, the offsetLeft property of the element is calculated incorrectly. In some cases, a negative number may be returned. This behavior can be observed in the attached test case, which prints the value of offsetLeft to the console.
Comment 1 Martin Robinson 2021-09-14 07:35:00 PDT
Created attachment 438141 [details]
Patch
Comment 2 Martin Robinson 2021-09-15 02:38:20 PDT
Created attachment 438230 [details]
Patch
Comment 3 EWS 2021-09-15 05:09:47 PDT
Committed r282447 (241700@main): <https://commits.webkit.org/241700@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 438230 [details].
Comment 4 Radar WebKit Bug Importer 2021-09-15 05:10:21 PDT
<rdar://problem/83145342>