Repository navigation
Conversation
…a line between two block level boxes
<span style="-webkit-box-decoration-break: clone; border: 20px solid magenta">
a
<div>block</div>
<span></span>
<div>block</div>
c
</span>
The two block level boxes should be right next to each other, the way they are in
Blink. Instead a 20px tall line with a 40px wide magenta border box showed up
between them, for the empty inline box.
The test case is adapted from Oriol Brufau's reduction in
w3c/csswg-drafts#14104
Line::initialize hands a line spanning inline box run the width of its cloned
decoration, so isContentfulOrHasDecoration answered "contentful" on its very first
check (run.logicalWidth()) and the line got a full strut. The fragment's display box
was then built from the border box, so all four cloned edges painted.
Cloned decoration wraps the content of a box fragment, so it can't make a line
contentful by itself. A line spanning inline box start no longer does, and on a line
with no inline content its display box uses the content box -the rule block lines
already followed. This matches Blink.
WebKit-Bug: https://bugs.webkit.org/show_bug.cgi?id=321143
WebKit-Canonical-Link: https://commits.webkit.org/318718@main
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
wpt-pr-bot
approved these changes
Oct 25, 2026
wpt-pr-bot
left a comment
Collaborator
There was a problem hiding this comment.
The review process for this patch is being conducted in the WebKit project.
annevk
enabled auto-merge (rebase)
October 25, 2026 08:55
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WebKit export from bug: [IFC] Inline box with cloned decoration generates an extra line between two block level boxes
[block-in-inline] Inline box with cloned decoration generates an extra line between two block level boxes <span style="-webkit-box-decoration-break: clone; border: 20px solid magenta"> a <div>block</div> <span></span> <div>block</div> c </span> The two block level boxes should be right next to each other, the way they are in Blink. Instead a 20px tall line with a 40px wide magenta border box showed up between them, for the empty inline box. The test case is adapted from Oriol Brufau's reduction in w3c/csswg-drafts#14104 Line::initialize hands a line spanning inline box run the width of its cloned decoration, so isContentfulOrHasDecoration answered "contentful" on its very first check (run.logicalWidth()) and the line got a full strut. The fragment's display box was then built from the border box, so all four cloned edges painted. Cloned decoration wraps the content of a box fragment, so it can't make a line contentful by itself. A line spanning inline box start no longer does, and on a line with no inline content its display box uses the content box -the rule block lines already followed. This matches Blink. WebKit-Bug: https://bugs.webkit.org/show_bug.cgi?id=321143 WebKit-Canonical-Link: https://commits.webkit.org/318718@main Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>