Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 120aa0417b02b75593c2789d39fb4cb41502fb91
https://github.com/WebKit/WebKit/commit/120aa0417b02b75593c2789d39fb4cb41502fb91
Author: Alan Baradlay <[email protected]>
Date: 2026-02-22 (Sun, 22 Feb 2026)
Changed paths:
A LayoutTests/fast/inline/block-in-inline-with-out-of-flow-box-expected.html
A LayoutTests/fast/inline/block-in-inline-with-out-of-flow-box.html
M LayoutTests/platform/glib/fast/invalid/004-expected.txt
M LayoutTests/platform/glib/tables/mozilla/bugs/bug113235-3-expected.txt
M LayoutTests/platform/ios/fast/invalid/004-expected.txt
M LayoutTests/platform/ios/tables/mozilla/bugs/bug113235-3-expected.txt
M LayoutTests/platform/mac/fast/invalid/004-expected.txt
M LayoutTests/platform/mac/tables/mozilla/bugs/bug113235-3-expected.txt
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineLine.h
M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
Log Message:
-----------
[block-in-inline] Consider margin of preceding block when placing out-of-flow
box inside inline
https://bugs.webkit.org/show_bug.cgi?id=308072
<rdar://problem/170587347>
Reviewed by Antti Koivisto.
When computing the static position of an out-of-flow box, we treat it as if was
in-flow box and
by definition margin from previous block content should be accounted for (not
not collapsed or changed in any way -see ShouldResetMarginValues::No)
This is a special case though when there's no adjacent inflow content (see the
m_line.hasContentOrListMarker() check)
e.g.
<span>
<div></div>
<div out-of-flow></div>
<div></div>
</span>
as usually such out-of-flow content is accompanied by some inline inflow content
where the inline content makes us apply the margin (from previous block).
Test: fast/inline/block-in-inline-with-out-of-flow-box.html
* LayoutTests/fast/inline/block-in-inline-with-out-of-flow-box-expected.html:
Added.
* LayoutTests/fast/inline/block-in-inline-with-out-of-flow-box.html: Added.
* LayoutTests/platform/glib/fast/invalid/004-expected.txt:
* LayoutTests/platform/glib/tables/mozilla/bugs/bug113235-3-expected.txt:
* LayoutTests/platform/ios/fast/invalid/004-expected.txt:
* LayoutTests/platform/ios/tables/mozilla/bugs/bug113235-3-expected.txt:
* LayoutTests/platform/mac/fast/invalid/004-expected.txt:
* LayoutTests/platform/mac/tables/mozilla/bugs/bug113235-3-expected.txt:
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp:
(WebCore::Layout::InlineFormattingUtils::logicalTopForNextLine const):
* Source/WebCore/layout/formattingContexts/inline/InlineLine.h:
(WebCore::Layout::Line::hasLineSpanningInlineBoxOnly const):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::handleInlineContent):
Canonical link: https://commits.webkit.org/308008@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications