commit b90ed1b56cfe85e9707aa2f107d429a13e9fdcec
parent 336c2a0143bc649a814716fb2a085b1f82bbd395
Author: David Shin <dshin@mozilla.com>
Date: Wed, 22 Oct 2025 14:15:15 +0000
Bug 1995756: Disallow parsing of empty scope selectors. r=firefox-style-system-reviewers,emilio
e.g. `@scope () to ()`.
Differential Revision: https://phabricator.services.mozilla.com/D269581
Diffstat:
2 files changed, 0 insertions(+), 13 deletions(-)
diff --git a/servo/components/style/stylesheets/scope_rule.rs b/servo/components/style/stylesheets/scope_rule.rs
@@ -127,10 +127,6 @@ fn parse_scope<'a>(
return Ok(None);
}
input.parse_nested_block(|input| {
- if input.is_exhausted() {
- // `@scope () {}` is valid.
- return Ok(None);
- }
let selector_parser = SelectorParser {
stylesheet_origin: context.stylesheet_origin,
namespaces: &context.namespaces,
diff --git a/testing/web-platform/meta/css/css-cascade/at-scope-parsing.html.ini b/testing/web-platform/meta/css/css-cascade/at-scope-parsing.html.ini
@@ -1,9 +0,0 @@
-[at-scope-parsing.html]
- [@scope () is not valid]
- expected: FAIL
-
- [@scope to () is not valid]
- expected: FAIL
-
- [@scope () to () is not valid]
- expected: FAIL