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

Unified Diff: content/browser/renderer_host/input/input_router_impl.cc

Issue 739013008: Explicitly suppress scrolling for wheel events that will trigger zooming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change comments Created 6 years 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/browser/renderer_host/input/input_router_impl.cc
diff --git a/content/browser/renderer_host/input/input_router_impl.cc b/content/browser/renderer_host/input/input_router_impl.cc
index 4848f6dc6f41075434b458e3baa78175298962aa..23713cc566288d9b5c0ef621f1880b1a479c2864 100644
--- a/content/browser/renderer_host/input/input_router_impl.cc
+++ b/content/browser/renderer_host/input/input_router_impl.cc
@@ -457,7 +457,8 @@ void InputRouterImpl::SendSyntheticWheelEventForPinch(
wheelEvent.wheelTicksX = 0;
wheelEvent.wheelTicksY =
pinch_event.event.data.pinchUpdate.scale > 1 ? 1 : -1;
-
+ // Prevent trackpad pinch from scrolling on Mac OS.
+ wheelEvent.canScroll = false;
SendWheelEvent(QueuedWheelEvent(
MouseWheelEventWithLatencyInfo(wheelEvent, pinch_event.latency), true));
}

Powered by Google App Engine
This is Rietveld 408576698