Bug 265216

Summary: (REGRESSION: 267587@main) Text indent is incorrect when paragraph is affected by a floating element
Product: WebKit Reporter: Brad Andalman <bya>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, bw, koivisto, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Mac (Apple Silicon)   
OS: macOS 14   
Attachments:
Description Flags
HTML that shows a too-large text-indent
none
HTML rendered using Safari Technology Preview 183, Chrome, and Firefox
none
HTML rendered in Safari 17.1 and STP 183
none
[fast-cq]Patch none

Brad Andalman
Reported 2023-11-21 13:56:23 PST
Created attachment 468716 [details] HTML that shows a too-large text-indent I’ve attached HTML that exhibits this issue. In it, you’ll see a green bar that begins 120 pixels from the left edge of the window. The paragraph above the green bar is affected by a floating element of 100px and has a text indent of 20px. Thus, we’d expect the text to start at the same position as the green bar. In the latest Safari Technology Preview (183) and in Sonoma 14.2b3, the text now starts some distance away from the start of the green bar. This is similar enough to Bug #263698 that I wondered whether that fix also addresses this issue. Sadly, it does not.
Attachments
HTML that shows a too-large text-indent (782 bytes, text/html)
2023-11-21 13:56 PST, Brad Andalman
no flags
HTML rendered using Safari Technology Preview 183, Chrome, and Firefox (152.92 KB, image/png)
2023-11-21 13:57 PST, Brad Andalman
no flags
HTML rendered in Safari 17.1 and STP 183 (130.09 KB, image/png)
2023-11-21 14:37 PST, Brad Andalman
no flags
[fast-cq]Patch (6.23 KB, patch)
2023-11-22 19:25 PST, zalan
no flags
Brad Andalman
Comment 1 2023-11-21 13:57:53 PST
Created attachment 468717 [details] HTML rendered using Safari Technology Preview 183, Chrome, and Firefox
Brad Andalman
Comment 2 2023-11-21 14:03:31 PST
I tested in the WebKit nightly builds back to 268549@main (which is the oldest one I could find), and the bug still appears.
Brad Andalman
Comment 3 2023-11-21 14:37:23 PST
Created attachment 468719 [details] HTML rendered in Safari 17.1 and STP 183 I wanted to make it extra clear that this bug is recent: Safari 17.1 works as expected, but Safari Technology Preview 183 is broken.
zalan
Comment 4 2023-11-21 18:15:49 PST
Thank you for filing this bug. It looks like we indent the inline content twice as much.
Radar WebKit Bug Importer
Comment 5 2023-11-21 18:16:20 PST
zalan
Comment 6 2023-11-22 07:45:09 PST
Sadly regressed by a refactoring change (https://commits.webkit.org/267587@main)
zalan
Comment 7 2023-11-22 19:25:02 PST
Created attachment 468737 [details] [fast-cq]Patch
EWS
Comment 8 2023-11-23 06:49:47 PST
Committed 271080@main (b741d4c7aa56): <https://commits.webkit.org/271080@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 468737 [details].
Brad West
Comment 9 2023-12-06 15:27:49 PST
Thank you for addressing this bug so quickly. Do you have an idea of when this will be available to users? We're testing the Sonoma 14.2 Release Candidate and still see this in Safari as well as in embedded uses (like Books).
Note You need to log in before you can comment on or make changes to this bug.