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

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

Issue 2650343008: Implement Element.scrollIntoView for scroll-behavior: smooth. (Closed)
Patch Set: Rebase Created 3 years, 8 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 c8b68a9c243f97983cc37d7d4513b32538ef0494..d7dcd4add55bc6a953434110e30685aa14ee31d2 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 {
@@ -164,6 +165,13 @@ ScrollingCoordinator* Page::scrollingCoordinator() {
return m_scrollingCoordinator.get();
}
+SmoothScrollSequencer* Page::smoothScrollSequencer() {
+ if (!m_smoothScrollSequencer)
+ m_smoothScrollSequencer = SmoothScrollSequencer::create();
+
+ return m_smoothScrollSequencer.get();
+}
+
PageScaleConstraintsSet& Page::pageScaleConstraintsSet() {
return *m_pageScaleConstraintsSet;
}
@@ -617,6 +625,7 @@ DEFINE_TRACE(Page) {
visitor->trace(m_contextMenuController);
visitor->trace(m_pointerLockController);
visitor->trace(m_scrollingCoordinator);
+ visitor->trace(m_smoothScrollSequencer);
visitor->trace(m_browserControls);
visitor->trace(m_consoleMessageStorage);
visitor->trace(m_eventHandlerRegistry);

Powered by Google App Engine
This is Rietveld 408576698