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

Unified Diff: content/browser/renderer_host/web_input_event_aura.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: 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/web_input_event_aura.cc
diff --git a/content/browser/renderer_host/web_input_event_aura.cc b/content/browser/renderer_host/web_input_event_aura.cc
index 4fe79c16dd1aae6893132ca789bc567c5449fa50..50dcc0226f77cb7a4dd0306b980cf049b0d6bcb7 100644
--- a/content/browser/renderer_host/web_input_event_aura.cc
+++ b/content/browser/renderer_host/web_input_event_aura.cc
@@ -197,6 +197,14 @@ blink::WebMouseWheelEvent MakeWebMouseWheelEvent(ui::MouseWheelEvent* event) {
webkit_event.globalX = root_point.x();
webkit_event.globalY = root_point.y();
+ // Avoid adjusting the zoom in response to two-finger-scrolling touchpad
+ // gestures. We're enabling WebContentsImpl::HandleWheelEvent to use the
+ // event to zoom the page when MouseWheelEvent does not scroll.
tdresser 2014/12/02 15:37:38 Can you clarify this? Perhaps assign hasPreciseSc
lanwei 2014/12/02 22:28:06 Done.
+ if ((webkit_event.modifiers & blink::WebInputEvent::ControlKey)
+ && !webkit_event.hasPreciseScrollingDeltas) {
+ webkit_event.canScroll = false;
+ }
+
return webkit_event;
}

Powered by Google App Engine
This is Rietveld 408576698