Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: feedd640804745dd74acb30f6e946774eb722f8f
https://github.com/WebKit/WebKit/commit/feedd640804745dd74acb30f6e946774eb722f8f
Author: Alan Baradlay <[email protected]>
Date: 2025-12-27 (Sat, 27 Dec 2025)
Changed paths:
A LayoutTests/fast/flexbox/legacy-line-clamp-on-display-block-expected.html
A LayoutTests/fast/flexbox/legacy-line-clamp-on-display-block.html
M LayoutTests/fast/overflow/line-clamp-on-last-formatted-line-expected.html
M LayoutTests/fast/overflow/line-clamp-on-last-formatted-line.html
M Source/WebCore/rendering/LineClampUpdater.h
Log Message:
-----------
-webkit-line-clamp doesn't support inline-block children
https://bugs.webkit.org/show_bug.cgi?id=301944
<rdar://problem/164488778>
Reviewed by Antti Koivisto.
Let's not propagate legacy line-clamp to inline-block containers.
While propagation should happen across block level containers, inline blocks
are quite different as they already participate in the parent inline layout
(they themselves sit on lines) and
the lines they produce are visually detached from the line-clamp flow.
e.g.
<div line-clamp: 2>
text before
<div style="display: inline-block>first<br>second<br>thrid</div>
text after
</div>
first
second
text before third text after
(should not clamp after "second")
This also aligns with Chrome's behavior.
Test: fast/flexbox/legacy-line-clamp-on-display-block.html
* LayoutTests/fast/flexbox/legacy-line-clamp-on-display-block-expected.html:
Added.
* LayoutTests/fast/flexbox/legacy-line-clamp-on-display-block.html: Added.
* LayoutTests/fast/overflow/line-clamp-on-last-formatted-line-expected.html:
* LayoutTests/fast/overflow/line-clamp-on-last-formatted-line.html:
* Source/WebCore/rendering/LineClampUpdater.h:
(WebCore::LineClampUpdater::LineClampUpdater):
Canonical link: https://commits.webkit.org/304956@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications