From cdc07007120f55463d20a90dea893de4b997372b Mon Sep 17 00:00:00 2001 From: "jdduke@chromium.org" Date: Fri, 6 Sep 2013 22:33:46 +0000 Subject: 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 --- cc/animation/scrollbar_animation_controller_linear_fade.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cc/animation/scrollbar_animation_controller_linear_fade.h') 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_; -- cgit v1.1