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

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

Issue 2280453002: Split RootScrollerController into top-document and child-document classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rootScrollerIFrames2
Patch Set: 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
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 7662498c05a45de464e797597910fbd087804d15..e6ab2c265e1f09106422611696ef01228bfff4aa 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -207,7 +207,7 @@
#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/page/scrolling/TopDocumentRootScrollerController.h"
#include "core/svg/SVGDocumentExtensions.h"
#include "core/svg/SVGScriptElement.h"
#include "core/svg/SVGTitleElement.h"
@@ -473,7 +473,11 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC
m_fetcher = ResourceFetcher::create(nullptr);
}
- m_rootScrollerController = RootScrollerController::create(*this);
+ // TODO(bokan): RootScrollerController currently assumes we have an m_frame
+ // in checks to isInMainFrame.
tdresser 2016/08/25 14:59:21 I don't quite follow this TODO.
bokan 2016/08/25 15:14:13 Ah, yah, this was added pre-split so I've updated
tdresser 2016/08/25 15:18:11 Should this TODO have a bug?
+ m_rootScrollerController = isInMainFrame()
+ ? TopDocumentRootScrollerController::create(*this)
+ : RootScrollerController::create(*this);
// We depend on the url getting immediately set in subframes, but we
// also depend on the url NOT getting immediately set in opened windows.

Powered by Google App Engine
This is Rietveld 408576698