WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
329840
[line-clamp] Share the text truncation of content and the block ellipsis
https://bugs.webkit.org/show_bug.cgi?id=329840
Summary
[line-clamp] Share the text truncation of content and the block ellipsis
Christian Biesinger
Reported
2026-11-02 10:50:00 PST
text-overflow truncates two things: the line's content, in truncate() / truncateTextContentWithMismatchingDirection(), and a block ellipsis that still overflows the line, in truncateBlockEllipsisForTextOverflow() (added in
bug 329149
). The block ellipsis has its own copy of the truncation rules, because TextUtil::breakWord only works on an InlineTextBox. The copy covers which end overflows in each direction, the first-character rule and the measuring, and the two copies can drift apart. Alan asked for this follow-up in
https://github.com/WebKit/WebKit/pull/78499
. Plan: - Make TextUtil::breakWord usable on any string, by measuring through a width function. - Use one truncation routine for both content and the block ellipsis.
Attachments
Add attachment
proposed patch, testcase, etc.
Christian Biesinger
Comment 1
2026-11-02 10:55:38 PST
Pull request:
https://github.com/WebKit/WebKit/pull/79330
EWS
Comment 2
2026-11-03 20:00:48 PST
Committed
325687@main
(f91ce22de428): <
https://commits.webkit.org/325687@main
> Reviewed commits have been landed. Closing PR #79330 and removing active labels.
Radar WebKit Bug Importer
Comment 3
2026-11-03 20:01:18 PST
<
rdar://problem/191760915
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug