[csswg-drafts] [css-transitions-2] The transition's phase of without no target effect.

mantaroh has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [css-transitions-2] The transition's phase of without no target 
effect. ==
https://drafts.csswg.org/css-transitions-2/#event-dispatch

 If Web Animation has no target effect, target effect end will be 
zero, and phase won't be idle. [1]
 So behavior will different from Web Animasions.

[1] https://w3c.github.io/web-animations/#updating-the-finished-state

I think that we will need to be consistent each specification.

 We can treat as 'After' phase in this situation, however,
 Transition can't dispatch correctly following case:

```javascript
   transition.cancel();       // make idle phase
   transition.effect = null;  // make after phase
```

 Above example, we will receive 'transitioncancel', 'transitionrun', 
'transitionstart', 'transitionend',
 since phase will change from Idle to After.

 I think we will need to change phase based on current time.

 For example:
  If we cancel the animation, current time will be unresolved, since 
start time is unresolved.
  So we should set previous phase to idle when current time is 
unresolved.
  i.e. I think that we will need to change the specification as 
follow:
```
   If the transition has no target effect,
    If current time is unresolved, the transition phase is 'idle'.
    If current time is less than zero, the transition phase is 
'before'.
    Otherwise, the transition phase is 'after'.
```

@birtles 
How do you think about this change?

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/816 using your GitHub 
account

Received on Monday, 19 December 2016 05:05:35 UTC