Use InspectorUtils color function in color.js
Categories
(DevTools :: Shared Components, task)
Tracking
(firefox111 fixed)
Tracking | Status | |
---|---|---|
firefox111 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
Details
Attachments
(2 files)
There are a few functions in color.js that are direct replacement of InspectorUtils
methods (isValidCSSColor
, rgbToColorName
, colorToRGBA
)
This was done as part of the devtools.html project, and since this is not a goal we want to pursue, we should roll back to using InspectorUtils methods to lower the maintenance cost
Assignee | ||
Comment 1•1 year ago
|
||
Let's use InspectorUtils
isValidCSSColor
, rgbToColorName
and colorToRGBA
instead of their js-counterpart.
Updated•1 year ago
|
Assignee | ||
Comment 2•1 year ago
|
||
Make the callsites call InspectorUtils.rgbToColorName instead.
Since it was throwing when passed a non-valid named color,
which wasn't the expected outcome in DevTools, modify the
c++ method so it return an empty string instead.
Add a dedicated test since there wasn't one.
Depends on D168669
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b74334ea6e48 [devtools] Replace custom color.js method with InspectorUtils ones. r=ochameau. https://hg.mozilla.org/integration/autoland/rev/a7cf3a7ae359 [devtools] Remove color.js rgbToColorName. r=ochameau.
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/db9259efdb85 [devtools] Replace custom color.js method with InspectorUtils ones. r=ochameau. https://hg.mozilla.org/integration/autoland/rev/604e9f20d161 [devtools] Remove color.js rgbToColorName. r=ochameau.
Comment 6•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/db9259efdb85
https://hg.mozilla.org/mozilla-central/rev/604e9f20d161
Assignee | ||
Updated•1 year ago
|
Description
•