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

Unified Diff: Source/core/frame/LocalFrame.cpp

Issue 1188563005: Compute snap offsets (both repeat and element based) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Clean up TODOs Created 5 years, 3 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: Source/core/frame/LocalFrame.cpp
diff --git a/Source/core/frame/LocalFrame.cpp b/Source/core/frame/LocalFrame.cpp
index 8951fe2f267717a56e37cff755ff3f4a80e0f8ab..d33b6b0461bcd1d68c3d518ab16020b9aa489e43 100644
--- a/Source/core/frame/LocalFrame.cpp
+++ b/Source/core/frame/LocalFrame.cpp
@@ -61,6 +61,7 @@
#include "core/page/FocusController.h"
#include "core/page/Page.h"
#include "core/page/scrolling/ScrollingCoordinator.h"
+#include "core/page/scrolling/SnapCoordinator.h"
#include "core/paint/DeprecatedPaintLayer.h"
#include "core/paint/TransformRecorder.h"
#include "core/svg/SVGDocumentExtensions.h"
@@ -217,6 +218,7 @@ DEFINE_TRACE(LocalFrame)
visitor->trace(m_eventHandler);
visitor->trace(m_console);
visitor->trace(m_inputMethodController);
+ visitor->trace(m_snapCoordinator);
visitor->template registerWeakMembers<LocalFrame, &LocalFrame::clearWeakMembers>(this);
HeapSupplementable<LocalFrame>::trace(visitor);
#endif
@@ -852,6 +854,9 @@ inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO
, m_textZoomFactor(parentTextZoomFactor(this))
, m_inViewSourceMode(false)
{
+ if (RuntimeEnabledFeatures::cssScrollSnapPointsEnabled())
+ m_snapCoordinator = SnapCoordinator::create(*this);
esprehn 2015/09/24 17:37:41 This should be on FrameView.
majidvp 2015/10/15 21:47:02 Following your other comment I moved it to documen
+
if (isLocalRoot())
m_instrumentingAgents = InstrumentingAgents::create();
else

Powered by Google App Engine
This is Rietveld 408576698