Index: third_party/WebKit/Source/core/dom/Document.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp |
index d303cfccd4c229df7d7afba8c0aebc6ac52d3e0c..de80f297b6dad17fa698a7d0a4eae8d3e2eb105f 100644 |
--- a/third_party/WebKit/Source/core/dom/Document.cpp |
+++ b/third_party/WebKit/Source/core/dom/Document.cpp |
@@ -197,6 +197,7 @@ |
#include "core/page/scrolling/RootScroller.h" |
#include "core/page/scrolling/ScrollingCoordinator.h" |
#include "core/page/scrolling/SnapCoordinator.h" |
+#include "core/page/scrolling/snap/SnapManagerBridge.h" |
#include "core/svg/SVGDocumentExtensions.h" |
#include "core/svg/SVGScriptElement.h" |
#include "core/svg/SVGTitleElement.h" |
@@ -5549,8 +5550,10 @@ bool Document::threadedParsingEnabledForTesting() |
SnapCoordinator* Document::snapCoordinator() |
{ |
- if (RuntimeEnabledFeatures::cssScrollSnapPointsEnabled() && !m_snapCoordinator) |
- m_snapCoordinator = SnapCoordinator::create(); |
+ if (RuntimeEnabledFeatures::cssScrollSnapPointsEnabled() && !m_snapCoordinator) { |
+ m_snapManagerBridge = SnapManagerBridge::create(this); |
+ m_snapCoordinator = SnapCoordinator::create(m_snapManagerBridge.get()); |
+ } |
return m_snapCoordinator.get(); |
} |
@@ -6002,6 +6005,7 @@ DEFINE_TRACE(Document) |
visitor->trace(m_intersectionObserverController); |
visitor->trace(m_intersectionObserverData); |
visitor->trace(m_snapCoordinator); |
+ visitor->trace(m_snapManagerBridge); |
Supplementable<Document>::trace(visitor); |
TreeScope::trace(visitor); |
ContainerNode::trace(visitor); |