| Index: third_party/WebKit/Source/core/page/AutoscrollController.cpp
|
| diff --git a/third_party/WebKit/Source/core/page/AutoscrollController.cpp b/third_party/WebKit/Source/core/page/AutoscrollController.cpp
|
| index 34620a291a0f193b9ce7d0e5e8744a84ed516de0..ef37e5bc673a8fa77fb8fdaef84d2536a269ee7b 100644
|
| --- a/third_party/WebKit/Source/core/page/AutoscrollController.cpp
|
| +++ b/third_party/WebKit/Source/core/page/AutoscrollController.cpp
|
| @@ -101,14 +101,11 @@ void AutoscrollController::stopAutoscroll()
|
| if (!scrollable)
|
| return;
|
|
|
| -#if OS(WIN)
|
| - if (panScrollInProgress()) {
|
| + if (RuntimeEnabledFeatures::panScrollingEnabled() && panScrollInProgress()) {
|
| if (FrameView* view = scrollable->frame()->view()) {
|
| view->setCursor(pointerCursor());
|
| }
|
| }
|
| -#endif
|
| -
|
| m_autoscrollType = NoAutoscroll;
|
| }
|
|
|
| @@ -130,12 +127,12 @@ void AutoscrollController::updateAutoscrollLayoutObject()
|
|
|
| LayoutObject* layoutObject = m_autoscrollLayoutObject;
|
|
|
| -#if OS(WIN)
|
| - HitTestResult hitTest = layoutObject->frame()->eventHandler().hitTestResultAtPoint(m_panScrollStartPos, HitTestRequest::ReadOnly | HitTestRequest::Active);
|
| + if (RuntimeEnabledFeatures::panScrollingEnabled()) {
|
| + HitTestResult hitTest = layoutObject->frame()->eventHandler().hitTestResultAtPoint(m_panScrollStartPos, HitTestRequest::ReadOnly | HitTestRequest::Active);
|
|
|
| - if (Node* nodeAtPoint = hitTest.innerNode())
|
| - layoutObject = nodeAtPoint->layoutObject();
|
| -#endif
|
| + if (Node* nodeAtPoint = hitTest.innerNode())
|
| + layoutObject = nodeAtPoint->layoutObject();
|
| + }
|
|
|
| while (layoutObject && !(layoutObject->isBox() && toLayoutBox(layoutObject)->canAutoscroll()))
|
| layoutObject = layoutObject->parent();
|
| @@ -187,7 +184,6 @@ void AutoscrollController::updateDragAndDrop(Node* dropTargetNode, const IntPoin
|
| }
|
| }
|
|
|
| -#if OS(WIN)
|
| void AutoscrollController::handleMouseReleaseForPanScrolling(LocalFrame* frame, const PlatformMouseEvent& mouseEvent)
|
| {
|
| if (!frame->isMainFrame())
|
| @@ -225,12 +221,6 @@ void AutoscrollController::startPanScrolling(LayoutBox* scrollable, const IntPoi
|
|
|
| startAutoscroll();
|
| }
|
| -#else
|
| -bool AutoscrollController::panScrollInProgress() const
|
| -{
|
| - return false;
|
| -}
|
| -#endif
|
|
|
| // FIXME: This would get get better animation fidelity if it used the monotonicFrameBeginTime instead
|
| // of WTF::currentTime().
|
| @@ -257,7 +247,6 @@ void AutoscrollController::animate(double)
|
| break;
|
| case NoAutoscroll:
|
| break;
|
| -#if OS(WIN)
|
| case AutoscrollForPanCanStop:
|
| case AutoscrollForPan:
|
| if (!panScrollInProgress()) {
|
| @@ -268,7 +257,6 @@ void AutoscrollController::animate(double)
|
| updatePanScrollState(view, eventHandler.lastKnownMousePosition());
|
| m_autoscrollLayoutObject->panScroll(m_panScrollStartPos);
|
| break;
|
| -#endif
|
| }
|
| if (m_autoscrollType != NoAutoscroll && m_autoscrollLayoutObject)
|
| m_page->chromeClient().scheduleAnimation(m_autoscrollLayoutObject->frame()->view());
|
| @@ -279,7 +267,6 @@ void AutoscrollController::startAutoscroll()
|
| m_page->chromeClient().scheduleAnimation(m_autoscrollLayoutObject->frame()->view());
|
| }
|
|
|
| -#if OS(WIN)
|
| void AutoscrollController::updatePanScrollState(FrameView* view, const IntPoint& lastKnownMousePosition)
|
| {
|
| // At the original click location we draw a 4 arrowed icon. Over this icon there won't be any scroll
|
| @@ -314,6 +301,5 @@ void AutoscrollController::updatePanScrollState(FrameView* view, const IntPoint&
|
| view->setCursor(middlePanningCursor());
|
| }
|
| }
|
| -#endif
|
|
|
| } // namespace blink
|
|
|