Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1f762c715f3c5a90f5e500df0a9249fced7f37a5
https://github.com/WebKit/WebKit/commit/1f762c715f3c5a90f5e500df0a9249fced7f37a5
Author: Alan Baradlay <[email protected]>
Date: 2026-02-12 (Thu, 12 Feb 2026)
Changed paths:
A
LayoutTests/fast/inline/margin-with-float-and-block-in-inline-expected.html
A LayoutTests/fast/inline/margin-with-float-and-block-in-inline.html
M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h
Log Message:
-----------
[block-in-inline] Incorrect inline content position when float and margin are
present
https://bugs.webkit.org/show_bug.cgi?id=307608
Reviewed by Antti Koivisto.
While floats need to know about margins on blocks, they are supposed to be
transparent to margin collapsing.
Test: fast/inline/margin-with-float-and-block-in-inline.html
* LayoutTests/fast/inline/margin-with-float-and-block-in-inline-expected.html:
Added.
* LayoutTests/fast/inline/margin-with-float-and-block-in-inline.html: Added.
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::applyMarginInBlockDirectionIfNeeded):
Only reset margins when we see inline (inflow) content.
(WebCore::Layout::LineBuilder::tryPlacingFloatBox):
(WebCore::Layout::LineBuilder::handleInlineContent):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h:
Canonical link: https://commits.webkit.org/307393@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications