Bug 265216 - (REGRESSION: 267587@main) Text indent is incorrect when paragraph is affected by a floating element
Summary: (REGRESSION: 267587@main) Text indent is incorrect when paragraph is affected...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari Technology Preview
Hardware: Mac (Apple Silicon) macOS 14
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-21 13:56 PST by Brad Andalman
Modified: 2023-12-06 15:27 PST (History)
6 users (show)

See Also:


Attachments
HTML that shows a too-large text-indent (782 bytes, text/html)
2023-11-21 13:56 PST, Brad Andalman
no flags Details
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 Details
HTML rendered in Safari 17.1 and STP 183 (130.09 KB, image/png)
2023-11-21 14:37 PST, Brad Andalman
no flags Details
[fast-cq]Patch (6.23 KB, patch)
2023-11-22 19:25 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 Brad Andalman 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.
Comment 1 Brad Andalman 2023-11-21 13:57:53 PST
Created attachment 468717 [details]
HTML rendered using Safari Technology Preview 183, Chrome, and Firefox
Comment 2 Brad Andalman 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.
Comment 3 Brad Andalman 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.
Comment 4 zalan 2023-11-21 18:15:49 PST
Thank you for filing this bug. It looks like we indent the inline content twice as much.
Comment 5 Radar WebKit Bug Importer 2023-11-21 18:16:20 PST
<rdar://problem/118701491>
Comment 6 zalan 2023-11-22 07:45:09 PST
Sadly regressed by a refactoring change (https://commits.webkit.org/267587@main)
Comment 7 zalan 2023-11-22 19:25:02 PST
Created attachment 468737 [details]
[fast-cq]Patch
Comment 8 EWS 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].
Comment 9 Brad West 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).