Closed Bug 1927054 Opened 1 year ago Closed 1 year ago

[wpt-sync] Sync PR 48817 - [text-box-trim] Trim at the start/end of columns.

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 48817 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/48817
Details from upstream follow.

Morten Stenshorne <mstensho@chromium.org> wrote:

[text-box-trim] Trim at the start/end of columns.

There are now two types of text box trimming: The already existing one,
trimming at the start or end of a node. And the new one, trimming at the
start or end of a fragmentainer. We need to distinguish between these,
since they aren't active at the same times. Therefore, the old "should
text box trim start/end" flags are now qualified with "node" (e.g.
ShouldTextBoxTrimNodeStart()), and the new ones are qualified with
"fragmentainer" (e.g. ShouldTextBoxTrimFragmentainerStart()).

When text-box-trim is specified inside a fragmentation context, it
should not cause trimming at fragmentainer breaks, unless
box-decoration-break is 'clone'. See
https://github.com/w3c/csswg-drafts/issues/5335#issuecomment-1908655635

When text-box-trim is specified on a multicol container (i.e. NOT inside
the fragmentation context that the multicol container establishes), it
should cause trimming at fragmentainer breaks. See
https://github.com/w3c/csswg-drafts/issues/5335#issuecomment-2380160677

Update text-box-trim-multicol-001.html, since we now trim at
fragmentainer boundaries. Also make the multicol container slightly
shorter, to demonstrate that we also trim at the end of columns.

Make the multicol container in text-box-trim-multicol-002.html slightly
taller, to demonstrate that there's trimming at the end of columns in
that case (trimming is specified on a multicol descendant, and
box-decoration-break is not 'clone').

Also add more tests for trimming at column boundaries, and also some
basic printing tests that simply test that text-box trimming still
works, at least when they're not next to a page boundary. Blink (and all
other browsers, I think) cannot paint outside the page area, so trimming
is disabled at page boundaries. There will be an internal WPT test for
that in an upcoming CL.

Set widows and orphans to 1 in the tests. They are not meant to be
affected by orphans / widows requirements anyway, but our widows
calculation code is currently causing trouble for text box trimming (two
different types of relayout not getting along too well), so just set it
to 1 for now. A follow-up CL will fix this.

Bug: 41494433
Change-Id: Ic4fc97ecf4cce3f52d5c3d8d44c3188c53970002
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5961725
Commit-Queue: Morten Stenshorne \<mstensho@chromium.org>
Reviewed-by: Koji Ishii \<kojii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1373770}

PR 48817 applied with additional changes from upstream: 274bd0d593efebce81292bc6f9a8ca58c578e343
Component: web-platform-tests → Layout: Block and Inline
Product: Testing → Core

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 11 tests

Status Summary

Firefox

FAIL: 8[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview] 11[Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt, GitHub]

Chrome

PASS: 4
FAIL: 7

Safari

PASS: 1
FAIL: 7

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bf38d089a241 [wpt PR 48817] - [text-box-trim] Trim at the start/end of columns., a=testonly https://hg.mozilla.org/integration/autoland/rev/a7acde12d20f [wpt PR 48817] - 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.