Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2f6829bc0e9b663bb2c26bcb544560787a27b137
https://github.com/WebKit/WebKit/commit/2f6829bc0e9b663bb2c26bcb544560787a27b137
Author: Alan Baradlay <[email protected]>
Date: 2026-08-24 (Mon, 24 Aug 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/margin-collapse-after-float-001-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/margin-collapse-after-float-001-ref.html
A
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/margin-collapse-after-float-001.html
M Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp
Log Message:
-----------
[anon-block-removal] Adjoining margins do not collapse when the container's
first child is a float or an out-of-flow box
https://bugs.webkit.org/show_bug.cgi?id=322332
<rdar://problem/185591842>
Reviewed by Antti Koivisto.
RenderTreeBuilder::Block::attach decides childrenInline from the first child
but skips that when the child is
floating or out-of-flow, so a leading float or out-of-flow box leaves the
parent non-empty and the first in-flow
child never reaches the branch that would turn the flag off. A container whose
in-flow children are all block
level then runs an inline formatting context, which leaves adjoining margins
between those boxes uncollapsed,
moves out-of-flow static positions and changes what align-content aligns. Ask
whether an in-flow child has
arrived rather than whether the box is empty, skipping floats, out-of-flow
boxes and an excluded marker.
* Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp:
(WebCore::RenderTreeBuilder::Block::attach):
*
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/margin-collapse-after-float-001.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/margin-collapse-after-float-001-ref.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/margin-collapse-after-float-001-expected.html:
Added.
Canonical link: https://commits.webkit.org/319696@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications