Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 34bfa42975688fe514cc1530048a2fca6c60ec88
https://github.com/WebKit/WebKit/commit/34bfa42975688fe514cc1530048a2fca6c60ec88
Author: Alan Baradlay <[email protected]>
Date: 2026-10-11 (Sun, 11 Oct 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/line-clamp/line-clamp-043-expected.xht
A
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/line-clamp/line-clamp-043.html
M
Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
Log Message:
-----------
[line-clamp] Positioned inline-block after the clamp point is visible
https://bugs.webkit.org/show_bug.cgi?id=327060
<rdar://problem/189672687>
Reviewed by Antti Koivisto.
<div style="line-clamp: 2">Line 1<br><span style="display: inline-block;
position: relative; width: 20px; height: 20px; background: blue"></span></div>
(and then line-clamp: 1)
The inline-block keeps painting where it was before it got clamped.
"Within a line-clamp container, the following boxes and line boxes become
invisible boxes:
- Any in-flow or floating boxes that follow the clamp point in the box tree."
https://drafts.csswg.org/css-overflow-4/#line-clamp-containers
Atomic inline-level boxes after the clamp point have no display boxes, which is
how they normally stay hidden, but one with
its own layer paints through the layer, with whatever geometry it had before it
got clamped.
Now inline layout marks discarded atomic inline-level boxes as invisible boxes
too.
Test:
imported/w3c/web-platform-tests/css/css-overflow/line-clamp/line-clamp-043.html
*
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/line-clamp/line-clamp-043-expected.xht:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/line-clamp/line-clamp-043.html:
Added.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::resetBoxGeometriesForDiscardedContent):
Canonical link: https://commits.webkit.org/323402@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications