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

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

Issue 768443002: Honor the wheel event canScroll bit instead of trying to infer it from the ctrl modifier (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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 | « LayoutTests/fast/events/wheelevent-ctrl-expected.txt ('k') | Source/platform/scroll/ScrollableArea.cpp » ('j') | 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 850bdba7fad1bcaa7d325a5bc7ea2e38d98a7b02..d18ce673aef5a28522d522be43d0c23705358c40 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -2062,8 +2062,8 @@ void EventHandler::defaultWheelEventHandler(Node* startNode, WheelEvent* wheelEv
if (!startNode || !wheelEvent)
return;
- // Ctrl + scrollwheel is reserved for triggering zoom in/out actions in Chromium.
- if (wheelEvent->ctrlKey())
+ // When the wheelEvent do not scroll, we trigger zoom in/out instead.
+ if (!wheelEvent->canScroll())
return;
Node* stopNode = m_previousWheelScrolledNode.get();
« no previous file with comments | « LayoutTests/fast/events/wheelevent-ctrl-expected.txt ('k') | Source/platform/scroll/ScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698