Implement snapping behavior for Mac overflow scrolling
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Sep 2014 22:16:25 +0000 (22:16 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Sep 2014 22:16:25 +0000 (22:16 +0000)
commitc215f39ae606eb7a920c7c6bd97a9d58dfeb843e
tree2a4a7ecbc7a770bd2f8635ffab8f530ad27342eb
parent6a4fbe80a78dfbb375c780e111c9ca5e0cc00755
Implement snapping behavior for Mac overflow scrolling
https://bugs.webkit.org/show_bug.cgi?id=135774

Patch by Wenson Hsieh <wenson_hsieh@apple.com> on 2014-09-22
Reviewed by Beth Dakin.

Hooks into AxisScrollSnapAnimator to implement overflow scroll snapping on Mac.

We need to find a way to test this!

* dom/Element.cpp:
(WebCore::Element::dispatchWheelEvent):
* page/EventHandler.cpp:
(WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis):
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::handleWheelEvent):
(WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
(WebCore::ScrollAnimator::scrollOffsetInAxis):
(WebCore::ScrollAnimator::immediateScrollInAxis):
(WebCore::ScrollAnimator::startScrollSnapTimer):
(WebCore::ScrollAnimator::stopScrollSnapTimer):
(WebCore::ScrollAnimator::horizontalScrollSnapTimerFired):
(WebCore::ScrollAnimator::verticalScrollSnapTimerFired):
* platform/ScrollAnimator.h:
* platform/mac/AxisScrollSnapAnimator.h:
* platform/mac/AxisScrollSnapAnimator.mm:
(WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator):
(WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation):
(WebCore::AxisScrollSnapAnimator::endScrollSnapAnimation):
(WebCore::AxisScrollSnapAnimator::initializeGlideParameters):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateScrollInfoAfterLayout):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173894 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/ScrollAnimator.cpp
Source/WebCore/platform/ScrollAnimator.h
Source/WebCore/platform/mac/AxisScrollSnapAnimator.h
Source/WebCore/platform/mac/AxisScrollSnapAnimator.mm
Source/WebCore/rendering/RenderLayer.cpp