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

Unified Diff: content/renderer/input/input_handler_proxy.cc

Issue 835523006: Explicitly suppress scrolling for wheel events that will trigger zooming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add DCHECK Created 5 years, 11 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: content/renderer/input/input_handler_proxy.cc
diff --git a/content/renderer/input/input_handler_proxy.cc b/content/renderer/input/input_handler_proxy.cc
index 6bf42fd3ee43ca672b11c7d74bdfdf693b8c969a..c62d4893dfaecb168a437865cba38a0c29ac2e42 100644
--- a/content/renderer/input/input_handler_proxy.cc
+++ b/content/renderer/input/input_handler_proxy.cc
@@ -322,9 +322,9 @@ InputHandlerProxy::EventDisposition InputHandlerProxy::HandleMouseWheel(
// TODO(jamesr): We don't properly handle scroll by page in the compositor
// thread, so punt it to the main thread. http://crbug.com/236639
result = DID_NOT_HANDLE;
- } else if (wheel_event.modifiers & WebInputEvent::ControlKey) {
- // Wheel events involving the control key never trigger scrolling, only
- // event handlers. Forward to the main thread.
+ } else if (!wheel_event.canScroll) {
+ // Wheel events with |canScroll| == false will not trigger scrolling,
+ // only event handlers. Forward to the main thread.
result = DID_NOT_HANDLE;
} else if (smooth_scroll_enabled_) {
cc::InputHandler::ScrollStatus scroll_status =
« no previous file with comments | « content/common/input/web_input_event_traits_unittest.cc ('k') | content/renderer/input/input_handler_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698