summaryrefslogtreecommitdiffstats
path: root/cc/animation/scrollbar_animation_controller_linear_fade.h
diff options
context:
space:
mode:
authorjdduke@chromium.org <jdduke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-06 22:33:46 +0000
committerjdduke@chromium.org <jdduke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-06 22:33:46 +0000
commitcdc07007120f55463d20a90dea893de4b997372b (patch)
treeaac89d1078b40b873ea41567804ac29b33ca23f9 /cc/animation/scrollbar_animation_controller_linear_fade.h
parentafbf5644ca0178f542e39cd8de389940e2c2797e (diff)
downloadchromium_src-cdc07007120f55463d20a90dea893de4b997372b.zip
chromium_src-cdc07007120f55463d20a90dea893de4b997372b.tar.gz
chromium_src-cdc07007120f55463d20a90dea893de4b997372b.tar.bz2
Suppress scrollbar animation if the scroll gesture does not scroll
Currently, the scrollbar layer animation is triggered at the end of every scroll gesture. However, as not every scroll gesture actually scrolls a layer, this may trigger extraneous animations, e.g., when the user overscrolls, or presses and lifts their finger without scrolling. Only trigger the scrollbar animation at the end of a scroll gesture if the gesture caused the layer to scroll. BUG=285771 Review URL: https://chromiumcodereview.appspot.com/23978008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221801 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/animation/scrollbar_animation_controller_linear_fade.h')
-rw-r--r--cc/animation/scrollbar_animation_controller_linear_fade.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/cc/animation/scrollbar_animation_controller_linear_fade.h b/cc/animation/scrollbar_animation_controller_linear_fade.h
index 9ecb3c1..74c411f 100644
--- a/cc/animation/scrollbar_animation_controller_linear_fade.h
+++ b/cc/animation/scrollbar_animation_controller_linear_fade.h
@@ -23,14 +23,13 @@ class CC_EXPORT ScrollbarAnimationControllerLinearFade
virtual ~ScrollbarAnimationControllerLinearFade();
// ScrollbarAnimationController overrides.
- virtual bool IsScrollGestureInProgress() const OVERRIDE;
virtual bool IsAnimating() const OVERRIDE;
virtual base::TimeDelta DelayBeforeStart(base::TimeTicks now) const OVERRIDE;
virtual bool Animate(base::TimeTicks now) OVERRIDE;
virtual void DidScrollGestureBegin() OVERRIDE;
virtual void DidScrollGestureEnd(base::TimeTicks now) OVERRIDE;
- virtual void DidProgrammaticallyUpdateScroll(base::TimeTicks now) OVERRIDE;
+ virtual void DidScrollUpdate(base::TimeTicks now) OVERRIDE;
protected:
ScrollbarAnimationControllerLinearFade(LayerImpl* scroll_layer,
@@ -44,6 +43,7 @@ class CC_EXPORT ScrollbarAnimationControllerLinearFade
base::TimeTicks last_awaken_time_;
bool scroll_gesture_in_progress_;
+ bool scroll_gesture_has_scrolled_;
base::TimeDelta fadeout_delay_;
base::TimeDelta fadeout_length_;