Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0848b3fb1bb07d7db687e1a6a60fcbe5f333e9b6
      
https://github.com/WebKit/WebKit/commit/0848b3fb1bb07d7db687e1a6a60fcbe5f333e9b6
  Author: Alan Baradlay <[email protected]>
  Date:   2026-08-07 (Fri, 07 Aug 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/block-with-table-content-is-not-self-collapsing-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/block-with-table-content-is-not-self-collapsing.html
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp

  Log Message:
  -----------
  [block-in-inline] A block whose content is a table is treated as 
self-collapsing
https://bugs.webkit.org/show_bug.cgi?id=321198

Reviewed by Antti Koivisto.

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.

* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::isSelfCollapsingContent const):
* 
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/block-with-table-content-is-not-self-collapsing.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/block-with-table-content-is-not-self-collapsing-expected.txt:
 Added.

Canonical link: https://commits.webkit.org/318782@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to