Chromium Code Reviews| Index: cc/animation/scroll_offset_animations_impl.cc |
| diff --git a/cc/animation/scroll_offset_animations_impl.cc b/cc/animation/scroll_offset_animations_impl.cc |
| index f49bb9d54f7a3e3f32fd9d64241f97be9e593941..f72a2d80fa59531bef442f2988cc35bd91535451 100644 |
| --- a/cc/animation/scroll_offset_animations_impl.cc |
| +++ b/cc/animation/scroll_offset_animations_impl.cc |
| @@ -86,9 +86,14 @@ bool ScrollOffsetAnimationsImpl::ScrollAnimationUpdateTarget( |
| new_target.SetToMax(gfx::ScrollOffset()); |
| new_target.SetToMin(max_scroll_offset); |
| - curve->UpdateTarget( |
| - animation->TrimTimeToCurrentIteration(frame_monotonic_time).InSecondsF(), |
| - new_target); |
| + // TODO(ymalik): Animation::TrimTimeToCurrentIteration should probably check |
| + // for run_state == Animation::WAITING_FOR_TARGET_AVAILABILITY. |
|
ajuma
2016/08/18 14:16:25
Yeah, Animation::ConvertToActiveTime should probab
ymalik
2016/08/18 17:23:33
Yeah. I tried to do it in this CL and a bunch of t
|
| + base::TimeDelta trimmed = |
| + animation->run_state() == Animation::WAITING_FOR_TARGET_AVAILABILITY |
| + ? base::TimeDelta() |
| + : animation->TrimTimeToCurrentIteration(frame_monotonic_time); |
| + |
| + curve->UpdateTarget(trimmed.InSecondsF(), new_target); |
|
ymalik
2016/08/18 07:34:20
The observed failure mode is that when you do two
|
| return true; |
| } |