diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/cc/input/scrollbar_animation_controller.cc | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/cc/input/scrollbar_animation_controller.cc')
-rw-r--r-- | chromium/cc/input/scrollbar_animation_controller.cc | 39 |
1 files changed, 5 insertions, 34 deletions
diff --git a/chromium/cc/input/scrollbar_animation_controller.cc b/chromium/cc/input/scrollbar_animation_controller.cc index 2435aa156fe..50242fb337c 100644 --- a/chromium/cc/input/scrollbar_animation_controller.cc +++ b/chromium/cc/input/scrollbar_animation_controller.cc @@ -51,8 +51,6 @@ ScrollbarAnimationController::ScrollbarAnimationController( is_animating_(false), animation_change_(NONE), scroll_element_id_(scroll_element_id), - currently_scrolling_(false), - show_in_fast_scroll_(false), opacity_(initial_opacity), show_scrollbars_on_scroll_gesture_(false), need_thinning_animation_(false), @@ -73,8 +71,6 @@ ScrollbarAnimationController::ScrollbarAnimationController( is_animating_(false), animation_change_(NONE), scroll_element_id_(scroll_element_id), - currently_scrolling_(false), - show_in_fast_scroll_(false), opacity_(initial_opacity), show_scrollbars_on_scroll_gesture_(true), need_thinning_animation_(true), @@ -182,25 +178,6 @@ void ScrollbarAnimationController::RunAnimationFrame(float progress) { StopAnimation(); } -void ScrollbarAnimationController::DidScrollBegin() { - currently_scrolling_ = true; -} - -void ScrollbarAnimationController::DidScrollEnd() { - bool has_scrolled = show_in_fast_scroll_; - show_in_fast_scroll_ = false; - - currently_scrolling_ = false; - - // We don't fade out scrollbar if they need thinning animation and mouse is - // near. - if (need_thinning_animation_ && MouseIsNearAnyScrollbar()) - return; - - if (has_scrolled && !tickmarks_showing_) - PostDelayedAnimation(FADE_OUT); -} - void ScrollbarAnimationController::DidScrollUpdate() { UpdateScrollbarState(); } @@ -213,19 +190,13 @@ void ScrollbarAnimationController::UpdateScrollbarState() { Show(); - // As an optimization, we avoid spamming fade delay tasks during active fast - // scrolls. But if we're not within one, we need to post every scroll update. - if (!currently_scrolling_) { - // We don't fade out scrollbar if they need thinning animation (Aura - // Overlay) and mouse is near or tickmarks show. - if (need_thinning_animation_) { - if (!MouseIsNearAnyScrollbar() && !tickmarks_showing_) - PostDelayedAnimation(FADE_OUT); - } else { + // We don't fade out scrollbar if they need thinning animation (Aura + // Overlay) and mouse is near or tickmarks show. + if (need_thinning_animation_) { + if (!MouseIsNearAnyScrollbar() && !tickmarks_showing_) PostDelayedAnimation(FADE_OUT); - } } else { - show_in_fast_scroll_ = true; + PostDelayedAnimation(FADE_OUT); } if (need_thinning_animation_) { |