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

Unified Diff: third_party/WebKit/Source/core/page/Page.cpp

Issue 2650343008: Implement Element.scrollIntoView for scroll-behavior: smooth. (Closed)
Patch Set: Fixed the comments 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/core/page/Page.cpp
diff --git a/third_party/WebKit/Source/core/page/Page.cpp b/third_party/WebKit/Source/core/page/Page.cpp
index 6dc4b2180bc29db3eaaf4c604531a8cad016befb..ece401687520e4a6acf014132bf94b7cc8fe913c 100644
--- a/third_party/WebKit/Source/core/page/Page.cpp
+++ b/third_party/WebKit/Source/core/page/Page.cpp
@@ -61,6 +61,7 @@
#include "platform/graphics/GraphicsLayer.h"
#include "platform/loader/fetch/ResourceFetcher.h"
#include "platform/plugins/PluginData.h"
+#include "platform/scroll/SmoothScrollSequencer.h"
#include "public/platform/Platform.h"
namespace blink {
@@ -171,6 +172,13 @@ PageScaleConstraintsSet& Page::GetPageScaleConstraintsSet() {
return *page_scale_constraints_set_;
}
+SmoothScrollSequencer* Page::GetSmoothScrollSequencer() {
+ if (!smooth_scroll_sequencer_)
+ smooth_scroll_sequencer_ = SmoothScrollSequencer::Create();
bokan 2017/05/19 18:37:14 Since we're using this for more than just smooth s
sunyunjia 2017/05/19 22:30:41 Done.
+
+ return smooth_scroll_sequencer_.Get();
+}
+
const PageScaleConstraintsSet& Page::GetPageScaleConstraintsSet() const {
return *page_scale_constraints_set_;
}
@@ -621,6 +629,7 @@ DEFINE_TRACE(Page) {
visitor->Trace(context_menu_controller_);
visitor->Trace(pointer_lock_controller_);
visitor->Trace(scrolling_coordinator_);
+ visitor->Trace(smooth_scroll_sequencer_);
visitor->Trace(browser_controls_);
visitor->Trace(console_message_storage_);
visitor->Trace(event_handler_registry_);

Powered by Google App Engine
This is Rietveld 408576698