Closed Bug 2080661 Opened 1 month ago Closed 8 days ago

[wpt-sync] Sync PR 63536 - [css-values] Test that inherit() doesn't break parsing of the rules that follow

Categories

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

task

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Attachments

(1 file)

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

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

Aadharsh Pannirselvam <19518661+oddharsh@users.noreply.github.com> wrote:

[css-values] Test that inherit() doesn't break parsing of the rules that follow

Adds css/css-values/inherit-function-rule-recovery.html. It checks that a declaration using inherit() leaves the rest of the style sheet parsing as written. The rules after it keep their count and selectors, and the rule holding it gains no nested rules.

The checks hold whether or not an engine supports inherit(). If it does, the declarations are valid. If it doesn't, inherit() is an unknown function, so a custom property still holds a valid token sequence and a standard property's declaration is dropped.

Either way the following rules must parse. So the test passes in an engine without inherit(), and fails only where the parser loses its place.

Chromium does lose its place today with CSSInheritFunction disabled, which is its default: https://crbug.com/572269617. When inherit() sits inside another function, the following rules are dropped or nested under the declaring rule. Measured through wpt serve:

subtests passing
Chrome 155.0.8059.40, default 1 of 6
Chrome 155.0.8059.40, --enable-experimental-web-platform-features 6 of 6
Chrome Canary 157.0.8094.0, default 1 of 6
Chrome Canary 157.0.8094.0, --enable-experimental-web-platform-features 6 of 6

The one subtest Chromium passes by default is a bare --d: inherit(--d), where the parser isn't inside a block when it bails, which matches the cause traced in the bug. Safari 27.2 parses the equivalent stylesheet correctly. ./wpt lint is clean.

Runs that enable experimental features, including Chromium's own web tests, won't see the failure. wpt.fyi's stable Chrome runs should.

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Attached file Notable wpt changes —

CI Results

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

Total 521 tests and 23 subtests

Status Summary

Firefox

OK : 1[GitHub] 285[Gecko-linux2404-64-debug] 286[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-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 6[GitHub] 22[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 6292[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 6444[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 6445[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 6457[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]
FAIL: 4100[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 4146[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] 4160[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 4161[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

OK : 1
PASS: 6

Safari

OK : 1
PASS: 6

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

(See attachment for full changes)

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/6dbde34ecec9 https://hg.mozilla.org/integration/autoland/rev/bbcf9657cb2c [wpt PR 63536] - [css-values] Test that inherit() doesn't break parsing of the rules that follow, a=testonly
Status: NEW → RESOLVED
Closed: 8 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: