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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2273163002: Cleanup and refactor RootScrollerController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed class comment Created 4 years, 4 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f8d81f74113d91ab2d04a58971a36c4c6f6bf22a..7662498c05a45de464e797597910fbd087804d15 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -203,12 +203,11 @@
#include "core/page/FrameTree.h"
#include "core/page/Page.h"
#include "core/page/PointerLockController.h"
-#include "core/page/scrolling/ChildViewportScrollCallback.h"
#include "core/page/scrolling/RootScrollerController.h"
-#include "core/page/scrolling/RootViewportScrollCallback.h"
#include "core/page/scrolling/ScrollStateCallback.h"
#include "core/page/scrolling/ScrollingCoordinator.h"
#include "core/page/scrolling/SnapCoordinator.h"
+#include "core/page/scrolling/ViewportScrollCallback.h"
#include "core/svg/SVGDocumentExtensions.h"
#include "core/svg/SVGScriptElement.h"
#include "core/svg/SVGTitleElement.h"
@@ -604,24 +603,11 @@ void Document::setRootScroller(Element* newScroller, ExceptionState& exceptionSt
m_rootScrollerController->set(newScroller);
}
-void Document::initializeRootScroller(ViewportScrollCallback* callback)
-{
- m_rootScrollerController->setViewportScrollCallback(callback);
-}
-
Element* Document::rootScroller() const
{
return m_rootScrollerController->get();
}
-bool Document::isViewportScrollCallback(const ScrollStateCallback* callback)
-{
- if (!callback)
- return false;
-
- return callback == m_rootScrollerController->viewportScrollCallback();
-}
-
bool Document::isInMainFrame() const
{
return frame() && frame()->isMainFrame();
@@ -2135,6 +2121,9 @@ void Document::attachLayoutTree(const AttachContext& context)
if (view())
view()->didAttachDocument();
+
+ // Needs to be called after view()->didAttachDocument().
+ m_rootScrollerController->didAttachDocument();
}
void Document::detachLayoutTree(const AttachContext& context)
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698