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

Unified Diff: cc/input/scrollbar_animation_controller_thinning.cc

Issue 2422353002: Iframe/div MD scrollbars get idle when mouse leaves the nested elements. (Closed)
Patch Set: Move the scrollbar animation logic to animation controllers. Created 4 years, 2 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/scrollbar_animation_controller_thinning.cc
diff --git a/cc/input/scrollbar_animation_controller_thinning.cc b/cc/input/scrollbar_animation_controller_thinning.cc
index 74352996fcff1cb964b2685c956ac76819694980..acd7579ed3683bf7253832dc14fb5dba38957318 100644
--- a/cc/input/scrollbar_animation_controller_thinning.cc
+++ b/cc/input/scrollbar_animation_controller_thinning.cc
@@ -66,14 +66,19 @@ void ScrollbarAnimationControllerThinning::RunAnimationFrame(float progress) {
}
}
-void ScrollbarAnimationControllerThinning::DidCaptureScrollbarBegin() {
+void ScrollbarAnimationControllerThinning::DidMouseDown() {
+ if (!mouse_is_over_scrollbar_)
+ return;
+
captured_ = true;
ApplyOpacityAndThumbThicknessScale(1, 1.f);
}
-void ScrollbarAnimationControllerThinning::DidCaptureScrollbarEnd() {
- captured_ = false;
+void ScrollbarAnimationControllerThinning::DidMouseUp() {
+ if (!captured_)
+ return;
+ captured_ = false;
if (!mouse_is_over_scrollbar_)
opacity_change_ = DECREASE;
if (!mouse_is_near_scrollbar_)

Powered by Google App Engine
This is Rietveld 408576698