[csswg-drafts] ScrollTimeline with unresolved time value shouldn't be considered as "inactive" in some cases (#4347)

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

== ScrollTimeline with unresolved time value shouldn't be considered as "inactive" in some cases ==
By [spec](https://www.w3.org/TR/web-animations-1/#responding-to-a-newly-inactive-timeline), if the animation timeline becomes newly inactive, i.e. its current time is newly unresolved, if the previous current time is resolved, we should use the previous current time to run the animation.

However, for **scroll timeline**, we are expecting different behaviors. By [spec](https://wicg.github.io/scroll-animations/#current-time-algorithm), the current time of scroll timeline is unresolved
1. If scrollSource does not currently have a CSS layout box, or if its layout box is not a scroll container;
2. If current scroll offset is less than startScrollOffset, return an unresolved time value if fill is none or forwards
3. If current scroll offset is greater than or equal to endScrollOffset, return an unresolved time value if fill is none or backwards

For 1, applying the last current time to hold the time value is reasonable. The timeline becomes **inactive** in such case.
For 2 and 3, applying the last current time may actually force a fill-mode. Rather, the animation should be disabled in such case. i.e. timeline's time value remains **unresolved**.

In another word, we should differentiate the concepts **inactive** and **unresolved** for scroll timeline. A scroll timeline is **inactive** in case 1 and the last current time (if resolved) should be applied. In case 2 and 3, the scroll timeline's time value remains **unresolved** and the animation should be disabled.

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

Received on Thursday, 19 September 2019 05:42:20 UTC