Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(682)

Unified Diff: cc/input/single_scrollbar_animation_controller_thinning.cc

Issue 2692243005: Merge Compositor's ScrollbarAnimationControllers into single class (Closed)
Patch Set: fix confict constant Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/input/single_scrollbar_animation_controller_thinning.cc
diff --git a/cc/input/single_scrollbar_animation_controller_thinning.cc b/cc/input/single_scrollbar_animation_controller_thinning.cc
index d2ba28b197fdec3b5567292453321518f1efbb84..d09dd054310a79351fb700d21d1b1276ce86289b 100644
--- a/cc/input/single_scrollbar_animation_controller_thinning.cc
+++ b/cc/input/single_scrollbar_animation_controller_thinning.cc
@@ -13,11 +13,6 @@
#include "cc/layers/scrollbar_layer_impl_base.h"
#include "cc/trees/layer_tree_impl.h"
-namespace {
-const float kIdleThicknessScale = 0.4f;
-const float kDefaultMouseMoveDistanceToTriggerAnimation = 25.f;
-}
-
namespace cc {
std::unique_ptr<SingleScrollbarAnimationControllerThinning>
@@ -44,8 +39,6 @@ SingleScrollbarAnimationControllerThinning::
mouse_is_over_scrollbar_(false),
mouse_is_near_scrollbar_(false),
thickness_change_(NONE),
- mouse_move_distance_to_trigger_animation_(
- kDefaultMouseMoveDistanceToTriggerAnimation),
thinning_duration_(thinning_duration) {
ApplyThumbThicknessScale(kIdleThicknessScale);
}
@@ -140,7 +133,7 @@ void SingleScrollbarAnimationControllerThinning::DidMouseMoveNear(
float distance) {
bool mouse_is_over_scrollbar = distance == 0.0f;
bool mouse_is_near_scrollbar =
- distance < mouse_move_distance_to_trigger_animation_;
+ distance < kDefaultMouseMoveDistanceToTriggerAnimation;
if (!captured_ && mouse_is_near_scrollbar != mouse_is_near_scrollbar_) {
thickness_change_ = mouse_is_near_scrollbar ? INCREASE : DECREASE;

Powered by Google App Engine
This is Rietveld 408576698