[animation worklet] start_time_ should not be set if scroll timeline has unresolved current time |
||
Issue descriptionCurrently 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.
,
Nov 16
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c023bb9b0a6a898c1296111b10929da95a56f0a2 commit c023bb9b0a6a898c1296111b10929da95a56f0a2 Author: Yi Gu <yigu@chromium.org> Date: Fri Nov 16 17:42:25 2018 [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} [modify] https://crrev.com/c023bb9b0a6a898c1296111b10929da95a56f0a2/cc/animation/worklet_animation.cc [modify] https://crrev.com/c023bb9b0a6a898c1296111b10929da95a56f0a2/third_party/WebKit/LayoutTests/fast/animation/scroll-animations/scrolltimeline-currenttime-nan.html [modify] https://crrev.com/c023bb9b0a6a898c1296111b10929da95a56f0a2/third_party/WebKit/LayoutTests/fast/animation/scroll-animations/scrolltimeline-currenttime.html [modify] https://crrev.com/c023bb9b0a6a898c1296111b10929da95a56f0a2/third_party/blink/renderer/core/animation/scroll_timeline.cc [modify] https://crrev.com/c023bb9b0a6a898c1296111b10929da95a56f0a2/third_party/blink/renderer/core/animation/scroll_timeline_test.cc [modify] https://crrev.com/c023bb9b0a6a898c1296111b10929da95a56f0a2/third_party/blink/renderer/modules/animationworklet/worklet_animation.cc
,
Nov 17
|
||
►
Sign in to add a comment |
||
Comment 1 by yigu@chromium.org
, Nov 14