Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Web-Facing Change PSA: Expose CSSFontFeaturesValueRule

163 views
Skip to first unread message

Chromestatus

unread,
Jan 7, 2025, 12:12:00 PMJan 7
to blin...@chromium.org, rby...@chromium.org, tanna...@gmail.com

Contact emails

rby...@chromium.org, tanna...@gmail.com

Specification

https://drafts.csswg.org/css-fonts/#cssfontfeaturevaluesrule

Design docs


https://developer.mozilla.org/en-US/docs/Web/API/CSSFontFeatureValuesRule

Summary

We were accidentally missing the [Exposed=Window] on the CSSFontFeaturesValueRule interface, so window.CSSFontFeaturesValueRule is incorrectly undefined even though the API was otherwise exposed. This interface has no constructor and it's unlikely that any website would be looking for it specifically, but it's technically potentially helpful for feature detection.



Blink component

Blink>CSS

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

No behavior change other than 'CSSFontFeatureValuesRule in window'. Like all new APIs exposed on 'window' there is a little risk that a poorly written website could be impacted, eg. if a website was relying on legacy features like window.CSSFontFeatureValuesRule mapping to an <iframe name=CSSFontFeatureValuesRule>. However in this case I judge the risk to be virtually non-existent because: 1) This is a long, specific and obscure name - extremely unlikely to be used accidentally by a website (as window.Report was). 2) Firefox and Safari have already shipped this API without issue 3) I searched all of GitHub for 'CSSFontFeatureValuesRule' and didn't get a single hit - very unusual.



Gecko: Shipped/Shipping (https://developer.mozilla.org/en-US/docs/Web/API/CSSFontFeatureValuesRule)

WebKit: Shipped/Shipping

Web developers: No signals (https://developer.mozilla.org/en-US/docs/Web/API/CSSFontFeatureValuesRule)

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?

None



Debuggability

None



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

https://wpt.fyi/results/css/css-fonts/idlharness.html?label=master&label=experimental&aligned&q=css-fonts



Flag name on about://flags



Finch feature name

ExposeCSSFontFeatureValuesRule

Requires code in //chrome?

False

Tracking bug

https://issues.chromium.org/issues/385925149

Estimated milestones

No milestones specified



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).

None

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6275972238934016?gate=5199584181354496

This intent message was generated by Chrome Platform Status.

Rick Byers

unread,
Jan 7, 2025, 12:23:04 PMJan 7
to Chromestatus, blin...@chromium.org, tanna...@gmail.com
On Tue, Jan 7, 2025 at 12:11 PM Chromestatus <ad...@cr-status.appspotmail.com> wrote:

Contact emails

rby...@chromium.org, tanna...@gmail.com

Specification

https://drafts.csswg.org/css-fonts/#cssfontfeaturevaluesrule

Design docs


https://developer.mozilla.org/en-US/docs/Web/API/CSSFontFeatureValuesRule

Summary

We were accidentally missing the [Exposed=Window] on the CSSFontFeaturesValueRule interface, so window.CSSFontFeaturesValueRule is incorrectly undefined even though the API was otherwise exposed. This interface has no constructor and it's unlikely that any website would be looking for it specifically, but it's technically potentially helpful for feature detection.



Blink component

Blink>CSS

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

No behavior change other than 'CSSFontFeatureValuesRule in window'. Like all new APIs exposed on 'window' there is a little risk that a poorly written website could be impacted, eg. if a website was relying on legacy features like window.CSSFontFeatureValuesRule mapping to an <iframe name=CSSFontFeatureValuesRule>. However in this case I judge the risk to be virtually non-existent because: 1) This is a long, specific and obscure name - extremely unlikely to be used accidentally by a website (as window.Report was). 2) Firefox and Safari have already shipped this API without issue 3) I searched all of GitHub for 'CSSFontFeatureValuesRule' and didn't get a single hit - very unusual.


Correction: I must have had a typo in my first github search. I tried again (not really believing 0 results for a shipped API) and found just 195 hits in JavaScript code. Scanning all of the hits, they all seem to just match the pattern of cataloguing known shipped web APIs, no feature detection or other potentially problematic patterns (like <iframe name=CSSFontFeatureValuesrule). 

Still, I've requested a killswitch on the patch as is standard practice, so in the very unlikely case there is a compat impact we can quickly flag it off.
Reply all
Reply to author
Forward
0 new messages