Closed Bug 1554701 Opened 5 years ago Closed 5 years ago

Replace CSSProperties.isValidOnClient() with CSS.supports()

Categories

(DevTools :: General, task, P3)

task

Tracking

(firefox70 fixed)

RESOLVED FIXED
Firefox 70
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:

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.

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.

Pushed by rcaliman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/02f651368fa8
Replace CssProperties.isValidOnClient() with CSS.supports() r=gl
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: