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

Unified Diff: cc/animation/scrollbar_animation_controller_linear_fade.cc

Issue 640063002: Hide scrollbars when their dimensions are not scrollable. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added unit tests Created 6 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/animation/scrollbar_animation_controller_linear_fade.cc
diff --git a/cc/animation/scrollbar_animation_controller_linear_fade.cc b/cc/animation/scrollbar_animation_controller_linear_fade.cc
index 90437b3835b322c09649fe35d024d603d05bcc0b..f65fd727ac4fe50f9c8666ac3489a8426eb59b6a 100644
--- a/cc/animation/scrollbar_animation_controller_linear_fade.cc
+++ b/cc/animation/scrollbar_animation_controller_linear_fade.cc
@@ -62,8 +62,9 @@ void ScrollbarAnimationControllerLinearFade::ApplyOpacityToScrollbars(
it != scrollbars->end();
++it) {
ScrollbarLayerImplBase* scrollbar = *it;
+
if (scrollbar->is_overlay_scrollbar())
- scrollbar->SetOpacity(opacity);
+ scrollbar->SetOpacity(scrollbar->can_scroll_orientation() ? opacity : 0);
}
}

Powered by Google App Engine
This is Rietveld 408576698