Open Bug 1459570 Opened 8 years ago Updated 3 years ago

Remove checks for CSS Colors Level 4 support

Categories

(DevTools :: Inspector, task, P3)

task

Tracking

(Not tracked)

People

(Reporter: rcaliman, Unassigned)

Details

There are guards in the code to check for CSS Colors Level 4 platform support. They are used when doing color format conversions in the Inspector and when instantiating SwatchColorPickerTooltip. Bug 1295456 has implemented this feature since Firefox 52. The ESR is planned to switch from Firefox 52 to Firefox 60 in May 2018. (https://www.mozilla.org/en-US/firefox/organizations/) It seems like a good time to remove the checks for CSS Colors Level 4 given the established platform support across Firefox versions. Places where code or checks can be removed: - In devtools/shared/fronts/css-properties.js `CssProperties.upportsCssColor4ColorFunction` `CSSProperties.cssColor4ColorFunction` - In devtools/server/actors/css-properties.js ``` const supportedFeature = { // checking for css-color-4 color function support. "css-color-4-color-function": InspectorUtils.isValidCSSColor("rgb(1 1 1 / 100%)"), }; ``` - In devtools/client/shared/widgets/tooltip/SwatchColorPickerTooltip.js `this.cssColor4 = supportsCssColor4ColorFunction();` - In devtools/client/shared/output-parser.js `this.cssColor4 = supportsCssColor4ColorFunction();`
@Tom, since you reviewed the patches that introduced these checks for CSS Colors Level 4, do you see any issues with removing these checks now, given the platform support. Are there other reasons for keeping them in?
Flags: needinfo?(ttromey)
(In reply to Razvan Caliman [:rcaliman][@rcaliman] from comment #1) > @Tom, since you reviewed the patches that introduced these checks for CSS > Colors Level 4, do you see any issues with removing these checks now, given > the platform support. Are there other reasons for keeping them in? I think the underlying question here is about devtools policy, namely, what versions of FF should be supported as debugging targets. So, I'm redirecting the NI to someone who might know the answer, or at least will know who will. I don't recall if this code is checking server capabilities -- if not, then it's already incorrect and IMO there would be no barrier to removing the checks.
Flags: needinfo?(ttromey) → needinfo?(jryans)
The backward compatibility[1] page attempts to describe our policy for things like this (though admittedly it could probably use more detail on the finer points, so please let me know if you have questions so that it can be expanded). For the code in question here, it looks like we are detecting server feature support. The compatibility range goes back to Release, so currently 59 and later (soon 60 and later). Since the feature was added in 52, we're well beyond that range, so it appears safe to remove the checks. [1]: http://docs.firefox-dev.tools/backend/backward-compatibility.html
Flags: needinfo?(jryans)
Thank you both for the answers! I will proceed with the removal of the checks and related code.
Product: Firefox → DevTools
Assignee: rcaliman → nobody
Assignee: nobody → rcaliman
Status: NEW → ASSIGNED
Type: enhancement → task
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.