Intent to Prototype and Ship: Expose CSSStyleValue hierarchy to Worker contexts

5 views
Skip to first unread message

Javier Fernandez

unread,
5:24 PM (1 hour ago) 5:24 PM
to blink-dev
Contact emails
jfern...@igalia.com

Specification
https://www.w3.org/TR/css-typed-om-1/#stylevalue-subclasses

Summary
The CSS Typed OM spec exposes the CSSStyleValue hierarchy to worker global scopes ([Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)]), but Blink only exposed CSSStyleValue, CSSKeywordValue, CSSNumericValue, CSSUnitValue and CSSUnparsedValue to Window and the worklets. As a result these constructors were undefined in Workers, unlike in Firefox and Safari.

Blink component
Blink>CSS

Web Feature ID
css-typed-om

Motivation
Aligns Chrome with the spec's [Exposed] set and removes a cross‑thread inconsistency (these constructors are currently undefined in workers); enables off‑main‑thread CSS value manipulation

Initial public proposal
No information provided

TAG review
No information provided

TAG review status
Not applicable

Goals for experimentation
None

Risks


Interoperability and Compatibility
This feature is already shipped by Firefox and Safari and it's purely additive worker‑scope exposure; zero change to existing Window behavior; matches the spec. Only theoretical risk: content that feature‑detects these globals inside a worker

Gecko: Shipped/Shipping

WebKit: Shipped/Shipping

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

No information provided


Debuggability
No special tooling; interfaces work in the worker DevTools console like any other worker‑exposed API

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
Yes

Is this feature fully tested by web-platform-tests?
Yes
css/css-typed-om/stylevalue-subclasses/*.any.js (global=window,worker): cssKeywordValue, cssKeywordValue-value, cssUnparsedValue-empty, numeric-objects/cssUnitValue-to; and (full‑scope) the converted create-a-type, cssMathInvert-type, cssMathNegate-type, add-two-types, cssnumericvalue-multiply-two-types, arithmetic, to .any.js. (The CSSMath* ones require the full‑scope exposure.) https://wpt.fyi/results/css/css-typed-om/stylevalue-subclasses?label=experimental&label=master&aligned

Flag name on about://flags
No information provided

Finch feature name
No information provided

Non-finch justification
This is just a minor CSS change to allow some CSS javascript bindings to be run in Worker context, but that were already exposed to the Web via Window context.

Rollout plan
Will ship enabled for all users

Requires code in //chrome?
False

Tracking bug
https://issues.chromium.org/issues/534781956

Estimated milestones
Shipping on desktop 153
Shipping on Android 153
Shipping on WebView 153


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

https://github.com/w3c/csswg-drafts/issues/14229

Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5114591051907072?gate=6116938171416576

This intent message was generated by Chrome Platform Status.


Reply all
Reply to author
Forward
0 new messages