Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3a568ef9348ca67eadd4f7fa5a380ff533bad336
https://github.com/WebKit/WebKit/commit/3a568ef9348ca67eadd4f7fa5a380ff533bad336
Author: Alan Baradlay <[email protected]>
Date: 2026-04-14 (Tue, 14 Apr 2026)
Changed paths:
M LayoutTests/TestExpectations
M Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp
Log Message:
-----------
Removing block between inline and float should put the two on the same line
https://bugs.webkit.org/show_bug.cgi?id=286883
<rdar://problem/144481961>
Reviewed by Antti Koivisto.
When a block element between an inline-block and a float is removed
(e.g. via display:none), the float should end up inside the same
anonymous wrapper block as the inline-block. Instead, the float was
left as a sibling of the anonymous block, causing it to be laid out
in the wrong position.
The tree builder's detach logic already handles merging two adjacent
anonymous blocks when the block between them is removed, but it didn't
handle the case where one side is an anonymous block and the other is
a float. The fix moves adjacent floats into the previous anonymous
block after a block removal, matching what the attach path already
does when a float is inserted next to an anonymous block.
* LayoutTests/TestExpectations:
* Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp:
(WebCore::RenderTreeBuilder::Block::detach):
Canonical link: https://commits.webkit.org/311226@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications