Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(505)

Unified Diff: third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.h

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: Fix README.md Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.h
diff --git a/third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.h b/third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.h
index e1bbd686d3d18f01c15e2264efe262a3bb500b9c..c3ed4d31402301852a51acfd236169c470d52a7e 100644
--- a/third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.h
+++ b/third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.h
@@ -56,7 +56,7 @@ class PLATFORM_EXPORT ScrollAnimatorMac : public ScrollAnimatorBase {
void dispose() override;
- void immediateScrollToPointForScrollAnimation(const FloatPoint& newPosition);
+ void immediateScrollToOffsetForScrollAnimation(const ScrollOffset& newOffset);
bool haveScrolledSincePageLoad() const { return m_haveScrolledSincePageLoad; }
void updateScrollerStyle();
@@ -65,7 +65,7 @@ class PLATFORM_EXPORT ScrollAnimatorMac : public ScrollAnimatorBase {
void startScrollbarPaintTimer();
void stopScrollbarPaintTimer();
- void sendContentAreaScrolledSoon(const FloatSize& scrollDelta);
+ void sendContentAreaScrolledSoon(const ScrollOffset& scrollDelta);
void setVisibleScrollerThumbRect(const IntRect&);
@@ -87,10 +87,11 @@ class PLATFORM_EXPORT ScrollAnimatorMac : public ScrollAnimatorBase {
void sendContentAreaScrolledTask();
std::unique_ptr<CancellableTaskFactory> m_sendContentAreaScrolledTaskFactory;
std::unique_ptr<WebTaskRunner> m_taskRunner;
- FloatSize m_contentAreaScrolledTimerScrollDelta;
+ ScrollOffset m_contentAreaScrolledTimerScrollDelta;
- ScrollResult userScroll(ScrollGranularity, const FloatSize& delta) override;
- void scrollToOffsetWithoutAnimation(const FloatPoint&) override;
+ ScrollResult userScroll(ScrollGranularity,
+ const ScrollOffset& delta) override;
+ void scrollToOffsetWithoutAnimation(const ScrollOffset&) override;
void handleWheelEventPhase(PlatformWheelEventPhase) override;
@@ -118,13 +119,13 @@ class PLATFORM_EXPORT ScrollAnimatorMac : public ScrollAnimatorBase {
bool shouldScrollbarParticipateInHitTesting(Scrollbar&) override;
- void notifyContentAreaScrolled(const FloatSize& delta) override;
+ void notifyContentAreaScrolled(const ScrollOffset& delta) override;
bool setScrollbarsVisibleForTesting(bool) override;
- FloatPoint adjustScrollPositionIfNecessary(const FloatPoint&) const;
+ ScrollOffset adjustScrollOffsetIfNecessary(const ScrollOffset&) const;
- void immediateScrollTo(const FloatPoint&);
+ void immediateScrollTo(const ScrollOffset&);
bool m_haveScrolledSincePageLoad;
bool m_needsScrollerStyleUpdate;

Powered by Google App Engine
This is Rietveld 408576698