Index: athena/wm/window_overview_mode.cc |
diff --git a/athena/wm/window_overview_mode.cc b/athena/wm/window_overview_mode.cc |
index 0b16b6c2b288e519985d5ce0fa45e1adf5260a34..b8b10314eb9cd03653d8b617e09cfbbad4bd9a59 100644 |
--- a/athena/wm/window_overview_mode.cc |
+++ b/athena/wm/window_overview_mode.cc |
@@ -777,14 +777,15 @@ class WindowOverviewModeImpl : public WindowOverviewMode, |
// ui::CompositorAnimationObserver: |
virtual void OnAnimationStep(base::TimeTicks timestamp) override { |
CHECK(fling_); |
- if (fling_->start_timestamp() > timestamp) |
- return; |
- gfx::Vector2dF scroll = fling_->GetScrollAmountAtTime(timestamp); |
- if (scroll.IsZero()) { |
+ gfx::Vector2dF delta; |
+ bool fling_active = fling_->ComputeScrollDeltaAtTime(timestamp, &delta); |
+ |
+ if (!delta.IsZero()) |
+ DoScroll(delta.y()); |
+ |
+ if (!fling_active) { |
fling_.reset(); |
RemoveAnimationObserver(); |
- } else { |
- DoScroll(scroll.y()); |
} |
} |