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 5100988bc3299dfb3d4ae3bb600f1169d0c3059b..2006d98fddb44a0779c850a7be0c32edb12c5d1c 100644 |
--- a/cc/input/scrollbar_animation_controller_thinning.cc |
+++ b/cc/input/scrollbar_animation_controller_thinning.cc |
@@ -164,6 +164,10 @@ void ScrollbarAnimationControllerThinning::DidMouseMoveNear(float distance) { |
StartAnimation(); |
} |
+bool ScrollbarAnimationControllerThinning::ScrollbarsHidden() const { |
+ return opacity_ == 0.0f; |
+} |
+ |
float ScrollbarAnimationControllerThinning::ThumbThicknessScaleAt( |
float progress) { |
if (thickness_change_ == NONE) |
@@ -213,7 +217,13 @@ void ScrollbarAnimationControllerThinning::ApplyOpacity(float opacity) { |
} |
} |
+ bool previouslyVisible = opacity_ > 0.0f; |
+ bool currentlyVisible = opacity > 0.0f; |
+ |
opacity_ = opacity; |
+ |
+ if (previouslyVisible != currentlyVisible) |
+ client_->DidChangeScrollbarVisibility(); |
} |
void ScrollbarAnimationControllerThinning::ApplyThumbThicknessScale( |