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

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

Issue 2911103002: Revert of Implement Element.scrollIntoView for scroll-behavior: smooth. (Closed)
Patch Set: Created 3 years, 7 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 1ced72570e0c241a56b8311391f61ae8df638670..b717e08a653fad1d135766e18a01070cddfca373 100644
--- a/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
@@ -10,7 +10,6 @@
#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"
@@ -40,15 +39,12 @@
NotifyOffsetChanged(offset);
}
-void ProgrammaticScrollAnimator::AnimateToOffset(
- const ScrollOffset& offset,
- bool sequenced_for_smooth_scroll) {
+void ProgrammaticScrollAnimator::AnimateToOffset(const ScrollOffset& offset) {
if (run_state_ == RunState::kPostAnimationCleanup)
ResetAnimationState();
start_time_ = 0.0;
target_offset_ = offset;
- sequenced_for_smooth_scroll_ = sequenced_for_smooth_scroll;
animation_curve_ = CompositorScrollOffsetAnimationCurve::Create(
CompositorOffsetFromBlinkOffset(target_offset_),
CompositorScrollOffsetAnimationCurve::kScrollDurationDeltaBased);
@@ -80,7 +76,6 @@
if (is_finished) {
run_state_ = RunState::kPostAnimationCleanup;
- AnimationFinished();
} else if (!scrollable_area_->ScheduleAnimation()) {
NotifyOffsetChanged(offset);
ResetAnimationState();
@@ -174,16 +169,6 @@
int group_id) {
DCHECK_NE(run_state_, RunState::kRunningOnCompositorButNeedsUpdate);
ScrollAnimatorCompositorCoordinator::CompositorAnimationFinished(group_id);
- AnimationFinished();
-}
-
-void ProgrammaticScrollAnimator::AnimationFinished() {
- if (sequenced_for_smooth_scroll_) {
- sequenced_for_smooth_scroll_ = false;
- if (SmoothScrollSequencer* sequencer =
- GetScrollableArea()->GetSmoothScrollSequencer())
- sequencer->RunQueuedAnimations();
- }
}
DEFINE_TRACE(ProgrammaticScrollAnimator) {

Powered by Google App Engine
This is Rietveld 408576698