Skip to content

Propagate namespaces through functional selectors - #528

Merged
wieslawsoltes merged 1 commit into
mainfrom
feature/css-functional-namespace-context-520
Sep 19, 2026
Merged

wieslawsoltes merged 1 commit into
mainfrom
feature/css-functional-namespace-context-520

Conversation

@wieslawsoltes

Copy link
Copy Markdown
Collaborator

Namespace context reached top-level type and attribute selectors but was lost when functional pseudo-class arguments were reparsed as strings. This stores an immutable prepared nested selector list on compiled pseudos and recursively compiles :is(), :where(), :not(), and anchored :has() with the stylesheet namespace context, Servo-authored specificity, a depth limit of 32, and a shared 4,096-selector budget.

Matching, query hosts, and invalidation consume the same payload, so cache identity and namespace resolution cannot diverge. Unknown-prefix-only payloads fail closed while valid forgiving-list arms survive. Authored native and WPT sources cover default/prefixed/any/empty namespaces, nested :has(), invalidation, cache separation, ownership/adoption, specificity, and bounds.

Only git diff --check ran under the current implementation-first policy. Builds, tests, WPT execution, performance, memory, lifecycle, product, and complete CI evidence remain deferred. The legacy non-Servo fallback retains its existing string-recursive path.

Closes #520
Progresses #239

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Propagate CSS namespace context into functional pseudo-class selector lists

1 participant