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

Unified Diff: third_party/WebKit/Source/core/input/KeyboardEventManager.cpp

Issue 2289213002: Implement Middle Click Autoscroll on all platforms not just Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/chromium/src into panscroll Created 4 years, 3 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
Index: third_party/WebKit/Source/core/input/KeyboardEventManager.cpp
diff --git a/third_party/WebKit/Source/core/input/KeyboardEventManager.cpp b/third_party/WebKit/Source/core/input/KeyboardEventManager.cpp
index cd31aaef3bd3949135d2d4a0bca8763932bc4edd..a9a470c5c49d2253d32d9d8f862b9a34e276a900 100644
--- a/third_party/WebKit/Source/core/input/KeyboardEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/KeyboardEventManager.cpp
@@ -85,16 +85,15 @@ WebInputEventResult KeyboardEventManager::keyEvent(
if (initialKeyEvent.windowsKeyCode == VK_CAPITAL)
capsLockStateMayHaveChanged();
-#if OS(WIN)
- if (m_scrollManager->panScrollInProgress()) {
- // If a key is pressed while the panScroll is in progress then we want to stop
+ if (m_scrollManager->middleClickAutoscrollInProgress()) {
+ DCHECK(RuntimeEnabledFeatures::middleClickAutoscrollEnabled());
+ // If a key is pressed while the middleClickAutoscroll is in progress then we want to stop
if (initialKeyEvent.type == WebInputEvent::KeyDown || initialKeyEvent.type == WebInputEvent::RawKeyDown)
m_scrollManager->stopAutoscroll();
// If we were in panscroll mode, we swallow the key event
return WebInputEventResult::HandledSuppressed;
}
-#endif
// Check for cases where we are too early for events -- possible unmatched key up
// from pressing return in the location bar.
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.cpp ('k') | third_party/WebKit/Source/core/input/ScrollManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698