[animation worklet] Do not set start_time_ if scroll timeline has unresolved current time
Currently when scroll timeline has unresolved current time, e.g. the scroll source is not scrollable, we set WorkletAnimation::start_time_ to base::TimeDelta::FromSecondsD(NaN) which is incorrect. Other changes in the patch: 1. By spec [1], unresolved time values are represented by null. Update tests to match that. 2. For WorkletAnimation with ScrollTimeline, it's legit not to set start_time_. Update DCHECKs for this behavior. [1] https://drafts.csswg.org/web-animations/#time-values-in-the-programming-interface Bug: 905358 Change-Id: Ifde3890a6a4ad9e27dda8d4a78c5b6dcbf24ef54 Reviewed-on: https://chromium-review.googlesource.com/c/1336055 Commit-Queue: Yi Gu <yigu@chromium.org> Reviewed-by:Majid Valipour <majidvp@chromium.org> Reviewed-by:
Stephen McGruer <smcgruer@chromium.org> Cr-Commit-Position: refs/heads/master@{#608841}
Showing
Please register or sign in to comment