Skip to content

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=321143 - #64189

Open
annevk wants to merge 1 commit into
web-platform-tests:masterfrom
annevk:wpt-export-for-webkit-321143
Open

annevk wants to merge 1 commit into
web-platform-tests:masterfrom
annevk:wpt-export-for-webkit-321143

Conversation

@annevk

@annevk annevk commented Oct 25, 2026

Copy link
Copy Markdown
Member

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>

…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 wpt-pr-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the WebKit project.

@annevk
annevk enabled auto-merge (rebase) October 25, 2026 08:55

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants