Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: defc6ff688ddf3228205fa9610ca67e251d7c297
https://github.com/WebKit/WebKit/commit/defc6ff688ddf3228205fa9610ca67e251d7c297
Author: Alan Baradlay <[email protected]>
Date: 2026-08-05 (Wed, 05 Aug 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/block-in-inline-margin-after-relayout-001-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/block-in-inline-margin-after-relayout-001.html
A
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/block-in-inline-margin-after-relayout-002-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/block-in-inline-margin-after-relayout-002.html
M
Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp
Log Message:
-----------
[block-in-inline] Margin after a block level box on a line is lost on relayout
https://bugs.webkit.org/show_bug.cgi?id=321091
Reviewed by Antti Koivisto.
Laying the block level box out is what produces the margin it hands to the
lines after it. A partial layout
that resumes at a later line never re-runs the block, so the rest of the
content runs with an empty margin
state and the margin is simply dropped. partialContentTop compounds it: it is
derived from the previous
line's lineBoxLogicalRect().maxY(), which excludes the margin.
Bail to a full layout when any line before the damaged one holds a block level
box. This is conservative
but the alternative is replaying the margin contribution of every preceding
block level line without
laying those blocks out.
*
Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp:
(WebCore::Layout::InlineInvalidation::updateInlineDamage):
*
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/block-in-inline-margin-after-relayout-001.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/block-in-inline-margin-after-relayout-001-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/block-in-inline-margin-after-relayout-002.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/block-in-inline-margin-after-relayout-002-expected.txt:
Added.
Canonical link: https://commits.webkit.org/318660@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications