- From: Majid Valipour via GitHub <sysbot+gh@w3.org>
- Date: Wed, 16 Jan 2019 21:33:11 +0000
- To: public-css-archive@w3.org
So far, for our implementation of ScrollTimeline in Chrome we have treated scroll linked animations as it they always have a set Zero start time (i.e., as if they always start at 0). However this breaks some other behaviors in web-animations specifically where *startTime* is adjusted during seeking. The main two cases that I know about are: 1. when currentTime of a playing animation is set via animation.currentTime. 2. when playbackRate is changed, in order to maintain the previous currentTime and prevents a jump in the animation output. By making the startTime be always Zero for scroll-linked animations we are preventing these to happen as expected. So for (1) setting the currentTime of a playing animation is simply ignored and for (2) we will see a jump in animation output as you pointed out. Here are potential solutions to this that we have thought about: * **A** - Keep scroll-linked animation's startTime *always* Zero (this is current Chromium behavior) and accept the above implications of currentTime jumping in certain cases. * **B**. Always start an scroll-linked animation with *Zero* startTime but allow the startTime to change afterward e.g., when seeking. This addresses the main concern in original issue but has its own odd behavior e.g., startTime can fall outside valid range of the ScrollTimeline! <sup>^</sup> * **C**. (B) without the initial behavior which is simply what web-animations does and I think can be footgun for devs per initial bug report. Any other ideas or alternatives here? ^: Consider an scroll-linked animation @ t = T * 0.5 where T is the ScrollTimeline's timeRange. If one sets the currentTime of the animations to T, it will force its startTime to be adjusted to -T * 0.5 which is outside the valid range of the scrollTimeline. Similar situation can arise by adjusting playbackRate. -- GitHub Notification of comment by majido Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2075#issuecomment-454950718 using your GitHub account
Received on Wednesday, 16 January 2019 21:33:12 UTC