ISSUE-2441: Intrinsic sizing and percentage values for inline svg in html

Intrinsic sizing and percentage values for inline svg in html

State:
RAISED
Product:
SVG 2
Raised by:
Erik Dahlström
Opened on:
2012-03-14
Description:
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, see e.g testcase[2]. For that testcase these are the results:
opera: 400x100, 400x200
chrome: 400x200, 400x200
firefox: 400x100, 400x100
ie9: 400x150, 400x200

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
Related Actions Items:
Related emails:
  1. Re: Inline SVG sizing in CSS (from ed@opera.com on 2013-10-14)
  2. minutes, Seattle/Paris SVG WG F2F Day 1 (from cam@mcc.id.au on 2012-07-23)
  3. minutes, 22 March 2012 SVG WG telcon (from cam@mcc.id.au on 2012-03-23)
  4. agenda, 22 March 2012 SVG WG telcon (from cam@mcc.id.au on 2012-03-22)
  5. Agenda, 15 March 2012 SVG WG telcon (from ed@opera.com on 2012-03-14)
  6. SVG-ISSUE-2441: Intrinsic sizing and percentage values for inline svg in html [SVG 2] (from sysbot+tracker@w3.org on 2012-03-14)

Related notes:

Opera (Presto 2.11.339) changed to implement width/height mapped as "presentation attributes" for sizing negotiations, https://bugs.opera.com/browse/CORE-42782.

Erik Dahlström, 23 Jul 2012, 15:29:10

Display change log ATOM feed


Dirk Schulze <dschulze@adobe.com>, Chair, Chris Lilley <chris@w3.org>, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: 2441.html,v 1.1 2020/01/17 13:22:01 carcone Exp $