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

Unified Diff: Source/platform/scroll/ScrollableArea.cpp

Issue 212913002: Prevent ctrl+wheel from scrolling in more places (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixes Created 6 years, 9 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 | « Source/core/page/EventHandler.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/scroll/ScrollableArea.cpp
diff --git a/Source/platform/scroll/ScrollableArea.cpp b/Source/platform/scroll/ScrollableArea.cpp
index 6c202a8dbb4331bf472e1c682f3ab5ea2def1f0f..76c0349565c78f3371e2d4383ac82791ab22a76e 100644
--- a/Source/platform/scroll/ScrollableArea.cpp
+++ b/Source/platform/scroll/ScrollableArea.cpp
@@ -213,6 +213,10 @@ bool ScrollableArea::scrollBehaviorFromString(const String& behaviorString, Scro
bool ScrollableArea::handleWheelEvent(const PlatformWheelEvent& wheelEvent)
{
+ // ctrl+wheel events are used to trigger zooming, not scrolling.
+ if (wheelEvent.modifiers() & PlatformEvent::CtrlKey)
+ return false;
+
return scrollAnimator()->handleWheelEvent(wheelEvent);
}
« no previous file with comments | « Source/core/page/EventHandler.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698