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

Unified Diff: third_party/WebKit/Source/platform/scroll/SmoothScrollSequencer.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/SmoothScrollSequencer.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/SmoothScrollSequencer.cpp b/third_party/WebKit/Source/platform/scroll/SmoothScrollSequencer.cpp
deleted file mode 100644
index f4ba71b5ebcfecbc92c8f5524c073314e6078713..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/platform/scroll/SmoothScrollSequencer.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "platform/scroll/SmoothScrollSequencer.h"
-
-#include "platform/scroll/ProgrammaticScrollAnimator.h"
-#include "platform/scroll/ScrollableArea.h"
-
-namespace blink {
-
-SmoothScrollSequencer::SmoothScrollSequencer() {}
-
-void SmoothScrollSequencer::QueueAnimation(ScrollableArea* scrollable,
- ScrollOffset offset) {
- ScrollerAndOffsetPair scroller_offset(scrollable, offset);
- queue_.push_back(scroller_offset);
-}
-
-void SmoothScrollSequencer::RunQueuedAnimations() {
- if (queue_.IsEmpty()) {
- current_scrollable_ = nullptr;
- return;
- }
- ScrollerAndOffsetPair scroller_offset = queue_.back();
- queue_.pop_back();
- ScrollableArea* scrollable = scroller_offset.first;
- current_scrollable_ = scrollable;
- ScrollOffset offset = scroller_offset.second;
- scrollable->SetScrollOffset(offset, kProgrammaticScroll,
- kScrollBehaviorSmooth);
-}
-
-void SmoothScrollSequencer::AbortAnimations() {
- if (current_scrollable_) {
- current_scrollable_->GetProgrammaticScrollAnimator().CancelAnimation();
- current_scrollable_ = nullptr;
- }
- queue_.clear();
-}
-
-DEFINE_TRACE(SmoothScrollSequencer) {
- visitor->Trace(queue_);
- visitor->Trace(current_scrollable_);
-}
-
-} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/SmoothScrollSequencer.h ('k') | third_party/WebKit/Source/web/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698