Re: [web-animations] Ordering animations based on when they transition from idle

On 2015/07/02 15:10, Shane Stephens wrote:
>     I guess either you're suggesting:
>
>     a) Updating animation properties triggers a global sequence number
>          rewrite (I hope this isn't the case), or
>
>     b) Script-animations and CSS animations share the same source of
>          sequence numbers but when we come to prioritize animations we
>          don't use them for prioritizing CSS animations (or at least we
>          *first* sort by script vs CSS, then by document order, then
>          finally by animation-name order which happens to match sequence
>          number order).
>
>     I'm pretty sure you're suggesting (b) but I want to be sure.
>
>
> Yup. What I had expressed it as was:
> "CSS animations use sequence number as priority, and are created in
> tree- and list- order. CSS Animations are still prioritized absolutely
> above script animations (there are two lists). "

I think script animations should trump CSS animations.

Also, I think we need to clarify when these sequence numbers are
updated. Presumably changes to tree order prior to disassociating the
animations are respected. If so, I think that leaves us with:

CSS animations that are owned by script (i.e. no longer associated with
markup) are prioritized as follows:

1. Animations are sorted by the moment (style change event) where
    they were that were disassociated from style.
2. Animations that were disassociated from style at the same moment
    sort by document order of the (pseudo-)element they were associated
    with at the style change event prior to when they were disassociated.
3. Animations that were disassociated from style at the same moment and
    were associated with the same (pseudo-)element sort by their
    relative position in the computed value of the animation-name
    property on that element at the style change event prior to when
    they were disassociated.

Does that sound right? (I actually hope not since I'd rather not
implement it!)

Best regards,

Brian

Received on Friday, 3 July 2015 02:22:22 UTC