| 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 44f103c9de3546fd6135e4aff5ef0ce92b1dde67..7151e151eebee9326e8a68b38424373b94d39aa1 100644
|
| --- a/content/browser/web_contents/web_contents_impl.cc
|
| +++ b/content/browser/web_contents/web_contents_impl.cc
|
| @@ -1333,15 +1333,18 @@
|
| bool WebContentsImpl::HandleWheelEvent(
|
| const blink::WebMouseWheelEvent& event) {
|
| #if !defined(OS_MACOSX)
|
| - // On platforms other than Mac, control+mousewheel may change zoom. On Mac,
|
| - // this isn't done for two reasons:
|
| + // 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 &&
|
| + if (delegate_ &&
|
| + event.wheelTicksY &&
|
| (event.modifiers & blink::WebInputEvent::ControlKey) &&
|
| - !event.canScroll) {
|
| + // Avoid adjusting the zoom in response to two-finger-scrolling touchpad
|
| + // gestures, which are regrettably easy to trigger accidentally.
|
| + !event.hasPreciseScrollingDeltas) {
|
| delegate_->ContentsZoomChange(event.wheelTicksY > 0);
|
| return true;
|
| }
|
|
|