Chromium Code Reviews| 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..48679c5373ff5afc47da913edc25b9f6f839f855 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(); |
| + // Scroll events generated from the mouse wheel when the control key is held |
| + // don't trigger scrolling. Instead, they may cause zooming. |
| + bool from_mouseWheel = !webkit_event.hasPreciseScrollingDeltas; |
|
tdresser
2014/12/03 13:45:05
Sorry, I used the wrong formatting in my comment.
lanwei
2014/12/03 22:06:44
Done.
|
| + if ((webkit_event.modifiers & blink::WebInputEvent::ControlKey) |
| + && from_mouseWheel) { |
|
jdduke (slow)
2014/12/03 21:37:10
Nit: The && should be at the end of the preceding
lanwei
2014/12/03 22:06:44
Done.
Yes, just realize they have different style
|
| + webkit_event.canScroll = false; |
| + } |
| + |
| return webkit_event; |
| } |