Closed Bug 1917093 Opened 1 year ago Closed 1 year ago

[wpt-sync] Sync PR 47993 - [line-clamp] Change the computed value of `display: -webkit-box` when used with `line-clamp`

Categories

(Core :: Layout: Scrolling and Overflow, task, P4)

task

Tracking

()

RESOLVED FIXED
132 Branch
Tracking Status
firefox132 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Andreu Botella <abotella@igalia.com> wrote:

[line-clamp] Change the computed value of display: -webkit-box when used with line-clamp

The legacy -webkit-line-clamp CSS property requires the properties
display: -webkit-box (or -webkit-inline-box) and
-webkit-box-orient: vertical to work. These keywords of the
display property are legacy versions of flex (and inline-flex),
but in modern implementations of -webkit-line-clamp (including the
LayoutNG one) they instead create a BFC when all three properties are
present.

In Chromium's implementation this was done by creating a
LayoutBlockFlow rather than a LayoutFlexibleBox when creating a
layout object for the element. However, Gecko instead set the computed
value of display to flow-root (or inline-block). In
https://github.com/w3c/csswg-drafts/issues/10435 the CSSWG resolved to
go with Gecko's behavior on this. This patch implements this computed
style adjustment.

For web compatibility, it must still be the case that
-webkit-line-clamp will not do anything if the specified value of
display is not -webkit-box (or -webkit-inline-box). Therefore,
this patch needs to add a computed style extra field
IsSpecifiedDisplayWebkitBox to track this state.

This behavior is implemented behind an enabled-by-default runtime flag
so it can be easily rolled back if web compatibility issues are found.

Bug: 40336192, 346759535, 362756798
Change-Id: Id5737af8d01f8cd450a379cbd088951a2a14058b
Reviewed-on: https://chromium-review.googlesource.com/5836688
WPT-Export-Revision: bd9dc85d2388cf401e231123eb61f777e92e348f

Component: web-platform-tests → Layout: Scrolling and Overflow
Product: Testing → Core

CI Results

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

Total 2 tests

Status Summary

Firefox

OK : 1
PASS: 16[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, 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] 17[Gecko-linux1804-64-qr-debug]
FAIL: 1

Chrome

OK : 1
PASS: 20
FAIL: 7

Safari

OK : 1
PASS: 14
FAIL: 3

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /css/css-overflow/line-clamp/webkit-line-clamp-048.html [wpt.fyi]: FAIL [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, 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], PASS [Gecko-linux1804-64-qr-debug] (Chrome: FAIL, Safari: FAIL)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1c3ea99f7c76 [wpt PR 47993] - [line-clamp] Change the computed value of `display: -webkit-box` when used with `line-clamp`, a=testonly https://hg.mozilla.org/integration/autoland/rev/76b7200727a1 [wpt PR 47993] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
You need to log in before you can comment on or make changes to this bug.