Closed Bug 1601219 Opened 1 year ago Closed 1 year ago

The color-picker does not work in the OBT for `color` properties in the content page

Categories

(DevTools :: Inspector: Rules, defect, P1)

defect

Tracking

(firefox73 fixed)

RESOLVED FIXED
Firefox 73
Tracking Status
firefox73 --- fixed

People

(Reporter: pbro, Assigned: pbro)

References

(Blocks 2 open bugs)

Details

(Whiteboard: dt-fission-reserve)

Attachments

(1 file)

Steps:

  • navigate to any site in a Firefox tab
  • open the OBT
  • from the OBT's inspector panel, pick an element from the content page that has some color styles
  • click on the color swatches to to open the color picker

Expected: the color picker should open up and let you edit the color

Actual: if the color swatch is for a background-color, this works fine. However if it is for a color property, then it fails and the color picker doesn't appear. The following JS error is thrown too:

Error while calling actor 'pagestyle's method 'getComputed' node is null Actor.js:91:13
getComputed@resource://devtools/server/actors/styles.js:314:5 handler@resource://devtools/shared/protocol/Actor.js:154:37 onPacket@resource://devtools/server/debugger-server-connection.js:378:58 _onJSONObjectReady/<@resource://devtools/shared/transport/transport.js:464:22 exports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:111:22 exports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:111:22 Actor.js:96:15

Doing the same on an element that belongs to the main browser UI works fine.

Assignee: nobody → pbrosset
Status: NEW → ASSIGNED

I know how to fix this, and this should probably be a blocker for the DevTools fission M1 milestone. So taking it now.

It looks like we left out some places in the inspector when we made it fission-compatible.
The color-picker, in particular, needs access to the selected node's computed style for its
color contrast logic.
We used to access this on the top-level target PageStyleFront. We just need to change this so
it uses the one contextual to the selected node.

Pushed by pbrosset@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/52cf8917115d
Use the right PageStyleFront instance when querying computed styles from the color picker; r=rcaliman
Priority: -- → P1
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 73
Whiteboard: dt-fission-reserve
QA Whiteboard: [qa-73b-p2]
You need to log in before you can comment on or make changes to this bug.