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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.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/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 48925626d7d27e253620d5c424a23370aae3b42b..5f67f59331afd636cda71827c23e49cf7966ed55 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -967,7 +967,7 @@ static inline IntSize adjustedScrollDelta(const IntSize& delta)
return IntSize(adjustedScrollDelta(delta.width()), adjustedScrollDelta(delta.height()));
}
-void LayoutBox::panScroll(const IntPoint& sourcePoint)
+void LayoutBox::middleClickAutoscroll(const IntPoint& sourcePoint)
{
LocalFrame* frame = this->frame();
if (!frame)
@@ -984,9 +984,9 @@ void LayoutBox::panScroll(const IntPoint& sourcePoint)
IntSize delta = lastKnownMousePosition - sourcePoint;
- if (abs(delta.width()) <= AutoscrollController::noPanScrollRadius) // at the center we let the space for the icon
+ if (abs(delta.width()) <= AutoscrollController::noMiddleClickAutoscrollRadius) // at the center we let the space for the icon
delta.setWidth(0);
- if (abs(delta.height()) <= AutoscrollController::noPanScrollRadius)
+ if (abs(delta.height()) <= AutoscrollController::noMiddleClickAutoscrollRadius)
delta.setHeight(0);
scroll(ScrollByPixel, FloatSize(adjustedScrollDelta(delta)));
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.h ('k') | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698