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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 626403003: Respect user_scrollable disabling in pinch-virtual-viewport mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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/layer_impl_unittest.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index e0d2e26149d089785fae8fb3c501d32b5147a309..9540d04049df45c7c88d9c58e01fecf8041a3be1 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2570,9 +2570,11 @@ bool LayerTreeHostImpl::ScrollBy(const gfx::Point& viewport_point,
unused_root_delta.set_y(0.0f);
// Disable overscroll on axes which is impossible to scroll.
if (settings_.report_overscroll_only_for_scrollable_axes) {
- if (std::abs(active_tree_->TotalMaxScrollOffset().x()) <= kEpsilon)
+ if (std::abs(active_tree_->TotalMaxScrollOffset().x()) <= kEpsilon ||
+ !layer_impl->user_scrollable_horizontal())
unused_root_delta.set_x(0.0f);
- if (std::abs(active_tree_->TotalMaxScrollOffset().y()) <= kEpsilon)
+ if (std::abs(active_tree_->TotalMaxScrollOffset().y()) <= kEpsilon ||
+ !layer_impl->user_scrollable_vertical())
unused_root_delta.set_y(0.0f);
}
}
« no previous file with comments | « cc/layers/layer_impl_unittest.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698