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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 14233003: Merge 194942 "Disable page zoom through control+scroll on Mac." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1453/src/
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
===================================================================
--- content/browser/web_contents/web_contents_impl.cc (revision 194967)
+++ content/browser/web_contents/web_contents_impl.cc (working copy)
@@ -1263,12 +1263,20 @@
bool WebContentsImpl::PreHandleWheelEvent(
const WebKit::WebMouseWheelEvent& event) {
+#if !defined(OS_MACOSX)
+ // On platforms other than Mac, control+mousewheel changes zoom. On Mac, this
+ // isn't done for two reasons:
+ // -the OS already has a gesture to do this through pinch-zoom
+ // -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 & WebKit::WebInputEvent::ControlKey)) {
delegate_->ContentsZoomChange(event.wheelTicksY > 0);
return true;
}
+#endif
return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698