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

Unified Diff: Source/core/page/EventHandler.cpp

Issue 168493002: Do not handle mouse wheel events when Ctrl is pressed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: edit comment Created 6 years, 10 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: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index cf16660a6b045b4a2b1d4b08e4effbe9b3232974..f8a4fdb2d56f0039f5086460a1ce1076a0c5e0fc 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -2189,6 +2189,12 @@ bool EventHandler::handleWheelEvent(const PlatformWheelEvent& e)
RETURN_WHEEL_EVENT_HANDLED();
}
+ // Ctrl + scrollwheel is reserved for triggering zoom in/out actions in Chromium.
+ // When Ctrl is pressed and the event was not canceled by JavaScript code,
+ // return false to notify the caller that the scrollwheel event was not canceled.
+ if (e.ctrlKey())
+ return false;
+
// We do another check on the frame view because the event handler can run JS which results in the frame getting destroyed.
view = m_frame->view();
« 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