[wpt-sync] Sync PR 52120 - [line-clamp] Make `text-overflow: ellipsis` work inside `line-clamp`
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox140 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 52120 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/52120
Details from upstream follow.
Andreu Botella <abotella@igalia.com> wrote:
[line-clamp] Make
text-overflow: ellipsis
work insideline-clamp
Since
-webkit-line-clamp
was first implemented in Webkit, using line
clamping would preventtext-overflow: ellipsis
from working inside
the line clamp container. This seems to have been a side effect of the
initial implementation, and it was kept as it was when the
implementation was redone for LayoutNG, even though that is no longer
a side effect.Recently, in https://github.com/w3c/csswg-drafts/issues/10823 the
CSSWG resolved thattext-overflow: ellipsis
should apply inside a
line-clamp container. For the last line until clamp, if
text-overflow: ellipsis
also applies to it, the line clamp ellipsis
is applied first -- however, since we currently only support ellipsis,
rather than a text string, for both thetext-overflow
and line-clamp
ellipses, this would be identical to only applying the line clamp
ellipsis.This change also removes the
LineClampData::State::kDontTruncate
state, which was set when there was no possibility of clamping, but
text-overflow: ellipsis
should still not apply because we were still
inside the line-clamp container. Sincetext-overflow: ellipsis
now
should apply in those cases, we remove that state, and usekDisabled
instead. We also add anignore_line_clamp
flag to
BlockLineClampData
to know to ignore the line-clamp properties when
performing a relayout without clamping.Additionally, this change updates some WPT tests that were rendered
incorrect with this resolution.Bug: 40336192, 407971271
Change-Id: I06e43011a12ba27507b6f661c7b0484d6587cf19
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6470150
Reviewed-by: Ian Kilpatrick \<ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii \<kojii@chromium.org>
Commit-Queue: Andreu Botella \<abotella@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1451710}
Assignee | ||
Updated•19 days ago
|
Assignee | ||
Comment 1•19 days ago
|
||
Assignee | ||
Comment 2•19 days ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 4 tests
Status Summary
Firefox
PASS
: 1
FAIL
: 3
Chrome
FAIL
: 4
Safari
PASS
: 1
FAIL
: 3
Links
Details
New Tests That Don't Pass
- /css/css-overflow/line-clamp/line-clamp-auto-009.tentative.html [wpt.fyi]:
FAIL
(Chrome:FAIL
, Safari:FAIL
) - /css/css-overflow/line-clamp/webkit-line-clamp-036.html [wpt.fyi]:
FAIL
(Chrome:FAIL
, Safari:FAIL
) - /css/css-overflow/line-clamp/webkit-line-clamp-037.html [wpt.fyi]:
FAIL
(Chrome:FAIL
, Safari:FAIL
)
Comment 4•15 days ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ab51b6e73ebf
https://hg.mozilla.org/mozilla-central/rev/2c86ab448658
Description
•