Open Bug 1532947 Opened 5 years ago Updated 2 years ago

Expose CSS.supports from the server to the client

Categories

(DevTools :: Inspector, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: rcaliman, Unassigned)

References

Details

To ensure backwards compatibility with an older DevTools server, we must always rely on the server's CSS capabilities not the client's.

When testing support for CSS properties and values, we tend to have dedicated properties (aka traits) on the PageStyleActor which expose a boolean flag to the client according to the result of calling CSS.supports() in the server context.

This adds complexity (the Actor and Front need to be updated at the same time) and is causing us to keep the code for longer than necessary (we'll clean it up eventually, but there's no urgency).

This is a proposal to introduce a single method on the PageStyleActor and PageStyleFront to allow the client to query for arbitrary CSS properties whenever necessary. Something like PageStyleActor.CSSSupports() or PageStyleActor.supportsCSS(), which effectively proxies the CSS.supports() available in the server context.

This would remove the need for adding dedicated traits and remembering to clean them up.

Some traits this method could replace be used:

  • fontStretchLevel4 // Whether the page supports values of font-stretch from CSS Fonts Level 4.
  • fontStyleLevel4 // Whether the page supports values of font-style from CSS Fonts Level 4.
  • fontWeightLevel4 // // Whether the page supports values of font-weight from CSS Fonts Level 4.
  • cssColor4ColorFunction // Whether the server supports the css-color-4 color function.
See Also: → 1554701
Assignee: rcaliman → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.