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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 1052773002: cc: Add a rails argument to InputHandler::ScrollBy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comiple Created 5 years, 9 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/trees/layer_tree_host_impl.h ('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 00ae766155f380cb6f9ec597dd5b8575d7791b36..9e93c71a7aa4efe58b931595e224a33312c54049 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2593,12 +2593,17 @@ gfx::Vector2dF LayerTreeHostImpl::ScrollLayer(LayerImpl* layer_impl,
InputHandlerScrollResult LayerTreeHostImpl::ScrollBy(
const gfx::Point& viewport_point,
- const gfx::Vector2dF& scroll_delta) {
+ const gfx::Vector2dF& unrailed_scroll_delta,
+ InputHandler::RailsMode rails_mode) {
TRACE_EVENT0("cc", "LayerTreeHostImpl::ScrollBy");
if (!CurrentlyScrollingLayer())
return InputHandlerScrollResult();
- gfx::Vector2dF pending_delta = scroll_delta;
+ gfx::Vector2dF pending_delta = unrailed_scroll_delta;
+ if (rails_mode == InputHandler::RAILS_MODE_HORIZONTAL)
+ pending_delta.set_y(0);
+ if (rails_mode == InputHandler::RAILS_MODE_VERTICAL)
+ pending_delta.set_x(0);
gfx::Vector2dF unused_root_delta;
bool did_scroll_x = false;
bool did_scroll_y = false;
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698