Skip to content
Permalink
Browse files
Move AxisScrollSnapAnimator logic to ScrollController
https://bugs.webkit.org/show_bug.cgi?id=142293
<rdar://problem/20039867>

Reviewed by Dean Jackson.

No change in function.

Move the animation logic out of 'AxisScrollSnapAnimator' into 'ScrollController'. Rename the remaining
bits of 'AxisScrollSnapAnimator' as 'ScrollSnapAnimatorState'. Remove a number of delegate methods required
by 'AxisScrollSnapAnimatorClient' that are no longer needed.

Also, break up some of the Scroll Snap Point math to be a little easier to understand.

* WebCore.xcodeproj/project.pbxproj: Rename 'platform/mac/AxisScrollSnapAnimator.{h,mm}' -> 'platform/cocoa/ScrollSnapAnimatorState.h'
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Mark 'scrollOffsetOnAxis' as const.
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Make 'const'
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::scrollOffsetOnAxis): Make 'const'
* platform/ScrollAnimator.h:
* platform/cocoa/ScrollController.h: No longer subclass from AxisScrollSnapAnimatorClient.
* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::scrollSnapPointState): Added accessors (const and non-const) for the individual
Scroll Snap State of each axis.
(WebCore::toWheelEventStatus): Moved from AxisScrollSnapAnimator.
(WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Added helper function containing the snap wheel handler code
from AxisScrollSnapAnimator.
(WebCore::ScrollController::shouldOverrideWheelEvent): Moved from AxisScrollSnapAnimator.
(WebCore::ScrollController::processWheelEventForScrollSnap): Update to use new methods moved from AxisScrollSnapAnimator.
(WebCore::ScrollController::updateScrollAnimatorsAndTimers): Update for new ScrollSnapAnimatorState class.
(WebCore::ScrollController::updateScrollSnapPoints): Ditto.
(WebCore::ScrollController::startScrollSnapTimer): Call client (delegate) method.
(WebCore::ScrollController::stopScrollSnapTimer): Ditto.
(WebCore::ScrollController::horizontalScrollSnapTimerFired): Call new 'scrollSnapAnimationUpdate' method passing the
correct axis to animate.
(WebCore::ScrollController::verticalScrollSnapTimerFired): Ditto.
(WebCore::ScrollController::scrollSnapAnimationUpdate): Moved from AxisScrollSnapAnimator.
(WebCore::projectedInertialScrollDistance): Moved from AxisScrollSnapAnimator.
(WebCore::ScrollController::initializeGlideParameters): Ditto.
(WebCore::ScrollController::beginScrollSnapAnimation): Ditto.
(WebCore::ScrollController::endScrollSnapAnimation): Ditto.
(WebCore::snapProgress): Created a new function for this calculation to make reasoning about the 'computeSnapDelta' and
'computeGlideDelta' easier.
(WebCore::clampedSnapMagnitude): Ditto.
(WebCore::ScrollController::computeSnapDelta): Moved from AxisScrollSnapAnimator.
(WebCore::snapGlide): Created a new function for this calculation to make reasoning about the 'computeGlideDelta' easier.
(WebCore::ScrollController::computeGlideDelta): Moved from AxisScrollSnapAnimator.
(WebCore::ScrollController::scrollOffsetOnAxis): Deleted.
(WebCore::ScrollController::immediateScrollOnAxis): Deleted.
* platform/cocoa/ScrollSnapAnimatorState.h: Copied from platform/mac/AxisScrollSnapAnimator.h.
(WebCore::AxisScrollSnapAnimatorClient::~AxisScrollSnapAnimatorClient): Deleted.
* platform/cocoa/ScrollSnapAnimatorState.mm: Copied from platform/mac/AxisScrollSnapAnimator.mm.
(WebCore::ScrollSnapAnimatorState::ScrollSnapAnimatorState):
(WebCore::ScrollSnapAnimatorState::pushInitialWheelDelta):
(WebCore::ScrollSnapAnimatorState::averageInitialWheelDelta):
(WebCore::ScrollSnapAnimatorState::clearInitialWheelDeltaWindow):
(WebCore::toWheelEventStatus): Deleted.
(WebCore::projectedInertialScrollDistance): Deleted.
(WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator): Deleted.
(WebCore::AxisScrollSnapAnimator::handleWheelEvent): Deleted.
(WebCore::AxisScrollSnapAnimator::shouldOverrideWheelEvent): Deleted.
(WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Deleted.
(WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation): Deleted.
(WebCore::AxisScrollSnapAnimator::endScrollSnapAnimation): Deleted.
(WebCore::AxisScrollSnapAnimator::computeSnapDelta): Deleted.
(WebCore::AxisScrollSnapAnimator::computeGlideDelta): Deleted.
(WebCore::AxisScrollSnapAnimator::initializeGlideParameters): Deleted.
(WebCore::AxisScrollSnapAnimator::pushInitialWheelDelta): Deleted.
(WebCore::AxisScrollSnapAnimator::averageInitialWheelDelta): Deleted.
(WebCore::AxisScrollSnapAnimator::clearInitialWheelDeltaWindow): Deleted.
* platform/mac/AxisScrollSnapAnimator.h: Removed.
* platform/mac/AxisScrollSnapAnimator.mm: Removed.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::pinnedInDirection): Removed.


Canonical link: https://commits.webkit.org/160382@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
brentfulgham committed Mar 5, 2015
1 parent 0bedcd1 commit cf9ca3452396b81df0ae7fbb7cc6c7e79fbdf1e1
@@ -1,3 +1,82 @@
2015-03-05 Brent Fulgham <bfulgham@apple.com>

Move AxisScrollSnapAnimator logic to ScrollController
https://bugs.webkit.org/show_bug.cgi?id=142293
<rdar://problem/20039867>

Reviewed by Dean Jackson.

No change in function.

Move the animation logic out of 'AxisScrollSnapAnimator' into 'ScrollController'. Rename the remaining
bits of 'AxisScrollSnapAnimator' as 'ScrollSnapAnimatorState'. Remove a number of delegate methods required
by 'AxisScrollSnapAnimatorClient' that are no longer needed.

Also, break up some of the Scroll Snap Point math to be a little easier to understand.

* WebCore.xcodeproj/project.pbxproj: Rename 'platform/mac/AxisScrollSnapAnimator.{h,mm}' -> 'platform/cocoa/ScrollSnapAnimatorState.h'
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Mark 'scrollOffsetOnAxis' as const.
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Make 'const'
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::scrollOffsetOnAxis): Make 'const'
* platform/ScrollAnimator.h:
* platform/cocoa/ScrollController.h: No longer subclass from AxisScrollSnapAnimatorClient.
* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::scrollSnapPointState): Added accessors (const and non-const) for the individual
Scroll Snap State of each axis.
(WebCore::toWheelEventStatus): Moved from AxisScrollSnapAnimator.
(WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Added helper function containing the snap wheel handler code
from AxisScrollSnapAnimator.
(WebCore::ScrollController::shouldOverrideWheelEvent): Moved from AxisScrollSnapAnimator.
(WebCore::ScrollController::processWheelEventForScrollSnap): Update to use new methods moved from AxisScrollSnapAnimator.
(WebCore::ScrollController::updateScrollAnimatorsAndTimers): Update for new ScrollSnapAnimatorState class.
(WebCore::ScrollController::updateScrollSnapPoints): Ditto.
(WebCore::ScrollController::startScrollSnapTimer): Call client (delegate) method.
(WebCore::ScrollController::stopScrollSnapTimer): Ditto.
(WebCore::ScrollController::horizontalScrollSnapTimerFired): Call new 'scrollSnapAnimationUpdate' method passing the
correct axis to animate.
(WebCore::ScrollController::verticalScrollSnapTimerFired): Ditto.
(WebCore::ScrollController::scrollSnapAnimationUpdate): Moved from AxisScrollSnapAnimator.
(WebCore::projectedInertialScrollDistance): Moved from AxisScrollSnapAnimator.
(WebCore::ScrollController::initializeGlideParameters): Ditto.
(WebCore::ScrollController::beginScrollSnapAnimation): Ditto.
(WebCore::ScrollController::endScrollSnapAnimation): Ditto.
(WebCore::snapProgress): Created a new function for this calculation to make reasoning about the 'computeSnapDelta' and
'computeGlideDelta' easier.
(WebCore::clampedSnapMagnitude): Ditto.
(WebCore::ScrollController::computeSnapDelta): Moved from AxisScrollSnapAnimator.
(WebCore::snapGlide): Created a new function for this calculation to make reasoning about the 'computeGlideDelta' easier.
(WebCore::ScrollController::computeGlideDelta): Moved from AxisScrollSnapAnimator.
(WebCore::ScrollController::scrollOffsetOnAxis): Deleted.
(WebCore::ScrollController::immediateScrollOnAxis): Deleted.
* platform/cocoa/ScrollSnapAnimatorState.h: Copied from platform/mac/AxisScrollSnapAnimator.h.
(WebCore::AxisScrollSnapAnimatorClient::~AxisScrollSnapAnimatorClient): Deleted.
* platform/cocoa/ScrollSnapAnimatorState.mm: Copied from platform/mac/AxisScrollSnapAnimator.mm.
(WebCore::ScrollSnapAnimatorState::ScrollSnapAnimatorState):
(WebCore::ScrollSnapAnimatorState::pushInitialWheelDelta):
(WebCore::ScrollSnapAnimatorState::averageInitialWheelDelta):
(WebCore::ScrollSnapAnimatorState::clearInitialWheelDeltaWindow):
(WebCore::toWheelEventStatus): Deleted.
(WebCore::projectedInertialScrollDistance): Deleted.
(WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator): Deleted.
(WebCore::AxisScrollSnapAnimator::handleWheelEvent): Deleted.
(WebCore::AxisScrollSnapAnimator::shouldOverrideWheelEvent): Deleted.
(WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Deleted.
(WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation): Deleted.
(WebCore::AxisScrollSnapAnimator::endScrollSnapAnimation): Deleted.
(WebCore::AxisScrollSnapAnimator::computeSnapDelta): Deleted.
(WebCore::AxisScrollSnapAnimator::computeGlideDelta): Deleted.
(WebCore::AxisScrollSnapAnimator::initializeGlideParameters): Deleted.
(WebCore::AxisScrollSnapAnimator::pushInitialWheelDelta): Deleted.
(WebCore::AxisScrollSnapAnimator::averageInitialWheelDelta): Deleted.
(WebCore::AxisScrollSnapAnimator::clearInitialWheelDeltaWindow): Deleted.
* platform/mac/AxisScrollSnapAnimator.h: Removed.
* platform/mac/AxisScrollSnapAnimator.mm: Removed.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::pinnedInDirection): Removed.

2015-03-04 Dean Jackson <dino@apple.com>

[iOS Media] Small inline controls can clip the time widgets
@@ -6328,8 +6328,8 @@
F42FFB461984B71600F6837F /* LengthRepeat.h in Headers */ = {isa = PBXBuildFile; fileRef = F42FFB451984B71600F6837F /* LengthRepeat.h */; };
F45C231D1995B73B00A6E2E3 /* AxisScrollSnapOffsets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F45C231B1995B73B00A6E2E3 /* AxisScrollSnapOffsets.cpp */; };
F45C231E1995B73B00A6E2E3 /* AxisScrollSnapOffsets.h in Headers */ = {isa = PBXBuildFile; fileRef = F45C231C1995B73B00A6E2E3 /* AxisScrollSnapOffsets.h */; settings = {ATTRIBUTES = (Private, ); }; };
F478755419983AFF0024A287 /* AxisScrollSnapAnimator.h in Headers */ = {isa = PBXBuildFile; fileRef = F478755219983AFF0024A287 /* AxisScrollSnapAnimator.h */; settings = {ATTRIBUTES = (Private, ); }; };
F478755519983AFF0024A287 /* AxisScrollSnapAnimator.mm in Sources */ = {isa = PBXBuildFile; fileRef = F478755319983AFF0024A287 /* AxisScrollSnapAnimator.mm */; };
F478755419983AFF0024A287 /* ScrollSnapAnimatorState.h in Headers */ = {isa = PBXBuildFile; fileRef = F478755219983AFF0024A287 /* ScrollSnapAnimatorState.h */; settings = {ATTRIBUTES = (Private, ); }; };
F478755519983AFF0024A287 /* ScrollSnapAnimatorState.mm in Sources */ = {isa = PBXBuildFile; fileRef = F478755319983AFF0024A287 /* ScrollSnapAnimatorState.mm */; };
F47A5E3E195B8C8A00483100 /* StyleScrollSnapPoints.h in Headers */ = {isa = PBXBuildFile; fileRef = F47A5E3B195B8C8A00483100 /* StyleScrollSnapPoints.h */; settings = {ATTRIBUTES = (Private, ); }; };
F47A5E3F195B8E4800483100 /* StyleScrollSnapPoints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F47A5E3A195B8C8A00483100 /* StyleScrollSnapPoints.cpp */; };
F50664F7157F52DC00AC226F /* FormController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F50664F5157F52DC00AC226F /* FormController.cpp */; };
@@ -13902,8 +13902,8 @@
F42FFB451984B71600F6837F /* LengthRepeat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LengthRepeat.h; sourceTree = "<group>"; };
F45C231B1995B73B00A6E2E3 /* AxisScrollSnapOffsets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AxisScrollSnapOffsets.cpp; sourceTree = "<group>"; };
F45C231C1995B73B00A6E2E3 /* AxisScrollSnapOffsets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AxisScrollSnapOffsets.h; sourceTree = "<group>"; };
F478755219983AFF0024A287 /* AxisScrollSnapAnimator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AxisScrollSnapAnimator.h; sourceTree = "<group>"; };
F478755319983AFF0024A287 /* AxisScrollSnapAnimator.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AxisScrollSnapAnimator.mm; sourceTree = "<group>"; };
F478755219983AFF0024A287 /* ScrollSnapAnimatorState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollSnapAnimatorState.h; sourceTree = "<group>"; };
F478755319983AFF0024A287 /* ScrollSnapAnimatorState.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ScrollSnapAnimatorState.mm; sourceTree = "<group>"; };
F47A5E3A195B8C8A00483100 /* StyleScrollSnapPoints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StyleScrollSnapPoints.cpp; path = style/StyleScrollSnapPoints.cpp; sourceTree = "<group>"; };
F47A5E3B195B8C8A00483100 /* StyleScrollSnapPoints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleScrollSnapPoints.h; path = style/StyleScrollSnapPoints.h; sourceTree = "<group>"; };
F50664F5157F52DC00AC226F /* FormController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FormController.cpp; sourceTree = "<group>"; };
@@ -16577,8 +16577,6 @@
6582A14809999D6C00BEEB6D /* mac */ = {
isa = PBXGroup;
children = (
F478755219983AFF0024A287 /* AxisScrollSnapAnimator.h */,
F478755319983AFF0024A287 /* AxisScrollSnapAnimator.mm */,
65A640F00533BB1F0085E777 /* BlockExceptions.h */,
65F80697054D9F86008BF776 /* BlockExceptions.mm */,
06027CB20B1CC03D00884B2D /* ContextMenuItemMac.mm */,
@@ -18715,6 +18713,8 @@
A5C974CE11485FDA0066F2AB /* cocoa */ = {
isa = PBXGroup;
children = (
F478755219983AFF0024A287 /* ScrollSnapAnimatorState.h */,
F478755319983AFF0024A287 /* ScrollSnapAnimatorState.mm */,
A14090FA1AA51E1D0091191A /* ContentFilterUnblockHandlerCocoa.mm */,
5D8C4DBD1428222C0026CE72 /* DisplaySleepDisablerCocoa.cpp */,
5D8C4DBE1428222C0026CE72 /* DisplaySleepDisablerCocoa.h */,
@@ -23621,7 +23621,7 @@
070363E4181A1CDC00C074A5 /* AVMediaCaptureSource.h in Headers */,
CD336F6217F9F64700DDDCD0 /* AVTrackPrivateAVFObjCImpl.h in Headers */,
070363E6181A1CDC00C074A5 /* AVVideoCaptureSource.h in Headers */,
F478755419983AFF0024A287 /* AxisScrollSnapAnimator.h in Headers */,
F478755419983AFF0024A287 /* ScrollSnapAnimatorState.h in Headers */,
F45C231E1995B73B00A6E2E3 /* AxisScrollSnapOffsets.h in Headers */,
29A812380FBB9C1D00510293 /* AXObjectCache.h in Headers */,
51741D0F0B07259A00ED442C /* BackForwardClient.h in Headers */,
@@ -27359,7 +27359,7 @@
070363E5181A1CDC00C074A5 /* AVMediaCaptureSource.mm in Sources */,
CD336F6117F9F64700DDDCD0 /* AVTrackPrivateAVFObjCImpl.mm in Sources */,
070363E7181A1CDC00C074A5 /* AVVideoCaptureSource.mm in Sources */,
F478755519983AFF0024A287 /* AxisScrollSnapAnimator.mm in Sources */,
F478755519983AFF0024A287 /* ScrollSnapAnimatorState.mm in Sources */,
F45C231D1995B73B00A6E2E3 /* AxisScrollSnapOffsets.cpp in Sources */,
37F57ACF1A5072DD00876F98 /* AXObjectCache.cpp in Sources */,
AAA728F916D1D8BC00D3BBC6 /* AXObjectCacheIOS.mm in Sources */,
@@ -80,7 +80,7 @@ class ScrollingTreeFrameScrollingNodeMac : public ScrollingTreeFrameScrollingNod
bool isAlreadyPinnedInDirectionOfGesture(const PlatformWheelEvent&, ScrollEventAxis);

#if ENABLE(CSS_SCROLL_SNAP) && PLATFORM(MAC)
LayoutUnit scrollOffsetOnAxis(ScrollEventAxis) override;
LayoutUnit scrollOffsetOnAxis(ScrollEventAxis) const override;
void immediateScrollOnAxis(ScrollEventAxis, float delta) override;
#endif

@@ -541,7 +541,7 @@ void logWheelEventHandlerCountChanged(unsigned count)
}

#if ENABLE(CSS_SCROLL_SNAP) && PLATFORM(MAC)
LayoutUnit ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis(ScrollEventAxis axis)
LayoutUnit ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis(ScrollEventAxis axis) const
{
const FloatPoint& currentPosition = scrollPosition();
return axis == ScrollEventAxis::Horizontal ? currentPosition.x() : currentPosition.y();
@@ -178,7 +178,7 @@ void ScrollAnimator::updateScrollAnimatorsAndTimers()
m_scrollController.updateScrollAnimatorsAndTimers(m_scrollableArea);
}

LayoutUnit ScrollAnimator::scrollOffsetOnAxis(ScrollEventAxis axis)
LayoutUnit ScrollAnimator::scrollOffsetOnAxis(ScrollEventAxis axis) const
{
return axis == ScrollEventAxis::Horizontal ? m_currentPosX : m_currentPosY;
}
@@ -120,7 +120,7 @@ class ScrollAnimator {
#if ENABLE(CSS_SCROLL_SNAP) && PLATFORM(MAC)
bool processWheelEventForScrollSnap(const PlatformWheelEvent&);
void updateScrollAnimatorsAndTimers();
LayoutUnit scrollOffsetOnAxis(ScrollEventAxis) override;
LayoutUnit scrollOffsetOnAxis(ScrollEventAxis) const override;
void immediateScrollOnAxis(ScrollEventAxis, float delta) override;
#endif

@@ -35,7 +35,7 @@
#include <wtf/RunLoop.h>

#if ENABLE(CSS_SCROLL_SNAP)
#include "AxisScrollSnapAnimator.h"
#include "ScrollSnapAnimatorState.h"
#endif

namespace WebCore {
@@ -76,7 +76,7 @@ class ScrollControllerClient {
virtual void adjustScrollPositionToBoundsIfNecessary() = 0;

#if ENABLE(CSS_SCROLL_SNAP) && PLATFORM(MAC)
virtual LayoutUnit scrollOffsetOnAxis(ScrollEventAxis) = 0;
virtual LayoutUnit scrollOffsetOnAxis(ScrollEventAxis) const = 0;
virtual void immediateScrollOnAxis(ScrollEventAxis, float delta) = 0;
virtual void startScrollSnapTimer(ScrollEventAxis)
{
@@ -91,11 +91,7 @@ class ScrollControllerClient {
#endif
};

#if ENABLE(CSS_SCROLL_SNAP) && PLATFORM(MAC)
class ScrollController : public AxisScrollSnapAnimatorClient {
#else
class ScrollController {
#endif
WTF_MAKE_NONCOPYABLE(ScrollController);

public:
@@ -122,11 +118,23 @@ class ScrollController {
#if ENABLE(CSS_SCROLL_SNAP) && PLATFORM(MAC)
void horizontalScrollSnapTimerFired();
void verticalScrollSnapTimerFired();
void startScrollSnapTimer(ScrollEventAxis) override;
void stopScrollSnapTimer(ScrollEventAxis) override;
void startScrollSnapTimer(ScrollEventAxis);
void stopScrollSnapTimer(ScrollEventAxis);

LayoutUnit scrollOffsetOnAxis(ScrollEventAxis) const;
void processWheelEventForScrollSnapOnAxis(ScrollEventAxis, const PlatformWheelEvent&);
bool shouldOverrideWheelEvent(ScrollEventAxis, const PlatformWheelEvent&) const;

void beginScrollSnapAnimation(ScrollEventAxis, ScrollSnapState);
void scrollSnapAnimationUpdate(ScrollEventAxis);
void endScrollSnapAnimation(ScrollEventAxis, ScrollSnapState);

void initializeGlideParameters(ScrollEventAxis, bool);
float computeSnapDelta(ScrollEventAxis) const;
float computeGlideDelta(ScrollEventAxis) const;

LayoutUnit scrollOffsetOnAxis(ScrollEventAxis) override;
void immediateScrollOnAxis(ScrollEventAxis, float delta) override;
ScrollSnapAnimatorState& scrollSnapPointState(ScrollEventAxis);
const ScrollSnapAnimatorState& scrollSnapPointState(ScrollEventAxis) const;
#endif

ScrollControllerClient* m_client;
@@ -145,8 +153,8 @@ class ScrollController {

#if ENABLE(CSS_SCROLL_SNAP) && PLATFORM(MAC)
// FIXME: Find a way to consolidate both timers into one variable.
std::unique_ptr<AxisScrollSnapAnimator> m_horizontalScrollSnapAnimator;
std::unique_ptr<AxisScrollSnapAnimator> m_verticalScrollSnapAnimator;
std::unique_ptr<ScrollSnapAnimatorState> m_horizontalScrollSnapState;
std::unique_ptr<ScrollSnapAnimatorState> m_verticalScrollSnapState;
RunLoop::Timer<ScrollController> m_horizontalScrollSnapTimer;
RunLoop::Timer<ScrollController> m_verticalScrollSnapTimer;
#endif

0 comments on commit cf9ca34

Please sign in to comment.