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

Unified Diff: cc/layers/layer_impl.cc

Issue 640063002: Hide scrollbars when their dimensions are not scrollable. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Hide scrollbar by setting opacity to 0 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/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 6dfec0e7d71c2069e3666f34d1371dbd275128fc..83e9643edd23d97e6e5e691be88fa2b917ba75c3 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -383,6 +383,11 @@ void LayerImpl::SetScrollClipLayer(int scroll_clip_layer_id) {
scroll_clip_layer_ = layer_tree_impl()->LayerById(scroll_clip_layer_id);
}
+bool LayerImpl::user_scrollable(ScrollbarOrientation orientation) const {
+ return (orientation == HORIZONTAL) ? user_scrollable_horizontal_
+ : user_scrollable_vertical_;
+}
+
void LayerImpl::ApplySentScrollDeltasFromAbortedCommit() {
// Pending tree never has sent scroll deltas
DCHECK(layer_tree_impl()->IsActiveTree());
« cc/animation/scrollbar_animation_controller_linear_fade.cc ('K') | « cc/layers/layer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698