[wpt-sync] Sync PR 48378 - [line-clamp] [text-box-trim] Make `text-box-trim` work with `line-clamp: auto`
Categories
(Core :: Layout: Block and Inline, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox133 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 48378 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/48378
Details from upstream follow.
Andreu Botella <abotella@igalia.com> wrote:
[line-clamp] [text-box-trim] Make
text-box-trimwork withline-clamp: autoWhen
text-box-trim: trim-endis applied to an element with
line-clamp, it should trim the last line before clamp. This was
previously implemented when clamping by a determined number of lines,
but not when clamping by a height.Since the trimming affects the height of the content, this should be
taken into account when clamping. Therefore, in the initial layout
pass that determines the number of lines that fit in that height, if
text-box-trim: trim-endis set, then every line is trimmed as if it
were the last line before clamp. However, since this might not be the
actual last line before clamp, after laying out the line we make sure
to increase the inflow position's logical block offset so that any
further lines and boxes after it are set at the correct position.Bug: 40336192, 40254880
Change-Id: I7cb19ca7ebadcf60dec587b3f6cbbf7363f7e64f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5893918
Commit-Queue: Andreu Botella \<abotella@igalia.com>
Reviewed-by: Koji Ishii \<kojii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1361770}
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
| Assignee | ||
Comment 2•1 year 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
PASS: 1
FAIL: 2
Safari
FAIL: 3
Links
Details
New Tests That Don't Pass
- /css/css-inline/text-box-trim/text-box-trim-line-clamp-001.html [wpt.fyi]:
FAIL(Chrome:PASS, Safari:FAIL) - /css/css-inline/text-box-trim/text-box-trim-line-clamp-auto-001.html [wpt.fyi]:
FAIL(Chrome:FAIL, Safari:FAIL) - /css/css-inline/text-box-trim/text-box-trim-line-clamp-auto-002.html [wpt.fyi]:
FAIL(Chrome:FAIL, Safari:FAIL)
Comment 4•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/c0a659f0669a
https://hg.mozilla.org/mozilla-central/rev/998ba51960cc
Comment 5•1 year ago
|
||
| bugherder | ||
Description
•