Problem
The full-V8 package gate fails webscene_selector_parser_tests: a mixed forgiving functional selector such as .subject:is(missing|circle, p|circle) loses the valid declared-namespace arm when Servo rejects the undeclared prefix while parsing the outer selector.
Top-level undeclared prefixes and functional lists containing only invalid arms must still fail closed. This is a generic Selectors behavior used by unchanged Code OSS CSS.
Proposed fix
- when namespace-aware parsing fails only for a selector containing
:is(), :where(), :not(), or :has(), retry syntax parsing with bounded temporary sentinel mappings for syntactically present undeclared prefixes;
- compile every nested arm against the original namespace context, so invalid arms remain invalid and contribute neither matching nor specificity;
- accept the functional pseudo only when at least one original-context arm compiles;
- retain top-level strict rejection, recursion and selector budgets, cache identity, and declared namespace behavior.
Acceptance
Focused selector tests cover top-level rejection, unknown-only rejection, mixed forgiving acceptance, type and attribute namespace arms, nested functional lists, specificity, cache separation and depth bounds.
Problem
The full-V8 package gate fails
webscene_selector_parser_tests: a mixed forgiving functional selector such as.subject:is(missing|circle, p|circle)loses the valid declared-namespace arm when Servo rejects the undeclared prefix while parsing the outer selector.Top-level undeclared prefixes and functional lists containing only invalid arms must still fail closed. This is a generic Selectors behavior used by unchanged Code OSS CSS.
Proposed fix
:is(),:where(),:not(), or:has(), retry syntax parsing with bounded temporary sentinel mappings for syntactically present undeclared prefixes;Acceptance
Focused selector tests cover top-level rejection, unknown-only rejection, mixed forgiving acceptance, type and attribute namespace arms, nested functional lists, specificity, cache separation and depth bounds.