[svgwg] Issue: Clarify that non-CSS rendering environments can override default width/height of embedded SVG (#762) marked as Co-ordinates chapter

AmeliaBR has just labeled an issue for https://github.com/w3c/svgwg as "Co-ordinates chapter":

== Clarify that non-CSS rendering environments can override default width/height of embedded SVG ==
See https://bugzilla.mozilla.org/show_bug.cgi?id=1591274, about a discrepancy in how Firefox and Chromium render SVG when drawn into an HTML canvas, where the size/aspect ratio specified in the `drawImage()` method call doesn't match the default dimensions from the SVG file.

Chromium draws the SVG at its default width and height, then uses bitmap scaling to stretch it to the requested width & height on the canvas. Firefox draws the SVG into the requested dimensions using normal SVG scaling and sizing rules.

As I read the spec, Firefox is consistent with SVG 1.1, Chromium is consistent with a very literal reading of the current text of SVG 2. However, as far as I know there was no intention to make this a breaking change — I suspect the change in text was purely intended to clarify the rules for SVG embedded in HTML. But it is written in a way that makes it seem like those rules don't apply when the initial SVG viewport is controlled by any other rendering environment (HTML canvas, CSS background image sizing).

Reference the sections "The initial viewport" (particularly the bit about "unless the following conditions are met" in SVG 2) and "Intrinsic sizing properties of SVG content" in the Coordinates chapter:

- SVG 2: https://svgwg.org/svg2-draft/coords.html
- SVG 1.1: https://www.w3.org/TR/SVG11/coords.html


See https://github.com/w3c/svgwg/issues/762

Received on Friday, 6 December 2019 05:17:36 UTC