Skip to content

Render CSS path() and local SVG URL clip paths #504

Description

@wieslawsoltes

Final status — 19 September 2026

Issue complete and closed through the native two-PR stack:

  1. Provider PR Render CSS path() clip geometry #509 merged as 83729c7e with bounded CSS path() parsing, fill rules, relative retained coordinates, Skia/Flutter replay, and metadata-aware visual equality.
  2. Consumer PR Render same-document SVG URL clips #510 merged as bf948d87 with same-document fragment resolution, connected-tree and shadow-scope checks, bounded SVG geometry flattening, objectBoundingBox scaling, and fail-closed unsupported resources.

Only git diff --check ran. Native/backend/browser regressions were authored but not executed; runtime, pixel, performance, memory, package, and complete CI gates remain deferred in the two validation records. Release qualification remains owned by #256/#227 and AppScene #130.

Problem

WebScene now retains inset, circle, polygon, and explicit ellipse clips, but clip-path: path(...) and same-document url(#clip) forms remain unavailable. Code OSS and webview content can therefore paint outside authored editor, accessibility, icon, and extension-surface shapes.

Focused implementation

  • Parse bounded path() syntax into immutable retained SVG path data with explicit fill rule and reference-box behavior.
  • Resolve same-document SVG url(#id) clipPath resources with policy/lifetime checks, immutable generation identity, and mutation invalidation.
  • Preserve clip ordering with transforms, overflow, border radius, opacity/effect groups, descendants, and hit testing.
  • Project identical paths in Skia/Avalonia/Uno and Flutter; unsupported external URLs, units, transforms, or cyclic references fail closed.
  • Include resource identity and old/new expanded bounds in scene equality and localized damage.

Gates

Browser/native syntax and mutation contracts, Chromium/native fixed pixels, nested clips/transforms, hit-test parity, 4,096-path parse/cache benchmark, and 100 resource replacement/detach cycles with bounded memory.

Parent: #256. Geometry coordination: #240/#241.

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