Skip to content

Match live form-control pseudo-class state and bounded invalidation #257

Description

@wieslawsoltes

Parent epic: #235. Owning workstreams: selector/invalidation #237, cascade/value resolution #238, and dynamic state/frame scheduling #242.

Proven gap

The character-data audit on draft #245 produced a product-neutral textarea candidate that fails before its mutation assertions: :invalid reads the authored value attribute instead of the live control value, and :placeholder-shown is not implemented. That draft deliberately added no competing fix. Existing #237/#238 acceptance names state mutations generally but has no focused form-state source-of-truth and invalidation matrix.

This issue does not own #245's structural child-list routes/checkpoints. Start implementation only after #245 is rebased or its relevant test is relocated without conflict.

Ordered work

  1. Inventory form-state pseudos used by current contracts and reachable desktop/webview inputs: :valid/:invalid, :required/:optional, :placeholder-shown, :read-only/:read-write, range states, checked/indeterminate, disabled/enabled, and supported user-valid/user-invalid behavior.
  2. Define the live IDL/content-attribute source for input, textarea, select, option, and form state.
  3. Add dependency metadata and one bounded invalidation checkpoint for value, selection, placeholder, required, pattern, range, checked, disabled, reset, and form-owner changes.
  4. Qualify search, Settings, quick-input, issue-reporter, and extension/webview form surfaces that reach the supported slice.

Acceptance and performance gates

  • Chromium/native WPT-derived match and computed-style matrices agree before and after programmatic value writes, native input, attribute mutation, reset, reparenting, and detach/reattach.
  • Selector APIs and stylesheet matching use the same state while preserving the specified distinction between live properties and content attributes.
  • Initial and mutation scene/pixel checks prove focus, placeholder, validation, and disabled styling without stale retained nodes.
  • A 4,096-control matrix records state probes, matched rules, recascade roots/nodes, layout/scene/publication counts, time, allocations, and peak RSS. Unrelated controls/rules do not force full-document work.
  • No duplicate structural invalidation implementation is introduced alongside Optimize structural CSS invalidation and DOM mutation checkpoints #245.

Proposed PR stack

  1. live form-state model + matcher contracts;
  2. dependency invalidation + cascade/scene mutation;
  3. remaining pseudo-class slices and WPT promotion;
  4. bounded performance and unchanged-product acceptance.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    vscode-oss/plannedPlanned for the AppScene/WebScene VS Code OSS integration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions