Using color picker after using Color vision simulation picks the wrong color
Categories
(DevTools :: Inspector, defect, P2)
Tracking
(Not tracked)
People
(Reporter: jdescottes, Unassigned, NeedInfo)
References
(Blocks 1 open bug)
Details
(Keywords: devtools-platform-blocked)
STRs:
- open data:text/html,<div style="background:red; width:100px; height:100px">
- open devtools
- open accessibility panel
- Simulate Protanopia
- open inspector
- start the color picker
- try to pick the color in the square
The picked color will be "#ff0000", whereas the color actually rendered thanks to the color vision simulation is "#271d00".
Comment 1•2 months ago
|
||
this should be fixed at the screenshot level. You get the same issue if you simulate color vision and take a screenshot (either using devtools tools or the main firefox screenshot one)
the simulation is set on the docShell in https://searchfox.org/firefox-main/rev/2477384eae35d0ee85d43dfdeba6f2ba51d9abfb/devtools/server/actors/accessibility/simulator.js#54
this.docShell.setColorMatrix(colorMatrix);
which ultimately calls https://searchfox.org/firefox-main/rev/2477384eae35d0ee85d43dfdeba6f2ba51d9abfb/docshell/base/nsDocShell.cpp#14607
nsDocShell::SetColorMatrix(const nsTArray<float>& aMatrix) {
already_AddRefed<mozilla::dom::Promise> WindowGlobalParent::DrawSnapshot(
should somehow take this applied matrix into account
ahale, maybe you could help us here?
| Reporter | ||
Updated•2 months ago
|
| Reporter | ||
Comment 2•2 months ago
|
||
Also note that the devtools highlighters are impacted by the matrix, which can be an issue with the grid highlighters for instance which are color coded.
We might file a separate bug about this, but if we can make the matrix not apply to our highlighters, that would also solve this issue.
Comment 3•2 months ago
|
||
Could it be that color matrix are only applied when using WebRender:
https://searchfox.org/firefox-main/rev/150ca809c7243bd6e994f28cc4a3750430783364/layout/painting/nsDisplayList.cpp#2406-2435
But the screenshots are using "software render", which may not be WebRender?
https://searchfox.org/firefox-main/rev/150ca809c7243bd6e994f28cc4a3750430783364/gfx/ipc/CrossProcessPaint.cpp#112-113
Description
•