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

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

Issue 2650343008: Implement Element.scrollIntoView for scroll-behavior: smooth. (Closed)
Patch Set: Added SimTest. Created 3 years, 10 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..5c4d9d812f182e7a1d343693d5ccb6b7d341f21b 100644
--- a/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
@@ -4,15 +4,16 @@
#include "platform/scroll/ProgrammaticScrollAnimator.h"
+#include <memory>
#include "platform/animation/CompositorAnimation.h"
#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"
#include "wtf/PtrUtil.h"
-#include <memory>
namespace blink {
@@ -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