Open Bug 1934384 Opened 1 year ago Updated 1 year ago

"Grab a color" shows wrong color after css change

Categories

(DevTools :: Inspector, defect, P3)

Firefox 133
Desktop
Windows 11
defect

Tracking

(Not tracked)

People

(Reporter: eyalgruss, Unassigned)

Details

  1. open the color inspector
  2. observe the color of the page background eg black
  3. add css to body - background: red
  4. observe the color grab still shows black although the background is red
  5. close and open the color tool to make it read the correct color

We could possibly request new snapshot of a small react on every move:
https://searchfox.org/mozilla-central/rev/fb8a1b0beee7dbc1b0a35050ec5c0345f0b09173/devtools/server/actors/utils/capture-screenshot.js#118-123
The platform now exposes ways to take partial screenshots of the page.
(note that this code runs in the parent process, I don't know if that works / is exposed in content)

Technically we take a screenshot of the apge when starting the picker and don't update it until a color was selected, so it will be outdated if anything changes on the page.

It's mostly used to show the zoomed preview in the magnifier glass. We could switch to requesting a smaller screenshot and update it dynamically as the user is moving the mouse.

There might be a way to achieve this zoom effect with CSS only and avoid the screenshot as well?

Severity: -- → S3
Priority: -- → P3

(In reply to Julian Descottes [:jdescottes] from comment #2)

Technically we take a screenshot of the apge when starting the picker and don't update it until a color was selected, so it will be outdated if anything changes on the page.

It's mostly used to show the zoomed preview in the magnifier glass. We could switch to requesting a smaller screenshot and update it dynamically as the user is moving the mouse.

There might be a way to achieve this zoom effect with CSS only and avoid the screenshot as well?

does this also explain why the zoomed preview is not updating with page scroll?

You need to log in before you can comment on or make changes to this bug.