W3C home > Mailing lists > Public > www-svg@w3.org > August 2009

Re: Inheritance during SVG Animation of CSS properties -- should "base value" incorporate ancestors' animation effects?

From: Daniel Holbert <dholbert@mozilla.com>
Date: Mon, 03 Aug 2009 17:21:13 -0700
Message-ID: <4A777EF9.5010600@mozilla.com>
To: www-svg@w3.org
CC: Brian Birtles <birtles@gmail.com>, Robert O'Callahan <roc@ocallahan.org>, Cameron McCormack <cam@mcc.id.au>
Hi Cameron,

On 07/22/2009 07:13 PM, Cameron McCormack wrote:
> SMIL 3 mentions the issue with the override style sheet affecting the
> computed value:
> 
>   http://www.w3.org/TR/SMIL3/smil-animation.html#animationNS-AnimationSandwichModel

Ah, thanks for that link!  I'm afraid that page makes things worse,
though. :(  In particular, I think it disagrees with my (and your, and
Opera/Batik's) interpretation on this issue. The important prose that's
been added since SMIL 2.1 is:

  "Note that it is assumed that before reading the [base] value, the
  override stylesheet is cleared so that the animation works
  on the original document value."

That pretty clearly says we should *not* include inherited animation
effects in base values for CSS properties.  We're directed to clear the
*whole* override stylesheet, and use the (presumably un-animated)
"original document value".

There's actually a chunk later on that, to me, seems to forbid
inheritance for all attributes (not just CSS properties):

  "Initially, before any animations for a given attribute are
   active, the presentation value will be identical to the
   original value specified in the document (the OM value)."

My reading of this is: before a given attribute [on a given element] is
actively animated, its presentation value must match its specified/OM
value [regardless of any active animations on ancestors].  In other
words, animation effects on ancestors are ignored -- no inheritance.
(Notably, this chunk is actually present in the 2.0 & 2.1 versions of
the "smil-animation" spec, as well.)

(Perhaps my interpretation of this chunk is too strict?)

Both of the above-quoted chunks contradict the chunk of the SVG 1.1 spec
about animations & inheritance (section 19.2.9) -- which specifically
states that animated values *are* supposed to be inherited.

Maybe these are simply cases where SVG "overrules" SMIL, in defining its
language-specific customizations?  Actually, given that the SMIL 3.0
Animation spec page never even mentions the word "inherit", it's
arguable that SMIL just ignores the inheritance issue altogether. (This
would make sense, since "generalized" XML doesn't necessarily have
inheritance, AFAIK).  In this case, it would be up to the SVG spec to
define how animation should work with inheritance (probably by flushing
out section 19.2.9).

I'd appreciate any feedback that anyone has on this...  Taking all of
the above into account, I can try to come up with some improved prose
for section SVG 1.1 section 19.2.9, per Cameron's request here:
> That section could do with rewording to explain this whole issue.  If
> you’d like to propose some replacement text soon there might be enough
> time to get it into the Second Edition.
(If it ends up being too late for the SVG 1.1 Second Edition, perhaps
the improved prose can at least make it into a clarification in the
"errata" section.)

Thanks,
~Daniel
Received on Tuesday, 4 August 2009 00:21:55 GMT

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