Move horizontal rubber-band checks to ScrollElasticityController::handleWheelEvent
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jan 2012 23:06:01 +0000 (23:06 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jan 2012 23:06:01 +0000 (23:06 +0000)
commit0c4d3f5a9f597add327d533bd86dca9c89c97644
treedcc1c5517eca7dfea0abb1704163d98895b5b230
parent5e05a4a7428cc2dfeb6110f66ba3995f7bc06cbf
Move horizontal rubber-band checks to ScrollElasticityController::handleWheelEvent
https://bugs.webkit.org/show_bug.cgi?id=77147

Reviewed by Adam Roben.

* platform/mac/ScrollAnimatorMac.h:
(ScrollAnimatorMac):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::handleWheelEvent):
Always call ScrollElasticityController::handleWheelEvent, and only call didBeginScrollGesture and
didEndScrollGesture if the event was actually handled.

(WebCore::ScrollAnimatorMac::shouldRubberBandInDirection):
Implement this.

* platform/mac/ScrollElasticityController.h:
* platform/mac/ScrollElasticityController.mm:
(WebCore::ScrollElasticityController::handleWheelEvent):
Check if we should rubber-band and return false if we shouldn't.

(WebCore::ScrollElasticityController::shouldRubberBandInHorizontalDirection):
Ask the client if we should rubber-band.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/mac/ScrollAnimatorMac.h
Source/WebCore/platform/mac/ScrollAnimatorMac.mm
Source/WebCore/platform/mac/ScrollElasticityController.h
Source/WebCore/platform/mac/ScrollElasticityController.mm