| 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 f36b66cb19de939b00e1e070f36a93ac26ba091b..b25724f9f244fc8d2ad11d9507e016477d1926e7 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| @@ -1043,57 +1043,6 @@ LayoutBox* LayoutBox::findAutoscrollable(LayoutObject* layoutObject) {
|
| : nullptr;
|
| }
|
|
|
| -static inline int adjustedScrollDelta(int beginningDelta) {
|
| - // This implemention matches Firefox's.
|
| - // http://mxr.mozilla.org/firefox/source/toolkit/content/widgets/browser.xml#856.
|
| - const int speedReducer = 12;
|
| -
|
| - int adjustedDelta = beginningDelta / speedReducer;
|
| - if (adjustedDelta > 1)
|
| - adjustedDelta = static_cast<int>(adjustedDelta *
|
| - sqrt(static_cast<double>(adjustedDelta))) -
|
| - 1;
|
| - else if (adjustedDelta < -1)
|
| - adjustedDelta =
|
| - static_cast<int>(adjustedDelta *
|
| - sqrt(static_cast<double>(-adjustedDelta))) +
|
| - 1;
|
| -
|
| - return adjustedDelta;
|
| -}
|
| -
|
| -static inline IntSize adjustedScrollDelta(const IntSize& delta) {
|
| - return IntSize(adjustedScrollDelta(delta.width()),
|
| - adjustedScrollDelta(delta.height()));
|
| -}
|
| -
|
| -void LayoutBox::middleClickAutoscroll(const IntPoint& sourcePoint) {
|
| - LocalFrame* frame = this->frame();
|
| - if (!frame)
|
| - return;
|
| -
|
| - IntPoint lastKnownMousePosition =
|
| - frame->eventHandler().lastKnownMousePosition();
|
| -
|
| - // We need to check if the last known mouse position is out of the window.
|
| - // When the mouse is out of the window, the position is incoherent
|
| - static IntPoint previousMousePosition;
|
| - if (lastKnownMousePosition.x() < 0 || lastKnownMousePosition.y() < 0)
|
| - lastKnownMousePosition = previousMousePosition;
|
| - else
|
| - previousMousePosition = lastKnownMousePosition;
|
| -
|
| - IntSize delta = lastKnownMousePosition - sourcePoint;
|
| -
|
| - // at the center we let the space for the icon.
|
| - if (abs(delta.width()) <= AutoscrollController::noMiddleClickAutoscrollRadius)
|
| - delta.setWidth(0);
|
| - if (abs(delta.height()) <=
|
| - AutoscrollController::noMiddleClickAutoscrollRadius)
|
| - delta.setHeight(0);
|
| - scroll(ScrollByPixel, FloatSize(adjustedScrollDelta(delta)));
|
| -}
|
| -
|
| void LayoutBox::scrollByRecursively(const ScrollOffset& delta) {
|
| if (delta.isZero())
|
| return;
|
|
|