Replace CSSProperties.isValidOnClient() with CSS.supports()
Categories
(DevTools :: General, task, P3)
Tracking
(firefox70 fixed)
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: rcaliman, Assigned: rcaliman)
References
Details
Attachments
(1 file)
The CSSProperties front has a method called isValidOnClient()
which seems to do client-side validation of CSS (meaning, no trips to the server for a highly accurate CSS validation on the inspected page; see bug 1532947).
This method was introduced by bug 1291866 in Firefox 52.
There are a few places where isValidOnClient()
and its helper getValidityChecker()
are used which result in tight coupling between components and a lot of drilling down of the method, notably in:
OutputParser
constructorSwatchFilterTooltip
constructor which passes it down toCSSFilterEditorWidget constructor
Given the current native support for CSS.supports()
and the scope of the method, it seems that isValidOnClient
can be replaced by CSS.supports()
where required. This will cleanup the code a bit and reduce the tight coupling between components and the CSSProperties
front.
Assignee | ||
Comment 1•5 years ago
|
||
Given that CssProperties.isValidOnClient()
does only a client-side check for support of a CSS declaration, we can leverage the built-in CSS.supports()
method and remove some of the inter-dependencies between the CssProperties
object from the CssPropertiesFront
and its consumers, OutputParser
and FilterWidget
.
Assignee | ||
Comment 2•5 years ago
|
||
Pushed by rcaliman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/02f651368fa8 Replace CssProperties.isValidOnClient() with CSS.supports() r=gl
Comment 4•5 years ago
|
||
bugherder |
Description
•