[csswg-drafts] [scroll-animations-1][web-animations-2] getAnimations should return scroll animations which haven't ticked yet. (#8053)

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

== [scroll-animations-1][web-animations-2] getAnimations should return scroll animations which haven't ticked yet. ==
In web-animations-1, [getAnimations](https://www.w3.org/TR/web-animations-1/#dom-animatable-getanimations) is defined to return the list of [relevant](https://www.w3.org/TR/web-animations-1/#relevant-animation) animations, most notably where the [associated effect](https://www.w3.org/TR/web-animations-1/#animation-associated-effect) is [current](https://www.w3.org/TR/web-animations-1/#current) or [in effect](https://www.w3.org/TR/web-animations-1/#in-effect). The intent is to not need to return animations which will no longer having an affect on the element. Animations which will later have an effect are still considered current.

Scroll-linked animations are not current or in effect when:
* They have just been constructed and have not sampled the scroll position yet, see [avoiding cycles with layout](https://drafts.csswg.org/scroll-animations-1/#avoiding-cycles).
* The scroller is not currently scrollable

In both of these cases, I think developers would expect the animation to still be considered relevant as it may later have an effect, just as they also expect an animation which has been delayed to be returned by getAnimations.

I propose these animations should be considered to be current, as the [definition for current](https://www.w3.org/TR/web-animations-1/#ref-for-current) suggests it includes any animation which may become in play. This would mean:
* These animations would be listed in getAnimations per [web-animations-1 6.8](https://www.w3.org/TR/web-animations-1/#dom-animatable-getanimations)
* Animated properties will act as if will-change is specified per [web-animations-1 5.6](https://www.w3.org/TR/web-animations-1/#side-effects-section).

Concretely the change could be adding "If has finite timeline is true" to the list of [conditions under which an animation is considered to be current](https://www.w3.org/TR/web-animations-1/#current).


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


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

Received on Wednesday, 9 November 2022 19:23:57 UTC