SVG-ISSUE-2441: Intrinsic sizing and percentage values for inline svg in html [SVG 2]

SVG-ISSUE-2441: Intrinsic sizing and percentage values for inline svg in html [SVG 2]

http://www.w3.org/Graphics/SVG/WG/track/issues/2441

Raised by: Erik Dahlström
On product: SVG 2

As shown in https://bugzilla.mozilla.org/show_bug.cgi?id=668163 the current wording for how the svg viewport is computed (see intrinsic sizing[1]) for inline svg in html is not describing what implementations actually do. I'm raising this issue for SVG2, but this should perhaps be errata'd for SVG 1.1 as well.

This makes a big difference in certain cases, and implementations differ, see e.g testcase[2].

Some informal discussion on the issue:
<ed> jwatt: https://bugzilla.mozilla.org/show_bug.cgi?id=668163 seems to indicate that firefox diverged from the svg spec, could you provide some updated wording such that it would describe what you implemented?
<jwatt> ed: "treat the width/height attributes as presentation attributes, but only if they are explicitly set"
<jwatt> ed: which is much closer to what other implementations do that what we used to do
<jwatt> ed: comment 26 and 27 explain the rational for the "only if explicitly set" part
<ed> jwatt: ok, hmm... we probably will need to revise that part of the spec then, and we do have the "promote-attributes-to-presentation-attributes" spec to do, which does make width/height presentation attributes
<jwatt> ed: yeah
<jwatt> ed: and just to be clear, this is only for outer-<svg>
<ed> jwatt: it applies no matter how the svg was included, or only in the inline-svg-in-html case?
<ed> ... e.g <img src="some.svg"> where the svg had some percentage width/height values
<jwatt> ed: I think in our case it affects the computed style on outer-<svg> in all cases, but we still special case root-<svg> as required by the spec
<jwatt> so that the default (no width/height) is to fill the viewport

[1] http://www.w3.org/TR/SVG11/coords.html#IntrinsicSizing
[2] https://bug668163.bugzilla.mozilla.org/attachment.cgi?id=545713

Received on Wednesday, 14 March 2012 14:39:53 UTC