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

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

Issue 2650343008: Implement Element.scrollIntoView for scroll-behavior: smooth. (Closed)
Patch Set: Fixed nits. Created 3 years, 6 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 e878d1f15c495936679d97a0e97dcdb044869f38..4a083020409fba2b7999b1c52cfb1bf00e5c6589 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 {
@@ -172,6 +173,13 @@ PageScaleConstraintsSet& Page::GetPageScaleConstraintsSet() {
return *page_scale_constraints_set_;
}
+SmoothScrollSequencer* Page::GetSmoothScrollSequencer() {
+ if (!smooth_scroll_sequencer_)
+ smooth_scroll_sequencer_ = new SmoothScrollSequencer();
+
+ return smooth_scroll_sequencer_.Get();
+}
+
const PageScaleConstraintsSet& Page::GetPageScaleConstraintsSet() const {
return *page_scale_constraints_set_;
}
@@ -620,6 +628,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