Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6a3177ec0f7bc4db1f3d33dc3d3f408dea1f7927
https://github.com/WebKit/WebKit/commit/6a3177ec0f7bc4db1f3d33dc3d3f408dea1f7927
Author: Alan Baradlay <[email protected]>
Date: 2026-02-20 (Fri, 20 Feb 2026)
Changed paths:
A
LayoutTests/fast/inline/empty-inline-box-position-with-block-and-margin-inside-inline-expected.html
A
LayoutTests/fast/inline/empty-inline-box-position-with-block-and-margin-inside-inline.html
M
LayoutTests/platform/ios/fast/inline/inline-continuation-borders-expected.txt
M
LayoutTests/platform/mac/fast/inline/inline-continuation-borders-expected.txt
M Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineLine.h
M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
Log Message:
-----------
[block-in-inline] Empty <span></span> with decoration is incorrectly
positioned when sibling block margin is present
https://bugs.webkit.org/show_bug.cgi?id=308180
Reviewed by Antti Koivisto.
Inline box with decoration (padding, border, and margin) itself prevents margin
collapsing even
when when it is otherwise empty.
e.g.
<block with margin>
<span with border>
<block with margin>
The inline box with border prevents the 2 blocks from getting their margins
collapsed.
This already works on trunk, what's incorrect though is the inline box's
position.
It is positioned as if the previous block had no margin.
Test:
fast/inline/empty-inline-box-position-with-block-and-margin-inside-inline.html
*
LayoutTests/fast/inline/empty-inline-box-position-with-block-and-margin-inside-inline-expected.html:
Added.
*
LayoutTests/fast/inline/empty-inline-box-position-with-block-and-margin-inside-inline.html:
Added.
* LayoutTests/platform/ios/fast/inline/inline-continuation-borders-expected.txt:
* LayoutTests/platform/mac/fast/inline/inline-continuation-borders-expected.txt:
* Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp:
(WebCore::Layout::Line::hasContentOrDecoration const):
* Source/WebCore/layout/formattingContexts/inline/InlineLine.h:
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::handleInlineContent):
Canonical link: https://commits.webkit.org/307931@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications