RESOLVED FIXED 267846
(REGRESSION 262652@main): box-decoration-break: clone is not taken into account when breaking lines
https://bugs.webkit.org/show_bug.cgi?id=267846
Summary (REGRESSION 262652@main): box-decoration-break: clone is not taken into accou...
Johannes Odland
Reported 2024-01-22 01:10:21 PST
Created attachment 469494 [details] A screenshot of the issue in iOS 17 simulator The issue with box-decoration-break reported and fixed in https://bugs.webkit.org/show_bug.cgi?id=223687 seems to have returned. Steps to reproduce the problem: 1. Add a span inside a div. 2. Define a width on the div. 3. Set `box-decoration-break: clone`, `padding: 15px` and `word-break: break-all` on the span. 4. Fill the span with text. https://johannesodland.github.io/browserbugs/safari-box-decoration-break-clone-padding-ignored-issue.html What is the expected behavior? The padding added on each line through `box-decoration-break: clone` should be accounted for when breaking lines. Each padding-box should stay within the container. What went wrong? The extra padding is not accounted for when breaking lines and the extra padding overflows the container. Did this work before? Yes, it worked in Safari 16.4 Does this work in other browsers? Yes, it works in Firefox
Attachments
A screenshot of the issue in iOS 17 simulator (265.08 KB, image/png)
2024-01-22 01:10 PST, Johannes Odland
no flags
Fixed clone (screen recording) (3.89 MB, video/quicktime)
2025-05-06 17:19 PDT, alan
no flags
Patch (34.47 KB, patch)
2025-05-06 19:50 PDT, alan
no flags
Patch (34.40 KB, patch)
2025-05-07 05:21 PDT, alan
no flags
[fast-cq]Patch (38.39 KB, patch)
2025-05-07 10:49 PDT, alan
no flags
Radar WebKit Bug Importer
Comment 1 2024-01-22 10:49:03 PST
alan
Comment 2 2024-01-29 16:18:34 PST
(In reply to Johannes Odland from comment #0) > Created attachment 469494 [details] > A screenshot of the issue in iOS 17 simulator > > The issue with box-decoration-break reported and fixed in > https://bugs.webkit.org/show_bug.cgi?id=223687 seems to have returned. oh noo! Let me figure out what happened here. (and thank you for filing it!)
alan
Comment 3 2024-01-29 16:47:02 PST
This has regressed at 262652@main. It looks like we did not have proper regression test coverage on this (now we do!).
alan
Comment 4 2024-01-29 16:47:56 PST
fixing it now.
Johannes Odland
Comment 5 2025-04-13 02:04:54 PDT
@zalan Any progress on this?
alan
Comment 6 2025-05-05 13:31:46 PDT
It has partially progressed at 294132@main when only padding end (and I assume border too) is present, but not fully addressed yet...looking into it now.
alan
Comment 7 2025-05-06 17:19:45 PDT
Created attachment 475151 [details] Fixed clone (screen recording) I've got a fix on this (see attachment). Will post the patch soon.
alan
Comment 8 2025-05-06 19:50:41 PDT
alan
Comment 9 2025-05-07 05:21:48 PDT
alan
Comment 10 2025-05-07 10:49:58 PDT
Created attachment 475157 [details] [fast-cq]Patch
EWS
Comment 11 2025-05-07 17:08:38 PDT
Committed 294644@main (e243e0caa9c2): <https://commits.webkit.org/294644@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 475157 [details].
Note You need to log in before you can comment on or make changes to this bug.