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

Side by Side Diff: content/renderer/gpu/input_handler_proxy.cc

Issue 22527005: Fix pinch gestures with nonscrollable root layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Also update InputHandlerProxy tests Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/gpu/input_handler_proxy.h" 5 #include "content/renderer/gpu/input_handler_proxy.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "content/renderer/gpu/input_handler_proxy_client.h" 10 #include "content/renderer/gpu/input_handler_proxy_client.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 bool did_scroll = input_handler_->ScrollBy( 166 bool did_scroll = input_handler_->ScrollBy(
167 gfx::Point(gesture_event.x, gesture_event.y), 167 gfx::Point(gesture_event.x, gesture_event.y),
168 gfx::Vector2dF(-gesture_event.data.scrollUpdate.deltaX, 168 gfx::Vector2dF(-gesture_event.data.scrollUpdate.deltaX,
169 -gesture_event.data.scrollUpdate.deltaY)); 169 -gesture_event.data.scrollUpdate.deltaY));
170 return did_scroll ? DID_HANDLE : DROP_EVENT; 170 return did_scroll ? DID_HANDLE : DROP_EVENT;
171 } else if (event.type == WebInputEvent::GestureScrollEnd) { 171 } else if (event.type == WebInputEvent::GestureScrollEnd) {
172 #ifndef NDEBUG 172 #ifndef NDEBUG
173 DCHECK(expect_scroll_update_end_); 173 DCHECK(expect_scroll_update_end_);
174 expect_scroll_update_end_ = false; 174 expect_scroll_update_end_ = false;
175 #endif 175 #endif
176 input_handler_->ScrollEnd();
177
176 if (!gesture_scroll_on_impl_thread_) 178 if (!gesture_scroll_on_impl_thread_)
177 return DID_NOT_HANDLE; 179 return DID_NOT_HANDLE;
178 180
179 input_handler_->ScrollEnd();
180 gesture_scroll_on_impl_thread_ = false; 181 gesture_scroll_on_impl_thread_ = false;
181 return DID_HANDLE; 182 return DID_HANDLE;
182 } else if (event.type == WebInputEvent::GesturePinchBegin) { 183 } else if (event.type == WebInputEvent::GesturePinchBegin) {
183 #ifndef NDEBUG 184 #ifndef NDEBUG
184 DCHECK(!expect_pinch_update_end_); 185 DCHECK(!expect_pinch_update_end_);
185 expect_pinch_update_end_ = true; 186 expect_pinch_update_end_ = true;
186 #endif 187 #endif
187 input_handler_->PinchGestureBegin(); 188 input_handler_->PinchGestureBegin();
188 gesture_pinch_on_impl_thread_ = true; 189 gesture_pinch_on_impl_thread_ = true;
189 return DID_HANDLE; 190 return DID_HANDLE;
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 TRACE_EVENT2("renderer", 447 TRACE_EVENT2("renderer",
447 "InputHandlerProxy::notifyCurrentFlingVelocity", 448 "InputHandlerProxy::notifyCurrentFlingVelocity",
448 "vx", 449 "vx",
449 velocity.width, 450 velocity.width,
450 "vy", 451 "vy",
451 velocity.height); 452 velocity.height);
452 input_handler_->NotifyCurrentFlingVelocity(ToClientScrollIncrement(velocity)); 453 input_handler_->NotifyCurrentFlingVelocity(ToClientScrollIncrement(velocity));
453 } 454 }
454 455
455 } // namespace content 456 } // namespace content
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | content/renderer/gpu/input_handler_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698