Closed Bug 2082331 Opened 1 month ago Closed 28 days ago

[wpt-sync] Sync PR 63645 - Update baseline-related tests for -webkit-line-clamp

Categories

(Core :: Layout: Block and Inline, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 63645 into mozilla-central (this bug is closed when the sync is complete).

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

Andreu Botella <abotella@igalia.com> wrote:

Update baseline-related tests for -webkit-line-clamp

The tests changed in this patch are all baseline alignment tests that involve -webkit-line-clamp containers which are sized according to their intrinsic inline sizes (because they're in grid or flex layout, or because they're atomic inlines), and which only contain atomic inlines.

With the legacy implementation of -webkit-line-clamp in all mainstream browsers, characters and atomic inlines could be hid in order to place the ellipsis, but that didn't affect layout, including baselines. With the spec'd behavior of (-webkit-)line-clamp, though, removing characters and atomic inlines does affect layout.

The reason the ellipsis needs to remove the atomic inline is because all of the contents of the line-clamp containers have a single atomic inline per line, and the intrinsic sizing ignores any effect the ellipsis might have (see w3c/csswg-drafts#14239). Therefore, when the ellipsis needs to be placed, it must remove content, which happens to be the atomic inline which is causing the baseline effect these tests expect.

To fix this, this patch adds a line-clamp declaration with the no-ellipsis keyword, so there is no ellipsis that will result in the atomic inlines to be removed. This is added after each -webkit-line-clamp declaration, assuming that all browsers that support -webkit-line-clamp but not line-clamp will have the legacy ellipsis behavior.

Component: web-platform-tests → Layout: Block and Inline
Product: Testing → Core
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → INVALID
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 511 tests and 12 subtests

Status Summary

Firefox

OK : 12[GitHub] 335[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 273[GitHub] 2386[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 2542[Gecko-android-em-14-x86_64-debug-geckoview] 2544[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 2545[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 2548[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 7[GitHub] 83[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 97[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 100[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 101[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 103[Gecko-android-em-14-x86_64-debug-geckoview]

Chrome

OK : 12
PASS: 280

Safari

OK : 12
PASS: 197
FAIL: 83

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://github.com/mozilla-firefox/firefox/commit/da0d1fcb9782 https://hg.mozilla.org/integration/autoland/rev/2487ed0e3021 [wpt PR 63645] - Update baseline-related tests for -webkit-line-clamp, a=testonly
Status: REOPENED → RESOLVED
Closed: 1 month ago → 28 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.