Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e40e8f4a114877bff811c4b6529cac4145c5dfb3
https://github.com/WebKit/WebKit/commit/e40e8f4a114877bff811c4b6529cac4145c5dfb3
Author: Alan Baradlay <[email protected]>
Date: 2026-09-30 (Wed, 30 Sep 2026)
Changed paths:
M
Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
M
Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.cpp
M
Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.h
Log Message:
-----------
[line-clamp] Do not use the text only line builder for line clamped content
https://bugs.webkit.org/show_bug.cgi?id=325284
<rdar://problem/188394639>
Reviewed by Elika Etemad.
<div style="line-clamp: 2">some text that wraps to more than two lines</div>
Content like this is plain text, so it qualified for TextOnlySimpleLineBuilder,
the fast path for text only content.
This fast path does not know about line-clamp, and the block ellipsis is going
to be placed during line breaking,
which only LineBuilder is going to support. Legacy -webkit-line-clamp keeps
using the fast path, since it adds its
ellipsis after line breaking.
No change in rendering expected.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layout):
* Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.cpp:
(WebCore::Layout::TextOnlySimpleLineBuilder::isEligibleForSimplifiedTextOnlyInlineLayoutByContent):
* Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.h:
Canonical link: https://commits.webkit.org/322294@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications