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

Unified Diff: third_party/WebKit/Source/core/dom/Node.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: Rename the files. 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/dom/Node.cpp
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
index 53d7dc774e996217453fc4c06b0bb109f9b68776..e0e7ed70ac6a11bd89558feda21a6cef64a2f7f9 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -2072,8 +2072,9 @@ void Node::defaultEventHandler(Event* event)
if (LocalFrame* frame = document().frame())
frame->eventHandler().defaultTextInputEventHandler(toTextEvent(event));
}
-#if OS(WIN)
- } else if (eventType == EventTypeNames::mousedown && event->isMouseEvent()) {
+ } else if (RuntimeEnabledFeatures::middleClickAutoscrollEnabled()
+ && eventType == EventTypeNames::mousedown
+ && event->isMouseEvent()) {
MouseEvent* mouseEvent = toMouseEvent(event);
if (mouseEvent->button() == static_cast<short>(WebPointerProperties::Button::Middle)) {
if (enclosingLinkEventParentOrSelf())
@@ -2094,7 +2095,6 @@ void Node::defaultEventHandler(Event* event)
frame->eventHandler().startPanScrolling(layoutObject);
}
}
-#endif
} else if (event->type() == EventTypeNames::webkitEditableContentChanged) {
// TODO(chongz): Remove after shipped.
// New InputEvent are dispatched in Editor::appliedEditing, etc.

Powered by Google App Engine
This is Rietveld 408576698