Handle SVG theming in moz-remote-image
Categories
(Core :: Graphics, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox149 | --- | fixed |
People
(Reporter: tschuster, Assigned: tschuster)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
We need to make sure SVGs that are loaded via the moz-remote-image: protocol get the correct theme (CSS's prefers-color-scheme). We might also want to handle context-fill, but that really should not be used by web content.
| Assignee | ||
Updated•7 months ago
|
| Assignee | ||
Comment 1•7 months ago
|
||
We need to add parameters to moz-remote-image for color-scheme, fill/stroke color/opacity and forward that to the child. The question is how we would even collect that information. It does feel somewhat unfortunate having to do that for e.g. favicons in JS.
In the child, I think we need to do something similar to nsWindowGfx::CreateIcon, where we set-up an SVGImageContext and call imgIContainer::Draw instead of imgContainer::GetFrame. I believe we also need to fake a nsISVGPaintContext, similar to this test.
| Assignee | ||
Comment 2•7 months ago
|
||
Updated•7 months ago
|
| Assignee | ||
Comment 3•7 months ago
|
||
| Assignee | ||
Comment 4•7 months ago
|
||
I only did color-scheme for now, but support for fill-color etc. should be trivial to add.
Comment 6•6 months ago
|
||
| bugherder | ||
Updated•6 months ago
|
Updated•4 months ago
|
Description
•