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

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

Issue 792513004: Implement CSSOM smooth scroll for Elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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/ProgrammaticScrollAnimator.h ('k') | Source/platform/scroll/ScrollAnimator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/scroll/ProgrammaticScrollAnimator.cpp
diff --git a/Source/platform/scroll/ProgrammaticScrollAnimator.cpp b/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
index e7478adb5354ce82d92283c733f71a0793103d19..574018064f1a97aeb528ca6e7a317ae5dec6e2aa 100644
--- a/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
+++ b/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
@@ -41,6 +41,7 @@ void ProgrammaticScrollAnimator::animateToOffset(FloatPoint offset)
m_animationCurve = adoptPtr(Platform::current()->compositorSupport()->createScrollOffsetAnimationCurve(m_targetOffset, WebCompositorAnimationCurve::TimingFunctionTypeEaseInOut));
m_animationCurve->setInitialValue(FloatPoint(m_scrollableArea->scrollPosition()));
+ m_scrollableArea->registerForAnimation();
if (!m_scrollableArea->scheduleAnimation()) {
resetAnimationState();
m_scrollableArea->notifyScrollPositionChanged(IntPoint(offset.x(), offset.y()));
@@ -71,4 +72,9 @@ void ProgrammaticScrollAnimator::tickAnimation(double monotonicTime)
}
}
+bool ProgrammaticScrollAnimator::hasRunningAnimation() const
+{
+ return !!m_animationCurve;
+}
+
} // namespace blink
« no previous file with comments | « Source/platform/scroll/ProgrammaticScrollAnimator.h ('k') | Source/platform/scroll/ScrollAnimator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698