| Index: sky/engine/platform/scroll/ScrollAnimator.cpp
|
| diff --git a/sky/engine/platform/scroll/ScrollAnimator.cpp b/sky/engine/platform/scroll/ScrollAnimator.cpp
|
| index ed7d7a939d9857a45030cb310871c0e01d8a15ce..d8a42e179c68f57b17cb03394bae1123e266ab80 100644
|
| --- a/sky/engine/platform/scroll/ScrollAnimator.cpp
|
| +++ b/sky/engine/platform/scroll/ScrollAnimator.cpp
|
| @@ -74,53 +74,6 @@ void ScrollAnimator::scrollToOffsetWithoutAnimation(const FloatPoint& offset)
|
| notifyPositionChanged();
|
| }
|
|
|
| -bool ScrollAnimator::handleWheelEvent(const PlatformWheelEvent& e)
|
| -{
|
| - bool canScrollX = m_scrollableArea->userInputScrollable(HorizontalScrollbar);
|
| - bool canScrollY = m_scrollableArea->userInputScrollable(VerticalScrollbar);
|
| -
|
| - // Accept the event if we are scrollable in that direction and can still
|
| - // scroll any further.
|
| - float deltaX = canScrollX ? e.deltaX() : 0;
|
| - float deltaY = canScrollY ? e.deltaY() : 0;
|
| -
|
| - bool handled = false;
|
| -
|
| - ScrollGranularity granularity = e.hasPreciseScrollingDeltas() ? ScrollByPrecisePixel : ScrollByPixel;
|
| -
|
| - IntSize maxForwardScrollDelta = m_scrollableArea->maximumScrollPosition() - m_scrollableArea->scrollPosition();
|
| - IntSize maxBackwardScrollDelta = m_scrollableArea->scrollPosition() - m_scrollableArea->minimumScrollPosition();
|
| - if ((deltaX < 0 && maxForwardScrollDelta.width() > 0)
|
| - || (deltaX > 0 && maxBackwardScrollDelta.width() > 0)
|
| - || (deltaY < 0 && maxForwardScrollDelta.height() > 0)
|
| - || (deltaY > 0 && maxBackwardScrollDelta.height() > 0)) {
|
| - handled = true;
|
| -
|
| - if (deltaY) {
|
| - if (e.granularity() == ScrollByPageWheelEvent) {
|
| - bool negative = deltaY < 0;
|
| - deltaY = m_scrollableArea->pageStep(VerticalScrollbar);
|
| - if (negative)
|
| - deltaY = -deltaY;
|
| - }
|
| -
|
| - scroll(VerticalScrollbar, granularity, m_scrollableArea->pixelStep(VerticalScrollbar), -deltaY);
|
| - }
|
| -
|
| - if (deltaX) {
|
| - if (e.granularity() == ScrollByPageWheelEvent) {
|
| - bool negative = deltaX < 0;
|
| - deltaX = m_scrollableArea->pageStep(HorizontalScrollbar);
|
| - if (negative)
|
| - deltaX = -deltaX;
|
| - }
|
| -
|
| - scroll(HorizontalScrollbar, granularity, m_scrollableArea->pixelStep(HorizontalScrollbar), -deltaX);
|
| - }
|
| - }
|
| - return handled;
|
| -}
|
| -
|
| void ScrollAnimator::setCurrentPosition(const FloatPoint& position)
|
| {
|
| m_currentPosX = position.x();
|
|
|