Closed Bug 1921781 Opened 1 year ago Closed 1 year ago

[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)

task

Tracking

()

RESOLVED FIXED
133 Branch
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-trim work with line-clamp: auto

When text-box-trim: trim-end is 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-end is 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}

Component: web-platform-tests → Layout: Block and Inline
Product: Testing → Core

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

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c0a659f0669a [wpt PR 48378] - [line-clamp] [text-box-trim] Make `text-box-trim` work with `line-clamp: auto`, a=testonly https://hg.mozilla.org/integration/autoland/rev/998ba51960cc [wpt PR 48378] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
You need to log in before you can comment on or make changes to this bug.