diff options
Diffstat (limited to 'Source/core/html/imports/HTMLImportChild.cpp')
-rw-r--r-- | Source/core/html/imports/HTMLImportChild.cpp | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/Source/core/html/imports/HTMLImportChild.cpp b/Source/core/html/imports/HTMLImportChild.cpp index 30314e1f0..4a6b89a59 100644 --- a/Source/core/html/imports/HTMLImportChild.cpp +++ b/Source/core/html/imports/HTMLImportChild.cpp @@ -132,33 +132,14 @@ void HTMLImportChild::importDestroyed() } } -HTMLImportRoot* HTMLImportChild::root() -{ - return parent() ? parent()->root() : 0; -} - Document* HTMLImportChild::document() const { return (m_loader && m_loader->isOwnedBy(this)) ? m_loader->document() : 0; } -void HTMLImportChild::wasDetachedFromDocument() -{ - // For imported documens this shouldn't be called because Document::m_import is - // cleared before Document is destroyed by HTMLImportChild::importDestroyed(). - ASSERT_NOT_REACHED(); -} - -void HTMLImportChild::didFinishParsing() -{ - ASSERT(m_loader->isOwnedBy(this)); - m_loader->didFinishParsing(); -} - -void HTMLImportChild::didRemoveAllPendingStylesheet() +void HTMLImportChild::stateWillChange() { - ASSERT(m_loader->isOwnedBy(this)); - m_loader->didRemoveAllPendingStylesheet(); + toHTMLImportsController(root())->scheduleRecalcState(); } void HTMLImportChild::stateDidChange() @@ -179,7 +160,7 @@ void HTMLImportChild::ensureLoader() if (m_loader) return; - if (HTMLImportChild* found = root()->findLinkFor(m_url, this)) + if (HTMLImportChild* found = toHTMLImportsController(root())->findLinkFor(m_url, this)) shareLoader(found); else createLoader(); @@ -189,7 +170,7 @@ void HTMLImportChild::createLoader() { ASSERT(!state().shouldBlockDocumentCreation()); ASSERT(!m_loader); - m_loader = root()->toController()->createLoader(); + m_loader = toHTMLImportsController(root())->createLoader(); m_loader->addImport(this); m_loader->startLoading(resource()); } |