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

Re: animate-elem-46-t.svg

From: Daniel Holbert <dholbert@mozilla.com>
Date: Tue, 08 Jun 2010 09:54:28 -0700
Message-ID: <4C0E75C4.9040004@mozilla.com>
To: Chris Lilley <chris@w3.org>
CC: Robert Longson <longsonr@gmail.com>, www-svg@w3.org, Jeff Schiller <codedread@gmail.com>
Hi Chris!  Thanks for the response.

On 06/07/2010 10:28 PM, Chris Lilley wrote:
 > Again, no. Please, re-read the explanation in my earlier mail.

Done.  So I think one of the main points where our understandings differ 
is on the distinction between presentational attributes and CSS 
properties, though I'm still not quite sure where we differ on that.

I see the presentational attribute & the CSS property as two separate (but 
related) entities:
  - the former is an XML attribute that takes mostly-valid CSS as its 
values, and influences the computed-style of its corresponding property 
(by being translated into a CSS rule with specificity 0, as you said).
  - the latter is a normal CSS property, whose ultimate computed style is 
computed via the CSS cascade.

In light of this, RE the "units-not-required" exemption:
My understanding is that this exemption applies specifically to SVG's 
presentational attributes, and that this exemption is handled gracefully 
under-the-hood by UA's when converting the presentational attribute value 
into valid CSS to insert into the CSS cascade.

Please correct me if any of the above is wrong.

 > You seem to be working on the following assumptions, all incorrect

No, I only accept the third assumption you listed, and I'd maintain that 
it's correct (details below).

 > a) that properties can only be expressed in stylesheets (wrong, they 
can also be expressed in presentational attributes)

No, I don't make that assumption.  Properties can also have their values 
influenced via <animate> and <set>, too, for that matter.

 > b) that presentational attributes are unrelated to properties

No, I wouldn't say they're *unrelated* -- clearly the former is a way to 
influence the computed style of the latter, as I say above. They're 
distinct entities, though.  (e.g. the attribute is a true XML attribute, 
queryable in the DOM via setAttribute/getAttribute. Its value may or may 
not match the computed value of the property, depending on what other 
influences there are on the property in the style cascade.)

 > c) that setting attributeType="XML" means "animate the presentation 
attribute".

Yes! I'll grant you, I do indeed make *that* assumption, and I think it's 
a warranted one to make.  According to SVG 1.1 & 1.2T, attributeType="XML" 
means "the value of 'attributeName'  is the name of an XML attribute on 
the target element".  It sure sounds like the "font-size" presentational 
attribute  would fall into that category -- it's an XML attribute on the 
<text> element.

FWIW, Opera and WebKit seem to make that assumption, too.  The spec is a 
bit unclear on exactly how attributeType="XML" & attributeType="CSS" 
interact for presentational attributes, though, and no two SVG/SMIL 
implementations robustly match on that. I actually posted to www-svg about 
this issue in January, when I was working it out for Mozilla's SVG/SMIL 
implementation.  If you have a chance to offer any feedback on that 
thread, it'd be much appreciated:
http://lists.w3.org/Archives/Public/www-svg/2010Jan/0066.html
http://lists.w3.org/Archives/Public/www-svg/2010Jan/0067.html
http://lists.w3.org/Archives/Public/www-svg/2010Jan/0075.html

 > DH>   IIUC, that
 > DH>  change would indeed fix the test (or, at worst, leave the rendering
 > DH>  unchanged, in browsers that accept unitless values for [effectively]
 > DH>  attributeType="CSS" animations)
 >
 > No, it would specify that what is to be animated is an (unknown, 
non-existent) attribute called 'font-family' which is not a property. 
Therte is no such attribute.

(I'm assuming you meant s/font-family/font-size/)
What? "not a property" / "no such attribute"?  certainly 'font-size' is 
both a property and an attribute! (and so is 'font-family', for that 
matter :))

But anyway, are you saying that this animation...
     <animate attributeName="font-size" attributeType="XML" ...>
...should have no effect at all?  Please clarify, because I'm very 
confused by this part of your response.

Note also that in paragraphs 7-8 of smil-animation 3.5...
   http://www.w3.org/TR/smil-animation/#AnimationSandwichModel
... it basically says that attributeType="XML" means to create a 
presentation value *for the XML attribute* (getting the base value from 
the DOM, and passing the animated value into the style cascade).  Whereas 
for attributeType="CSS", it says we're supposed to effectively override 
the final computed-value, and use the "normal" computed-value as the base 
value for our animation.  These are two distinctly different behaviors 
(though they can produce the same outcome in simple cases), and (according 
to SMIL) *that's* supposed to be what attributeType selects between.  Both 
behaviors are applicable to 'font-size', IIUC.

(There's similar language in the more recent SMIL3 smil-animation 
component, too.)

Sorry for the long-winded response. :)
~Daniel
Received on Tuesday, 8 June 2010 16:55:03 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:45 GMT