SVG images with no intrinsic size or ratio should render with their host document's devicePixelRatio, so that they e.g. scale as-expected under full page zoom + HiDPI
Categories
(Core :: SVG, defect)
Tracking
()
People
(Reporter: dholbert, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
STR:
- Load attached testcase.
- Zoom in using full-page zoom. (Or: apply some non-default HiDPI scaling at the OS level, and compare Firefox to other browsers)
EXPECTED RESULTS:
The blue circle should scale up as you zoom in, and should remain the same size relative to its orange border.
ACTUAL RESULTS:
The blue circle (i.e. the SVG content) remains the same size and does not scale up.
(And/or: if you're testing by applying a HiDPI scale, the blue circle will look smaller in Firefox than in other browsers.)
I've got an analysis of what I think is happening over in bug 1878012 comment 5. I think we're rendering with a 1:1 device-pixel-to-CSS-pixel ratio inside of the SVG document, or something along those lines. We should probably pass the actual host document's devicePixelRatio down as part of the context that we give to SVG images, and use that when painting (as if the user had just done a full-page-zoom in the internal wrapped SVG document).
Reporter | ||
Comment 1•5 days ago
|
||
To my surprise, this works just fine for CSS 'background'. Here's an alternate testcase that uses 'background' and gives EXPECTED RESULTS in Firefox.
So maybe we've got some handling for this already and we just fail to use it properly with img
somehow...
Description
•