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

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: Unittest passes asan build bot. 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 57b1c922389db45c82ea5febcf7644c4cdfcf614..5100988bc3299dfb3d4ae3bb600f1169d0c3059b 100644
--- a/cc/input/scrollbar_animation_controller_thinning.cc
+++ b/cc/input/scrollbar_animation_controller_thinning.cc
@@ -84,18 +84,20 @@ const base::TimeDelta& ScrollbarAnimationControllerThinning::Duration() {
return thinning_duration_;
}
-void ScrollbarAnimationControllerThinning::DidCaptureScrollbarBegin() {
- if (opacity_ == 0.0f)
+void ScrollbarAnimationControllerThinning::DidMouseDown() {
+ if (!mouse_is_over_scrollbar_ || opacity_ == 0.0f)
return;
+
StopAnimation();
captured_ = true;
ApplyOpacity(1.f);
ApplyThumbThicknessScale(1.f);
}
-void ScrollbarAnimationControllerThinning::DidCaptureScrollbarEnd() {
- if (opacity_ == 0.0f)
+void ScrollbarAnimationControllerThinning::DidMouseUp() {
+ if (!captured_ || opacity_ == 0.0f)
return;
+
captured_ = false;
StopAnimation();
@@ -109,7 +111,7 @@ void ScrollbarAnimationControllerThinning::DidCaptureScrollbarEnd() {
}
}
-void ScrollbarAnimationControllerThinning::DidMouseMoveOffScrollbar() {
+void ScrollbarAnimationControllerThinning::DidMouseLeave() {
if (!mouse_is_over_scrollbar_ && !mouse_is_near_scrollbar_)
return;
« no previous file with comments | « cc/input/scrollbar_animation_controller_thinning.h ('k') | cc/input/scrollbar_animation_controller_thinning_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698