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

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

Issue 18467003: Refactoring: Introduce HTMLImport interface to form import tree. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing Created 7 years, 5 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/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 4f90cc27c71cdb9948743132bf283cee3caa1777..c1e75c3ac230d21b01a894c343e04193e2fe7e57 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -105,7 +105,7 @@
#include "core/html/HTMLFrameOwnerElement.h"
#include "core/html/HTMLHeadElement.h"
#include "core/html/HTMLIFrameElement.h"
-#include "core/html/HTMLImportsController.h"
+#include "core/html/HTMLImport.h"
#include "core/html/HTMLLinkElement.h"
#include "core/html/HTMLNameCollection.h"
#include "core/html/HTMLScriptElement.h"
@@ -441,6 +441,7 @@ Document::Document(Frame* frame, const KURL& url, DocumentClassFlags documentCla
, m_prerenderer(Prerenderer::create(this))
, m_textAutosizer(TextAutosizer::create(this))
, m_pendingTasksTimer(this, &Document::pendingTasksTimerFired)
+ , m_imports(0)
, m_scheduledTasksAreSuspended(false)
, m_sharedObjectPoolClearTimer(this, &Document::sharedObjectPoolClearTimerFired)
#ifndef NDEBUG
@@ -585,7 +586,7 @@ void Document::dispose()
detachParser();
m_registry.clear();
- m_imports.clear();
+ m_imports = 0;
dominicc (has gone to gerrit) 2013/07/11 03:26:48 How does this not leak?
// removeDetachedChildren() doesn't always unregister IDs,
// so tear down scope information upfront to avoid having stale references in the map.
@@ -769,9 +770,9 @@ CustomElementRegistry* Document::ensureCustomElementRegistry()
return m_registry.get();
}
-void Document::setImports(PassRefPtr<HTMLImportsController> imports)
+void Document::setImports(HTMLImport* imports)
{
- ASSERT(!m_imports);
+ ASSERT(!m_imports || !imports);
m_imports = imports;
}
@@ -782,7 +783,7 @@ void Document::didLoadAllImports()
bool Document::haveImportsLoaded() const
{
- return !m_imports || m_imports->haveLoaded();
+ return !m_imports || m_imports->haveChildrenLoaded();
}
PassRefPtr<DocumentFragment> Document::createDocumentFragment()

Powered by Google App Engine
This is Rietveld 408576698