Closed Bug 1623347 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 22318 - [css-variables] Custom props with invalid var() should behave as 'unset'

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Anders Hartvoll Ruud <andruud@chromium.org> wrote:

[css-variables] Custom props with invalid var() should behave as 'unset'

We currently have a (WPT-enforced) bug where custom properties that
reference guaranteed-invalid values [1] behave themselves as guaranteed-
invalid. This is not correct per spec, which requires the custom
property to behave as 'unset' in this case. This was clarified in [2],
although the spec has described this behavior long before that.

Unfortunately Firefox has the same issue. Safari on the other hand, does
implement it correctly.

[1] https://drafts.csswg.org/css-variables/#guaranteed-invalid
[2] https://github.com/w3c/csswg-drafts/issues/4075

Bug: 980930
Change-Id: I84a0da3aad6b72b574009d560eb868632769098a

Reviewed-on: https://chromium-review.googlesource.com/2108026
WPT-Export-Revision: 32437391c742c46cf5f228911f2ea26104b57233

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core

CI Results

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

Total 49 tests

Status Summary

Firefox

OK : 3
PASS: 32[GitHub] 78[Gecko-android-em-7.0-x86_64-debug-geckoview, Gecko-android-em-7.0-x86_64-opt-geckoview, Gecko-linux1804-64-asan-opt, Gecko-linux1804-64-debug, Gecko-linux1804-64-opt, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows10-64-debug, Gecko-windows10-64-opt, Gecko-windows10-64-qr-debug, Gecko-windows10-64-qr-opt, Gecko-windows7-32-debug, Gecko-windows7-32-opt]
FAIL: 4

Chrome

OK : 3
PASS: 32
FAIL: 4

Safari

OK : 3
PASS: 36

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/css/css-variables/variable-substitution-variable-declaration.html
target10 --varC: FAIL (Chrome: FAIL, Safari: PASS)
/css/css-variables/variables-substitute-guaranteed-invalid.html
A custom property referencing a cycle is treated as unset: FAIL (Chrome: FAIL, Safari: PASS)
A custom property referencing a non-existent variable is treated as unset: FAIL (Chrome: FAIL, Safari: PASS)
/css/css-env/env-in-custom-properties.tentative.html
Substitution of unrecognized env() causes unset: FAIL (Chrome: FAIL, Safari: PASS)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/aaae9e1c2096
[wpt PR 22318] - [css-variables] Custom props with invalid var() should behave as 'unset', a=testonly
https://hg.mozilla.org/integration/autoland/rev/5aee8d602e5a
[wpt PR 22318] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
You need to log in before you can comment on or make changes to this bug.