Repository navigation
Closed
Labels
vscode-oss/plannedPlanned for the AppScene/WebScene VS Code OSS integration
Description
Proven gap
After #330, WebScene exposes live owner-backed CSSStyleRule objects and declaration mutation, but CSSStyleRule.selectorText is installed as a fixed data property. Assigning a new selector therefore leaves both the rule and computed style unchanged. This is the next missing owner-backed CSSOM mutation and does not require constructed-sheet multi-root ownership.
A Chromium 153 control proves:
- assigning a valid selector updates
selectorTextandcssTextsynchronously and recascades without changing the<style>element's DOM text; - an invalid selector assignment is ignored without throwing or changing the prior rule;
- a nested style rule inside
@mediaupdates its own serialization and the parent group's serialization; - a deleted rule accepts later selector mutation while remaining detached and without affecting computed style.
Focused scope
- Make selector state mutable for owner-backed top-level and nested style rules.
- Validate selectors through the realm's native selector parser; invalid assignments preserve the previous value and do not publish.
- Re-serialize the rule and containing group, then publish through the existing bounded stylesheet staging path only while attached.
- Preserve rule/list identity, declaration state, owner DOM text topology, detach/reattach behavior, main/iframe realm isolation, and Implement live CSSGroupingRule mutation for nested media rules #330 nested-media semantics.
- Keep constructed/adopted sheets,
replace/replaceSync, imports/namespaces, selector parser expansion, and cross-root sheet ownership outside this slice.
Ownership and non-overlap
Planned paths:
experiments/WebScene.NativeEngine.Probe/native/webscene_stylesheet_cssom_compatibility.h;experiments/WebScene.NativeEngine.Probe/tests/native_v8_runtime_browser_dom_tests.inc;- new
tests/WebPlatformSubset/contracts/cssom-style-rule-selector-mutation.html; - new dedicated WebPlatformSubset profile.
These paths do not overlap active #312 PR #354 (native_v8_runtime_test_support.inc), #248's file-grant/browser API work, WebSocket PR #357, or docs PR #76.
Acceptance
- Chromium/native contract matches top-level and nested valid mutation, invalid no-op, synchronous computed style, serialization, stable identity, and detached-rule behavior.
- Main and iframe realms retain independent constructors/state; navigation and removal leave no retained rule/owner or pending replacement state.
- Dynamic selector changes invalidate only the owning cascade root and preserve Implement live CSSGroupingRule mutation for nested media rules #330 grouping mutation behavior.
- A product-shaped mutation workload reports 20-cycle p95/max within the focused budget with bounded cascade/publication work.
- A 100-cycle create/mutate/delete/detach/navigation gate retains <= 8 MiB V8 heap and <= 64 MiB RSS after warm-up and drains native rules/pending replacements.
Metadata
Metadata
Assignees
Labels
vscode-oss/plannedPlanned for the AppScene/WebScene VS Code OSS integration
Activity
wieslawsoltes commentedon Sep 18, 2026
Implementation is open as PR #361 at exact head
9f6bb1f76409dc6d50c3bf19f0f227f3ff8f5704, rebased on current main69d929f6fd0ca030c1394c921bebedad603f84b3. Chromium 153 passes 6/6; exact-parent native passes 1/6 and fails all mutation behaviors; native after passes 6/6. The existing grouping contract remains 4/4. The 64-rule/20-cycle selector workload measured p95/max 0.662/0.743 ms. Across 100 main+iframe lifecycle cycles, heap stayed 34,306,700→34,306,700 B, RSS was 105,775,104→118,145,024 B, native CSS rules returned to baseline, layout delta was 63, scene delta 2, and pending scenes stayed <=2. Live overlap is zero with #248 PR #360, #312 PR #354, and #76.wieslawsoltes commentedon Sep 18, 2026
Merged via #361 as
92799fb39b1d94d901a6fbe81ee5023eb9f2ba9afrom exact headb25409ec9d800856ba019c87d4255c786b72b38b, based on current main379a72dd3b8c9faa487b20ce44f6baad84ebb013. Exact-head portable V8 passed and the related native Linux document/compiler step passed; the immediately preceding head also completed full Linux/macOS CI green before the disjoint #360 rebase. Chromium/native after are 6/6 (parent native 1/6). Final 64-rule mutation p95/max: 0.651/0.743 ms. Across 100 main+iframe lifecycle cycles, heap remained 34,313,260 B, RSS grew 12,320,768 B, layout delta was 62, scene delta 1, and CSS rules/queues returned to baseline.