Index: Source/core/html/imports/HTMLImportChild.cpp |
diff --git a/Source/core/html/imports/HTMLImportChild.cpp b/Source/core/html/imports/HTMLImportChild.cpp |
index 78bcdc1f052976603139429a1ae55da995c33d77..1078cad0757a474f2d0b7b456edeecf5a4d214ea 100644 |
--- a/Source/core/html/imports/HTMLImportChild.cpp |
+++ b/Source/core/html/imports/HTMLImportChild.cpp |
@@ -41,11 +41,11 @@ |
namespace WebCore { |
-HTMLImportChild::HTMLImportChild(const KURL& url, SyncMode sync) |
+HTMLImportChild::HTMLImportChild(const KURL& url, HTMLImportLoader* loader, SyncMode sync) |
: HTMLImport(sync) |
, m_url(url) |
, m_weakFactory(this) |
- , m_loader(0) |
+ , m_loader(loader) |
, m_client(0) |
{ |
} |
@@ -59,25 +59,14 @@ HTMLImportChild::~HTMLImportChild() |
m_client->importChildWasDestroyed(this); |
} |
-void HTMLImportChild::wasAlreadyLoaded() |
+void HTMLImportChild::didShareLoader() |
{ |
- ASSERT(!m_loader); |
- ASSERT(m_client); |
- shareLoader(); |
+ createCustomElementMicrotaskStepIfNeeded(); |
stateWillChange(); |
} |
-void HTMLImportChild::startLoading(const ResourcePtr<RawResource>& resource) |
+void HTMLImportChild::didStartLoading() |
{ |
- ASSERT(!m_loader); |
- |
- if (m_loader) |
- return; |
- |
- m_loader = toHTMLImportsController(root())->createLoader(); |
- m_loader->addImport(this); |
- m_loader->startLoading(resource); |
- |
createCustomElementMicrotaskStepIfNeeded(); |
} |
@@ -167,18 +156,6 @@ void HTMLImportChild::createCustomElementMicrotaskStepIfNeeded() |
toHTMLImportChild(child)->createCustomElementMicrotaskStepIfNeeded(); |
} |
-void HTMLImportChild::shareLoader() |
-{ |
- ASSERT(!m_loader); |
- |
- if (HTMLImportChild* childToShareWith = toHTMLImportsController(root())->findLinkFor(m_url, this)) { |
- m_loader = childToShareWith->m_loader; |
- m_loader->addImport(this); |
- } |
- |
- createCustomElementMicrotaskStepIfNeeded(); |
-} |
- |
bool HTMLImportChild::isDone() const |
{ |
return m_loader && m_loader->isDone() && !m_loader->microtaskQueue()->needsProcessOrStop() && !m_customElementMicrotaskStep; |