diff options
author | Ben Murdoch <benm@google.com> | 2011-05-16 16:25:10 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-05-23 18:54:14 +0100 |
commit | ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb (patch) | |
tree | db769fadd053248f85db67434a5b275224defef7 /Source/WebCore/platform/ScrollAnimator.h | |
parent | 52e2557aeb8477967e97fd24f20f8f407a10fa15 (diff) | |
download | external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.zip external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.gz external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.bz2 |
Merge WebKit at r76408: Initial merge by git.
Change-Id: I5b91decbd693ccbf5c1b8354b37cd68cc9a1ea53
Diffstat (limited to 'Source/WebCore/platform/ScrollAnimator.h')
-rw-r--r-- | Source/WebCore/platform/ScrollAnimator.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/Source/WebCore/platform/ScrollAnimator.h b/Source/WebCore/platform/ScrollAnimator.h index e674339..155c6e5 100644 --- a/Source/WebCore/platform/ScrollAnimator.h +++ b/Source/WebCore/platform/ScrollAnimator.h @@ -32,16 +32,17 @@ #define ScrollAnimator_h #include "ScrollTypes.h" +#include <wtf/Forward.h> namespace WebCore { -class ScrollbarClient; +class FloatPoint; +class ScrollableArea; class ScrollAnimator { public: - static ScrollAnimator* create(ScrollbarClient*); + static PassOwnPtr<ScrollAnimator> create(ScrollableArea*); - ScrollAnimator(ScrollbarClient* client); virtual ~ScrollAnimator(); // Computes a scroll destination for the given parameters. Returns false if @@ -50,16 +51,20 @@ public: // The base class implementation always scrolls immediately, never animates. virtual bool scroll(ScrollbarOrientation, ScrollGranularity, float step, float multiplier); - // Stops any animation in the given direction and updates the ScrollAnimator - // with the current scroll position. This does not cause a callback to the - // ScrollbarClient. - virtual void setScrollPositionAndStopAnimation(ScrollbarOrientation, float); + virtual void scrollToOffsetWithoutAnimation(const FloatPoint&); + + FloatPoint currentPosition() const; protected: - ScrollbarClient* m_client; + ScrollAnimator(ScrollableArea*); + + void notityPositionChanged(); + + ScrollableArea* m_scrollableArea; float m_currentPosX; // We avoid using a FloatPoint in order to reduce float m_currentPosY; // subclass code complexity. }; } // namespace WebCore -#endif + +#endif // ScrollAnimator_h |