github web-platform-tests/wpt merge_pr_47061

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
14 months ago

Do not parse an empty page-rule selector list as a single empty selector.

Before this change, @page {} was parsed as though the rule had a single
selector with an empty atom as the name. We would generally accept things like
@page a, {} to include an empty selector too, since no matching tokens ended
up representing an empty page-name (as is the case with just pseudo-classes
and no page-name), and an empty pseudo-class list (as is the case with just a
page-name and no pseudo-classes).
We shouldn't be accepting both of those at the same time.

This also fixes serialization of empty page-rule selector list.

It seems there are no WPT that check how page-rules are specifically
serialized. This adds a few basic ones to catch at least this issue.

Differential Revision: https://phabricator.services.mozilla.com/D216068

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1906749
gecko-commit: ade9faeeeb76c36d0360805c93f9e220a61b10df
gecko-reviewers: emilio, firefox-style-system-reviewers

Don't miss a new wpt release

NewReleases is sending notifications on new releases.