Closed Bug 2095330 Opened 12 days ago Closed 10 days ago

[wpt-sync] Sync PR 65075 - [line-clamp] Remove characters when ellipsizing only if no breakpoints

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox163 fixed)

RESOLVED FIXED
163 Branch
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-clamp ellipsis is different to text-overflow: ellipsis in
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 with overflow-wrap: anywhere. This would also apply when line wrapping is disabled, and
breaking around spaces would then behave as for break-spaces.

This CL implements this and adds some basic tentative tests. However,
a number of the existing WPT tests (especially block-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}

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

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

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/23ba72de9a7f https://hg.mozilla.org/integration/autoland/rev/ee4aecb8966b [wpt PR 65075] - [line-clamp] Remove characters when ellipsizing only if no breakpoints, a=testonly
Status: NEW → RESOLVED
Closed: 10 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.