Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5de3fda290ad5cfa729d752fdda84c85ace46070
https://github.com/WebKit/WebKit/commit/5de3fda290ad5cfa729d752fdda84c85ace46070
Author: Alan Baradlay <[email protected]>
Date: 2026-09-16 (Wed, 16 Sep 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/floats/float-wider-than-line-inside-inline-with-block-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/floats/float-wider-than-line-inside-inline-with-block-ref.html
A
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/floats/float-wider-than-line-inside-inline-with-block.html
M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
M
Source/WebCore/layout/integration/LayoutIntegrationFormattingContextLayout.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
M Source/WebCore/rendering/FloatingObjects.cpp
M Source/WebCore/rendering/FloatingObjects.h
M Source/WebCore/rendering/RenderBlockFlow.cpp
M Source/WebCore/rendering/RenderBlockFlow.h
Log Message:
-----------
A float inside an inline box can be positioned twice when the line it was
collected with is discarded
https://bugs.webkit.org/show_bug.cgi?id=324201
rdar://186991431
Reviewed by Antti Koivisto.
<div style="width: 100px">
XX XX XX XX
<span>
<div style="float: left; width: 200px; height: 20px"></div>X
<div style="display: flow-root">X</div>
</span>
</div>
The float should sit at the top of the first line below where it fits. Instead
it
was 20px lower, its own height.
Discarding line content left the float on the suspended list, so the next line
both
resumed it and met its inline item again. Drop it, and re-key the placed floats
tree
when a placed float's rect changes.
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::placeInlineAndFloatContent):
*
Source/WebCore/layout/integration/LayoutIntegrationFormattingContextLayout.cpp:
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::updateRenderTreePositions):
* Source/WebCore/rendering/FloatingObjects.h:
* Source/WebCore/rendering/FloatingObjects.cpp:
(WebCore::FloatingObjects::place): Added.
* Source/WebCore/rendering/RenderBlockFlow.h:
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::placeFloatingBox): Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/floats/float-wider-than-line-inside-inline-with-block.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/floats/float-wider-than-line-inside-inline-with-block-ref.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/floats/float-wider-than-line-inside-inline-with-block-expected.html:
Added.
Canonical link: https://commits.webkit.org/321274@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications