[csswg-drafts] [web-animations-1] Handling non-monotonically increasing timelines when setting the timeline of an animation. (#5422)

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

== [web-animations-1] Handling non-monotonically increasing timelines when setting the timeline of an animation. ==
The procedure for setting the timeline does not fully align with the expected behavior for scroll timelines.  Notably:
* When switching to a scroll timeline or between scroll timelines, start time should to updated to ensure that current time is in sync with the scroll position.
* When switching from a scroll timeline to a document timeline, current time should be preserved.

https://drafts.csswg.org/web-animations-1/#setting-the-timeline

Presently we have logic in play and pause to handle specific requirements for non-monotonically increasing (scroll) timelines.  The proposed behavior would ensure that the following two methods for starting a scroll linked animation produce the same effect:

const animation = elem.animate(...);
animation.timeline = scrollTimeline;

and

const animation = new Animation(..., scrollTimeline);
animation.play();

At present, Blink only supports the second option, but development is underway to support mutable timelines, which is required for supporting the CSS property 'animation-timeline'.



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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 12 August 2020 20:49:18 UTC