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

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

Issue 2650343008: Implement Element.scrollIntoView for scroll-behavior: smooth. (Closed)
Patch Set: Rebase Created 3 years, 8 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/scroll/ProgrammaticScrollAnimator.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp b/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
index 9809c865682ee30f0f302808ac88568905272c8d..343d5fd7cdbf6620dab5431f4955ff9a81aa807b 100644
--- a/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
@@ -10,6 +10,7 @@
#include "platform/geometry/IntSize.h"
#include "platform/graphics/GraphicsLayer.h"
#include "platform/scroll/ScrollableArea.h"
+#include "platform/scroll/SmoothScrollSequencer.h"
#include "platform/wtf/PtrUtil.h"
#include "public/platform/Platform.h"
#include "public/platform/WebCompositorSupport.h"
@@ -76,6 +77,7 @@ void ProgrammaticScrollAnimator::tickAnimation(double monotonicTime) {
if (isFinished) {
m_runState = RunState::PostAnimationCleanup;
+ getScrollableArea()->getSmoothScrollSequencer()->notifyAnimationFinished();
bokan 2017/04/07 15:56:52 What other programmatic animations is this class h
sunyunjia 2017/05/12 18:40:25 Done.
} else if (!m_scrollableArea->scheduleAnimation()) {
notifyOffsetChanged(offset);
resetAnimationState();
@@ -168,6 +170,7 @@ void ProgrammaticScrollAnimator::notifyCompositorAnimationFinished(
int groupId) {
ASSERT(m_runState != RunState::RunningOnCompositorButNeedsUpdate);
ScrollAnimatorCompositorCoordinator::compositorAnimationFinished(groupId);
+ getScrollableArea()->getSmoothScrollSequencer()->notifyAnimationFinished();
}
DEFINE_TRACE(ProgrammaticScrollAnimator) {

Powered by Google App Engine
This is Rietveld 408576698