Re: [css-animations] Animations that start and end in the past

On Tue, May 27, 2014 at 5:59 PM, Sylvain Galineau <galineau@adobe.com> wrote:
> On May 27, 2014, at 1:29 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>> On Tue, May 27, 2014 at 12:28 AM, Brian Birtles <bbirtles@mozilla.com> wrote:
>>> 2) Does this animation fire events?
>>
>> The spec says yes.
>
> Where? I don't think it says so unambiguously for this odd case. It's not clear whether a 0s animation fires events at the moment, for instance (issue is noted in the spec); this particular animation has a positive duration but its negative delay results in an effective 0s duration which makes it a bit of an oddball. (There are other pending issues in this area e.g. when to fire events for an animation applied in the paused state...).

It doesn't say not to, and so the general language about animations
firing events should still apply.

>>> 3) If this animation does fire events, what is the elapsedTime member?
>>
>> The spec says equal to the absolute value of the delay, but it sounds
>> like the spec forgot to think about animations whose duration is less
>> than the delay.  I think it should be equal to min(abs(delay),
>> duration).
>
> I'm not sure the spec 'forgot'. I think this scenario has really been defined, hence the uneven interop.

Do you mean "dont' think"?

> I think it'll be easier to nail the animation event model once we agree on basic use-cases for these events. If the use-case is 'start another effect synchronized with the execution (interpolation) of my animation' then we could, for instance, conclude that an animation applied in the paused state should probably not fire animationstart until it's in the running state *even if it also has a negative delay applied to it*. There has been disagreement on this in the past.
>
> In this particular case it's not clear to me that events should fire here. Or what breaks if they don't.

In general, the transition and animation event models are broken,
because devs can't rely on them firing predictably (transitions don't
occur if the value doesn't change, etc.)  It might be nice if it
wasn't *quite* so broken in this kind of way, but in any case WebAnim
is the right way to chain things together, so maybe it doesn't matter.

~TJ

Received on Wednesday, 28 May 2014 01:43:49 UTC