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

Unified Diff: sky/engine/core/dom/Document.cpp

Issue 681983005: Basic implementation of <import> (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Works Created 6 years, 1 month 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: sky/engine/core/dom/Document.cpp
diff --git a/sky/engine/core/dom/Document.cpp b/sky/engine/core/dom/Document.cpp
index 81a6cbaa8bf3eb169f8208aa5c00bd93c4c9963a..80675feb6fdd6d87ac8771c7bd5163da82d00004 100644
--- a/sky/engine/core/dom/Document.cpp
+++ b/sky/engine/core/dom/Document.cpp
@@ -563,6 +563,15 @@ void Document::setImportsController(HTMLImportsController* controller)
m_importsController = controller;
}
+HTMLImportsController& Document::ensureImportsController()
+{
+ if (!m_importsController) {
+ ASSERT(frame()); // The document should be the master.
+ HTMLImportsController::provideTo(*this);
+ }
+ return *m_importsController;
+}
+
HTMLImportLoader* Document::importLoader() const
{
if (!m_importsController)

Powered by Google App Engine
This is Rietveld 408576698