// preceding imports load the sharable imports.
// In that case preceding one should win because it comes first in the tree order.
// See also didUnblockFromCreatingDocument().
- if (isStateBlockedFromCreatingDocument())
+ if (state().shouldBlockDocumentCreation())
return;
ensureLoader();
// Once all preceding imports are loaded,
// HTMLImportChild can decide whether it should load the import by itself
// or it can share existing one.
- if (!isStateBlockedFromCreatingDocument())
+ if (!state().shouldBlockDocumentCreation())
ensureLoader();
- if (isStateReady())
+ if (state().isReady())
didFinish();
}
void HTMLImportChild::createLoader()
{
- ASSERT(!isStateBlockedFromCreatingDocument());
+ ASSERT(!state().shouldBlockDocumentCreation());
ASSERT(!m_loader);
m_loader = HTMLImportLoader::create(this);
m_loader->addClient(this);
bool HTMLImportChild::ownsLoader() const
{
- return m_loader->isOwnedBy(this);
+ return m_loader && m_loader->isOwnedBy(this);
}
bool HTMLImportChild::loaderHasError() const
m_client = 0;
}
+HTMLLinkElement* HTMLImportChild::link() const
+{
+ if (!m_client)
+ return 0;
+ return m_client->link();
+}
#if !defined(NDEBUG)
void HTMLImportChild::showThis()