Chromium Code Reviews| Index: cc/animation/scroll_offset_animation_curve.cc |
| diff --git a/cc/animation/scroll_offset_animation_curve.cc b/cc/animation/scroll_offset_animation_curve.cc |
| index a3831432897b6f8b3b71295254768597d06f2e8e..16ff073655ca669e4c4f750dcea192c685871f51 100644 |
| --- a/cc/animation/scroll_offset_animation_curve.cc |
| +++ b/cc/animation/scroll_offset_animation_curve.cc |
| @@ -228,6 +228,15 @@ void ScrollOffsetAnimationCurve::UpdateTarget( |
| gfx::Vector2dF old_delta = target_value_.DeltaFrom(initial_value_); |
| gfx::Vector2dF new_delta = new_target.DeltaFrom(current_position); |
| + // The last segement was of zero duration. |
| + if ((total_animation_duration_ - last_retarget_).is_zero()) { |
| + DCHECK_EQ(t, last_retarget_.InSecondsF()); |
| + total_animation_duration_ = |
| + SegmentDuration(new_delta, duration_behavior_, base::TimeDelta()); |
|
skobes
2016/09/12 22:45:46
Pass delayed_by here?
ymalik
2016/09/12 23:35:05
Done.
|
| + target_value_ = new_target; |
| + return; |
| + } |
| + |
| double old_duration = |
| (total_animation_duration_ - last_retarget_).InSecondsF(); |
| double old_normalized_velocity = timing_function_->Velocity( |