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

Unified Diff: cc/layers/scrollbar_layer_impl_base.cc

Issue 655783004: Hide scrollbars when their dimensions are not scrollable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « cc/layers/scrollbar_layer_impl_base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/scrollbar_layer_impl_base.cc
diff --git a/cc/layers/scrollbar_layer_impl_base.cc b/cc/layers/scrollbar_layer_impl_base.cc
index 5e5e279fa254ed1222791095d8506ada832853f8..b11e981e80901ed5f2bd161b2b3d95d450ff4c6a 100644
--- a/cc/layers/scrollbar_layer_impl_base.cc
+++ b/cc/layers/scrollbar_layer_impl_base.cc
@@ -122,6 +122,12 @@ bool ScrollbarLayerImplBase::SetMaximum(int maximum) {
return true;
}
+bool ScrollbarLayerImplBase::can_scroll_orientation() const {
danakj 2014/10/15 15:39:52 hacker_style functions should be for accessors, an
timav 2014/10/15 18:12:05 Hi Dana, thank you for pointing this out. So far I
danakj 2014/10/15 18:13:26 http://google-styleguide.googlecode.com/svn/trunk/
+ if (!scroll_layer_)
+ return false;
+ return scroll_layer_->user_scrollable(orientation()) && (0 < maximum());
+}
+
bool ScrollbarLayerImplBase::SetVerticalAdjust(float vertical_adjust) {
if (vertical_adjust_ == vertical_adjust)
return false;
« no previous file with comments | « cc/layers/scrollbar_layer_impl_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698