Problem
The native parser and cascade already evaluate authored @supports blocks, but the owner-backed CSSOM compatibility layer exposes each block as a generic CSSRule. Scripts cannot observe CSSSupportsRule / CSSConditionRule / CSSGroupingRule branding, a live stable child rule list, parent links, or nested mutation.
This is the next bounded dynamic CSSOM gap after #366. It does not require the owner-independent stylesheet identity and per-root adoption registries that still block successful constructed/adopted stylesheet replacement.
Browser and WPT-derived authority
Chrome 153 establishes this focused contract:
CSSSupportsRule instanceof CSSConditionRule instanceof CSSGroupingRule instanceof CSSRule;
type === CSSRule.SUPPORTS_RULE === 12;
- readonly
conditionText keeps the authored normalized condition;
cssRules is SameObject and children retain parentRule / parentStyleSheet;
- nested
insertRule / deleteRule synchronously update serialization and computed style;
- deletion clears both parent links on the removed child;
- missing arguments throw
TypeError; out-of-range insertion throws IndexSizeError; multiple rules throw SyntaxError; nested @import throws HierarchyRequestError;
- a supports group nested inside a media group stays live and publishes immediately.
The behavior follows the CSSOM grouping-rule algorithms and the CSS Conditional Rules CSSSupportsRule interface, reduced to the already supported owner-backed stylesheet path.
Scope and ownership
Exact audited base: b89b0de5cc4ba3aa6b1e359854566082cb42ad62.
Owned paths:
experiments/WebScene.NativeEngine.Probe/native/webscene_stylesheet_cssom_compatibility.h
experiments/WebScene.NativeEngine.Probe/tests/native_v8_runtime_browser_dom_tests.inc
- one new dedicated
tests/WebPlatformSubset/contracts/cssom-supports-rule-mutation.html
- one new dedicated
tests/WebPlatformSubset/webscene-cssom-supports-rule-mutation-profile.json
The slice is disjoint from open docs consolidation PR #76, #377 / PR #380 File System Access paths, #379 parser-resource work, AppScene, and vscode-demo. It will not modify parser/cascade internals, resource loading, imports/namespaces, constructed/adopted ownership, or successful replacement.
Acceptance gates
- Chrome/native exact contract parity for interface identity, constants, condition reflection, live child identity, errors, detach behavior, serialization, nested media/supports, and synchronous computed style.
- Explicit cascade, layout, staged-publication, scene-build, native-rule, wrapper, and pending-scene counter assertions.
- A 64-rule / 20-cycle mutation gate with recorded p95/max.
- V8 heap and process RSS bounds with no retained rule/wrapper growth.
- 100 main-document/iframe create-mutate-detach/teardown cycles with drained queues.
- Direct exact-head native correctness and dedicated WebPlatformSubset runs before merge.
Completion boundary
This issue completes live CSSSupportsRule grouping reflection and mutation only for existing owner-backed stylesheets. Constructed/adopted sheets, imports/namespaces, other conditional grouping interfaces, and full CSS conditional grammar remain under #239.
Problem
The native parser and cascade already evaluate authored
@supportsblocks, but the owner-backed CSSOM compatibility layer exposes each block as a genericCSSRule. Scripts cannot observeCSSSupportsRule/CSSConditionRule/CSSGroupingRulebranding, a live stable child rule list, parent links, or nested mutation.This is the next bounded dynamic CSSOM gap after #366. It does not require the owner-independent stylesheet identity and per-root adoption registries that still block successful constructed/adopted stylesheet replacement.
Browser and WPT-derived authority
Chrome 153 establishes this focused contract:
CSSSupportsRule instanceof CSSConditionRule instanceof CSSGroupingRule instanceof CSSRule;type === CSSRule.SUPPORTS_RULE === 12;conditionTextkeeps the authored normalized condition;cssRulesis SameObject and children retainparentRule/parentStyleSheet;insertRule/deleteRulesynchronously update serialization and computed style;TypeError; out-of-range insertion throwsIndexSizeError; multiple rules throwSyntaxError; nested@importthrowsHierarchyRequestError;The behavior follows the CSSOM grouping-rule algorithms and the CSS Conditional Rules
CSSSupportsRuleinterface, reduced to the already supported owner-backed stylesheet path.Scope and ownership
Exact audited base:
b89b0de5cc4ba3aa6b1e359854566082cb42ad62.Owned paths:
experiments/WebScene.NativeEngine.Probe/native/webscene_stylesheet_cssom_compatibility.hexperiments/WebScene.NativeEngine.Probe/tests/native_v8_runtime_browser_dom_tests.inctests/WebPlatformSubset/contracts/cssom-supports-rule-mutation.htmltests/WebPlatformSubset/webscene-cssom-supports-rule-mutation-profile.jsonThe slice is disjoint from open docs consolidation PR #76, #377 / PR #380 File System Access paths, #379 parser-resource work, AppScene, and vscode-demo. It will not modify parser/cascade internals, resource loading, imports/namespaces, constructed/adopted ownership, or successful replacement.
Acceptance gates
Completion boundary
This issue completes live
CSSSupportsRulegrouping reflection and mutation only for existing owner-backed stylesheets. Constructed/adopted sheets, imports/namespaces, other conditional grouping interfaces, and full CSS conditional grammar remain under #239.