REGRESSION(142590): Scroll-snap points are improperly snapping to earlier index values
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 May 2015 22:01:23 +0000 (22:01 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 May 2015 22:01:23 +0000 (22:01 +0000)
commita1b9572b8704c63c07ba89b45fdf95b65c590134
treef7b5259cd6d86ecd162f66475252b1deec3c50e7
parent668c3625378f4b67a453b3cc1b6142caebe20124
REGRESSION(142590): Scroll-snap points are improperly snapping to earlier index values
https://bugs.webkit.org/show_bug.cgi?id=145140
<rdar://problem/21006738>

Reviewed by Beth Dakin.

The new "nearestActiveSnapPoint" logic is firing while scroll snap animations are running. We need
to add an "isScrollSnapInProgress" predicate, much like the existing "isRubberBandInProgress" to avoid
certain "fix-up" logic that we don't want running while we are in the process of moving to a new position.

* platform/ScrollAnimator.h:
(WebCore::ScrollAnimator::ScrollAnimator::isScrollSnapInProgress): Added.
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::updateScrollSnapState): If we are in the midst of a scroll snap operation,
do not attempt to reset position to the current active snap point.
* platform/cocoa/ScrollController.h:
* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::isScrollSnapInProgress): Added.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::isScrollSnapInProgress): Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/ScrollAnimator.h
Source/WebCore/platform/ScrollableArea.cpp
Source/WebCore/platform/cocoa/ScrollController.h
Source/WebCore/platform/cocoa/ScrollController.mm
Source/WebCore/platform/mac/ScrollAnimatorMac.h
Source/WebCore/platform/mac/ScrollAnimatorMac.mm