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

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

Issue 2650343008: Implement Element.scrollIntoView for scroll-behavior: smooth. (Closed)
Patch Set: Created 3 years, 11 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 8dd9110441daaab381ee5a5c87d571b7355d0461..13eb87f1b2677f69aa5d319291d89f93a2c91f99 100644
--- a/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
@@ -8,6 +8,7 @@
#include "platform/animation/CompositorScrollOffsetAnimationCurve.h"
#include "platform/geometry/IntSize.h"
#include "platform/graphics/GraphicsLayer.h"
+#include "platform/scroll/ProgrammaticScrollCoordinator.h"
#include "platform/scroll/ScrollableArea.h"
#include "public/platform/Platform.h"
#include "public/platform/WebCompositorSupport.h"
@@ -76,6 +77,9 @@ void ProgrammaticScrollAnimator::tickAnimation(double monotonicTime) {
if (isFinished) {
m_runState = RunState::PostAnimationCleanup;
+ getScrollableArea()
+ ->getProgrammaticScrollCoordinator()
+ ->notifyAnimationFinished();
} else if (!m_scrollableArea->scheduleAnimation()) {
notifyOffsetChanged(offset);
resetAnimationState();

Powered by Google App Engine
This is Rietveld 408576698