[wpt-sync] Sync PR 65075 - [line-clamp] Remove characters when ellipsizing only if no breakpoints
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox163 fixed)
| Tracking | Status | |
|---|---|---|
| firefox163 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 65075 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/65075
Details from upstream follow.
Andreu Botella <abotella@igalia.com> wrote:
[line-clamp] Remove characters when ellipsizing only if no breakpoints
The
line-clampellipsis is different totext-overflow: ellipsisin
that rather than truncating characters off the visual end of the line,
instead the text is truncated up to the last logical breakpoint that
would still fit the ellipsis in the line. This means this handling had
to be implemented as part of the line breaking, rather than as a
post-processing effect.However, this also meant that if there are no breakpoints in the line
that would allow placing the ellipsis without overflow (because of a
really long word, or more likely, because of line wrapping is not
allowed), then the whole line's content would be displaced and
replaced with the ellipsis.Recently, this behavior came into question in
https://github.com/w3c/csswg-drafts/issues/14448, with Mozilla calling
this a bad result. The conclusion of this thread (proposed as an async
resolution) is that ellipsizing at breakpoints is still preferred, but
if there are no breakpoints available, then characters should be
removed off the (logical) end of the line, as withoverflow-wrap: anywhere. This would also apply when line wrapping is disabled, and
breaking around spaces would then behave as forbreak-spaces.This CL implements this and adds some basic tentative tests. However,
a number of the existing WPT tests (especiallyblock-ellipsis-*)
need to be modified, and some need to be reworked to find a different
way to test the same behavior. We think the best way to do this
refactoring is in an upstream WPT to be reviewed by the spec editor,
rather than downstream in Chromium.Bug: 40336192
Change-Id: I52bafa201b962b441b96e66bc91476e280b37e63
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8795375
Commit-Queue: Andreu Botella \<abotella@igalia.com>
Reviewed-by: Koji Ishii \<kojii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1742566}
| Assignee | ||
Updated•12 days ago
|
| Assignee | ||
Updated•12 days ago
|
| Assignee | ||
Comment 1•12 days ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=123291
| Assignee | ||
Comment 2•12 days ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 3 tests
Status Summary
Firefox
FAIL: 3
Chrome
FAIL: 3
Safari
FAIL: 3
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /css/css-overflow/line-clamp/block-ellipsis-043.tentative.html [wpt.fyi]:
FAIL(Chrome:FAIL, Safari:FAIL) - /css/css-overflow/line-clamp/block-ellipsis-044.tentative.html [wpt.fyi]:
FAIL(Chrome:FAIL, Safari:FAIL) - /css/css-overflow/line-clamp/block-ellipsis-045.tentative.html [wpt.fyi]:
FAIL(Chrome:FAIL, Safari:FAIL)
Comment 4•10 days ago
|
||
| bugherder | ||
Description
•