Skip to content

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

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

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

Conversation

@annevk

@annevk annevk commented Oct 25, 2026

Copy link
Copy Markdown
Member

WebKit export from bug: [block-in-inline] A block whose content is a table is treated as self-collapsing

[block-in-inline] A block whose content is a table is treated as self-collapsing

LineLayout::isSelfCollapsingContent() looks for the block level box on a line so it can ask whether that
box is self-collapsing. It iterates the line's display boxes with

    for (auto index = line.firstBoxIndex(); index < line.lastBoxIndex(); ++index)

but lastBoxIndex() is firstBoxIndex() + boxCount() - 1, an inclusive index, so the last box on the line is
never examined. A block level box on a line is typically the last box on it, in which case the look-up
returns nullptr and the "renderBox && !renderBox->isSelfCollapsingBlock()" test is skipped altogether.

WebKit-Bug: https://bugs.webkit.org/show_bug.cgi?id=321198
WebKit-Canonical-Link: https://commits.webkit.org/318782@main

…-collapsing

LineLayout::isSelfCollapsingContent() looks for the block level box on a line so it can ask whether that
box is self-collapsing. It iterates the line's display boxes with

    for (auto index = line.firstBoxIndex(); index < line.lastBoxIndex(); ++index)

but lastBoxIndex() is firstBoxIndex() + boxCount() - 1, an inclusive index, so the last box on the line is
never examined. A block level box on a line is typically the last box on it, in which case the look-up
returns nullptr and the "renderBox && !renderBox->isSelfCollapsingBlock()" test is skipped altogether.

WebKit-Bug: https://bugs.webkit.org/show_bug.cgi?id=321198
WebKit-Canonical-Link: https://commits.webkit.org/318782@main

@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