Re: Agenda request: Presentation attributes in animation sandwich model

On 02/24/2012 03:20 PM, Dirk Schulze wrote:
> Can you give an example of a potential depth-spiral?

Suppose SMIL is animating opacity from 0 to 1 over one second.  Suppose 
the first SMIL sample is at 0.1s -- so SMIL will update the opacity to 
0.1.  This causes the computed style of opacity to change (from 0 to 
0.1).  If we have "transition-property: opacity" set, then that can 
trigger a transition, spreading this 0-->0.1 change out over some period 
of time (the transition-duration).  This would happen for _every SMIL 
sample_ -- we'd get tons of intermediate transitions, smearing out the 
effects of the SMIL animation and stomping on each other.

("death-spiral" might have been an exaggeration, but the point is we'd 
get tons of probably-unintended transitions being fired)

So -- to prevent this, Gecko prevents transitions from being triggered 
by the style changes produced by SMIL animations.

> Please don't take WebKit as reference

Cool.  (I didn't mean to do so; I was just stating the facts. :))

>> I tested Opera,
>> too, but it wouldn't seem to honor the transition.
> Could it mean that SMIL animation just overrides Transition?

No. I included a rect at the bottom of the testcase that has no SMIL 
animation at all -- _just_ a CSS transition.  Even there, Opera ignores 
the transition.

~Daniel

P.S. I posted a testcase with CSS animations competing against SMIL, here:
 
http://people.mozilla.org/~dholbert/tests/smil/compat_tests/animationsVsSMIL_v1.svg
In both Webkit & Gecko, the CSS animation "wins" there.  Opera ignores 
the CSS animation completely. (I'm not sure about their css animation 
support.)  (I'm not testing IE because I'm on Linux at the moment.)

Received on Friday, 24 February 2012 23:47:15 UTC