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

Unified Diff: Source/platform/scroll/ScrollAnimator.cpp

Issue 1173053003: Remove ScrollableArea::notifyScrollPositionChanged and cleanup scroll animators. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase + remove updateScrollbars from FrameView::setScrollPosition Created 5 years, 6 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
« no previous file with comments | « Source/platform/scroll/ScrollAnimator.h ('k') | Source/platform/scroll/ScrollAnimatorNone.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/scroll/ScrollAnimator.cpp
diff --git a/Source/platform/scroll/ScrollAnimator.cpp b/Source/platform/scroll/ScrollAnimator.cpp
index b755a7e29c9e3fe7246570701aa3f307307e12b1..0f9fafd0f2ff09292baff98683783bfc9fd0ef2b 100644
--- a/Source/platform/scroll/ScrollAnimator.cpp
+++ b/Source/platform/scroll/ScrollAnimator.cpp
@@ -60,16 +60,16 @@ ScrollResultOneDimensional ScrollAnimator::userScroll(ScrollbarOrientation orien
float usedDelta = (newPos - currentPos) / step;
currentPos = newPos;
- notifyPositionChanged(UserScroll);
+ notifyPositionChanged();
return ScrollResultOneDimensional(true, delta - usedDelta);
}
-void ScrollAnimator::scrollToOffsetWithoutAnimation(const FloatPoint& offset, ScrollType scrollType)
+void ScrollAnimator::scrollToOffsetWithoutAnimation(const FloatPoint& offset)
{
m_currentPosX = offset.x();
m_currentPosY = offset.y();
- notifyPositionChanged(scrollType);
+ notifyPositionChanged();
}
ScrollResult ScrollAnimator::handleWheelEvent(const PlatformWheelEvent& e)
@@ -154,12 +154,9 @@ FloatPoint ScrollAnimator::currentPosition() const
return FloatPoint(m_currentPosX, m_currentPosY);
}
-void ScrollAnimator::notifyPositionChanged(ScrollType scrollType)
+void ScrollAnimator::notifyPositionChanged()
{
- if (!m_scrollableArea->shouldUseIntegerScrollOffset())
- m_scrollableArea->setScrollOffsetFromAnimation(DoublePoint(m_currentPosX, m_currentPosY), scrollType);
- else
- m_scrollableArea->setScrollOffsetFromAnimation(IntPoint(m_currentPosX, m_currentPosY), scrollType);
+ m_scrollableArea->scrollPositionChanged(DoublePoint(m_currentPosX, m_currentPosY), UserScroll);
}
float ScrollAnimator::clampScrollPosition(ScrollbarOrientation orientation, float pos)
« no previous file with comments | « Source/platform/scroll/ScrollAnimator.h ('k') | Source/platform/scroll/ScrollAnimatorNone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698