Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6c0e799bd75417e3d6a5727f207787803f3659c1
https://github.com/WebKit/WebKit/commit/6c0e799bd75417e3d6a5727f207787803f3659c1
Author: Alan Baradlay <[email protected]>
Date: 2026-08-06 (Thu, 06 Aug 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/nested-inline-boxes-around-block-in-inline-001-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/nested-inline-boxes-around-block-in-inline-001.html
M LayoutTests/platform/glib/fast/encoding/utf-16-big-endian-expected.txt
M LayoutTests/platform/glib/fast/encoding/utf-16-little-endian-expected.txt
M LayoutTests/platform/glib/tables/mozilla/bugs/bug113235-3-expected.txt
M LayoutTests/platform/ios/tables/mozilla/bugs/bug113235-3-expected.txt
M LayoutTests/platform/mac/fast/encoding/utf-16-big-endian-expected.txt
M LayoutTests/platform/mac/fast/encoding/utf-16-little-endian-expected.txt
M LayoutTests/platform/mac/tables/mozilla/bugs/bug113235-3-expected.txt
M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp
Log Message:
-----------
[block-in-inline] Nested inline boxes around a block level box are stretched
by their nesting depth
https://bugs.webkit.org/show_bug.cgi?id=321117
Reviewed by Antti Koivisto.
An InlineLevelBox's logical top is stored relative to its parent inline box -
LineBox::inlineLevelBoxAbsoluteTop
walks the ancestor chain adding each one up.
LineBoxBuilder::constructBlockContent was assigning the same
absolute value to every line spanning inline box around the block:
lineSpanningInlineBox.setLogicalTop(blockGeometry.marginBefore());
so the offset was counted once per nesting level. With a 16px offset, three
levels of inline boxes ended up at
16, 32 and 48, and the innermost one was stretched past its own content -
taller than the box containing it,
which cannot be right.
Only the outermost spanning box may carry that offset; the nested ones are
already positioned relative to it.
The positions of the content were always correct - this is purely the inline
boxes' reported bounds, which
linesBoundingBox() exposes to the render tree dump, to getBoundingClientRect()
and to getClientRects().
* Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:
(WebCore::Layout::LineBoxBuilder::constructBlockContent):
*
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/nested-inline-boxes-around-block-in-inline-001.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/normal-flow/nested-inline-boxes-around-block-in-inline-001-expected.txt:
Added.
* LayoutTests/platform/glib/fast/encoding/utf-16-big-endian-expected.txt:
* LayoutTests/platform/glib/fast/encoding/utf-16-little-endian-expected.txt:
* LayoutTests/platform/glib/tables/mozilla/bugs/bug113235-3-expected.txt:
* LayoutTests/platform/ios/tables/mozilla/bugs/bug113235-3-expected.txt:
* LayoutTests/platform/mac/fast/encoding/utf-16-big-endian-expected.txt:
* LayoutTests/platform/mac/fast/encoding/utf-16-little-endian-expected.txt:
* LayoutTests/platform/mac/tables/mozilla/bugs/bug113235-3-expected.txt:
Canonical link: https://commits.webkit.org/318704@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications