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

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

Issue 14327014: Disable page zoom through control+scroll on Mac. (Closed) Base URL: svn://chrome-svn/chrome/trunk/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 194719)
+++ content/browser/web_contents/web_contents_impl.cc (working copy)
@@ -1236,12 +1236,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