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

Unified Diff: content/browser/web_contents/web_contents_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: Created 6 years, 1 month 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/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index e6f8713fdb8985d0631ca19b12868461d106921c..b80f85230d4dfa3d773a6c91c6446a407116f246 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1331,12 +1331,9 @@ bool WebContentsImpl::HandleWheelEvent(
// -if a user starts an inertial scroll, let's go, and presses control
// (i.e. control+tab) then the OS's buffered scroll events will come in
// with control key set which isn't what the user wants
- if (delegate_ &&
- event.wheelTicksY &&
- (event.modifiers & blink::WebInputEvent::ControlKey) &&
+ if (delegate_ && event.wheelTicksY && event.suppressScroll) {
Rick Byers 2014/11/27 17:31:32 I think we should probably keep the ControlKey che
lanwei 2014/12/02 06:28:54 Done.
// Avoid adjusting the zoom in response to two-finger-scrolling touchpad
// gestures, which are regrettably easy to trigger accidentally.
tdresser 2014/11/27 15:06:08 Indentation is wrong here, but I think this commen
Rick Byers 2014/11/27 17:31:32 The comment is still useful but now belongs in Mak
lanwei 2014/12/02 06:28:54 Done.
lanwei 2014/12/02 06:28:54 Done.
- !event.hasPreciseScrollingDeltas) {
delegate_->ContentsZoomChange(event.wheelTicksY > 0);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698