Bug 264425 - [IFC] inline-block child preceded by an inline child has incorrect positioning in vertical writing modes with a right-to-left direction
Summary: [IFC] inline-block child preceded by an inline child has incorrect positionin...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-08 10:50 PST by Aditya Keerthi
Modified: 2023-11-09 05:32 PST (History)
5 users (show)

See Also:


Attachments
Reduction (188 bytes, text/html)
2023-11-08 10:50 PST, Aditya Keerthi
no flags Details
Screenshot (87.51 KB, image/png)
2023-11-08 10:50 PST, Aditya Keerthi
no flags Details
longer content-more offset screenshot (62.73 KB, image/png)
2023-11-08 11:12 PST, zalan
no flags Details
[fast-cq]Patch (5.94 KB, patch)
2023-11-08 20:22 PST, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aditya Keerthi 2023-11-08 10:50:02 PST
Created attachment 468518 [details]
Reduction

See test case and screenshot.
Comment 1 Radar WebKit Bug Importer 2023-11-08 10:50:18 PST
<rdar://problem/118128181>
Comment 2 Aditya Keerthi 2023-11-08 10:50:23 PST
Created attachment 468519 [details]
Screenshot
Comment 3 zalan 2023-11-08 11:11:36 PST
This is some offset gone wrong in bidi codepath. The longer the visually first content (1, 55555 etc) is, the more offset the visually trailing content (X) gains. 

<div style="outline: 1px solid green; writing-mode: vertical-rl; direction: rtl; margin-left: 100px;"><div style="display: inline-block;">X</div><span></span>1</div>
<div style="outline: 1px solid green; writing-mode: vertical-rl; direction: rtl; margin-left: 100px;"><div style="display: inline-block;">X</div><span></span>55555</div>
<div style="outline: 1px solid green; writing-mode: vertical-rl; direction: rtl; margin-left: 100px;"><div style="display: inline-block;">X</div><span></span>999999999</div>
Comment 4 zalan 2023-11-08 11:12:15 PST
Created attachment 468520 [details]
longer content-more offset screenshot
Comment 5 zalan 2023-11-08 20:22:28 PST
Created attachment 468528 [details]
[fast-cq]Patch
Comment 6 EWS 2023-11-09 05:32:05 PST
Committed 270442@main (1a7f8f48b4c1): <https://commits.webkit.org/270442@main>

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