W3C home > Mailing lists > Public > www-svg@w3.org > October 2010

Re: inconsistency about preserveAspectRatio for <image> element

From: ddailey <ddailey@zoominternet.net>
Date: Mon, 11 Oct 2010 21:00:34 -0400
Message-ID: <6A991C52DFAE4FC6B43B895D291460EC@disxgdg31szkx7>
To: "Daniel Holbert" <dholbert@mozilla.com>, <www-svg@w3.org>
My third question in [1] raised a related question to what Daniel discusses 
here. At the time I asked it, folks got rather carried away talking about my 
first question (SVG support for GIF) and though I may have missed something 
I didn't see if anything came up on the others. *

My sense is that if an author goes to the trouble of specifying both height 
and width of an image, then they probably mean it regardless of the default 
value of preserveAspectRatio. It's not quite the same thing as what Daniel 
is talking about, but if the question of when to honor that attribute is 
raised, then can that idea be considered as well?


[1] http://lists.w3.org/Archives/Public/www-svg/2010Sep/0117.html
* The issue (#2) of mentioning how to properly use <title> and <desc> in the 
part of the spec that talks about <image> was indirectly discussed elsewhere 
(svg-developers I think), but I still think that given the purposes to which 
<image> is usually put and its similarity to HTML <img> (with its alt 
attribute), folks are likely to be looking there in the spec for 
advice.Rather than other places.

----- Original Message ----- 
From: "Daniel Holbert" <dholbert@mozilla.com>
To: <www-svg@w3.org>
Sent: Monday, October 11, 2010 7:54 PM
Subject: inconsistency about preserveAspectRatio for <image> element

Hi www-svg,

I'm writing to request a modification to the SVG 1.1 spec, to clear up
an inconsistency.

The inconsistent sections are quoted at the bottom of this post.

The inconsistency is as follows:
 - The <image> documentation[1] says that the referenced SVG root node's
preserveAspectRatio attribute is "ignored".  It doesn't mention any
exceptions to this rule.
 - BUT, the preserveAspectRatio documentation[2] says that this
attribute might **not** be ignored -- in particular, if we have
  <image preserveAspectRatio="defer" ...>
then the root node's preserveAspectRatio value will be honored.

Please consider editing the <image> documentation to be less absolute
(and more consistent with the preserveAspectRatio documentation).

For example, the <image> documentation[1] could be modified to say
something like:
> When an ‘image’ element references an SVG image, the
> clip and overflow properties on the root element in the
> referenced SVG image are ignored.  The ‘preserveAspectRatio’
> attribute on the root element might also be ignored, depending
> on the value of the ‘image’ element's ‘preserveAspectRatio’
> attribute -- see the ‘preserveAspectRatio’ documentation
> for more details.

(I'm not sure if 'might' is the right word above -- sadly I'm not fluent
in spec-speak. :))

Daniel Holbert
Mozilla Corporation

[1] Section 5.7, on image:
> When an ‘image’ element references an SVG image the
>‘preserveAspectRatio’ attribute as well as the clip
> and overflow properties on the root element in the
> referenced SVG image are ignored

[2] Section 7.8, on preserveAspectRatio:
> If the value of ‘preserveAspectRatio’ on an ‘image’
> element starts with 'defer' then the value of the
> ‘preserveAspectRatio’ attribute on the referenced
> content if present should be used.
Received on Tuesday, 12 October 2010 01:01:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:28 UTC