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

Unified Diff: Source/core/html/imports/HTMLImportLoader.cpp

Issue 298413004: Remove the importedDocument functions from HTML imports classes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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
« no previous file with comments | « Source/core/html/imports/HTMLImportLoader.h ('k') | Source/core/html/imports/LinkImport.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/imports/HTMLImportLoader.cpp
diff --git a/Source/core/html/imports/HTMLImportLoader.cpp b/Source/core/html/imports/HTMLImportLoader.cpp
index c24e0c48dc52df713e9996e46e8623d639a071bc..152125a71e451f853484a9c70b0373f65aee70f8 100644
--- a/Source/core/html/imports/HTMLImportLoader.cpp
+++ b/Source/core/html/imports/HTMLImportLoader.cpp
@@ -63,10 +63,10 @@ void HTMLImportLoader::importDestroyed()
void HTMLImportLoader::clear()
{
m_controller = 0;
- if (m_importedDocument) {
- m_importedDocument->setImportsController(0);
- m_importedDocument->cancelParsing();
- m_importedDocument.clear();
+ if (m_document) {
+ m_document->setImportsController(0);
+ m_document->cancelParsing();
+ m_document.clear();
}
}
@@ -109,8 +109,8 @@ HTMLImportLoader::State HTMLImportLoader::startWritingAndParsing(const ResourceR
ASSERT(!m_imports.isEmpty());
DocumentInit init = DocumentInit(response.url(), 0, m_controller->master()->contextDocument(), m_controller)
.withRegistrationContext(m_controller->master()->registrationContext());
- m_importedDocument = HTMLDocument::create(init);
- m_writer = DocumentWriter::create(m_importedDocument.get(), response.mimeType(), "UTF-8");
+ m_document = HTMLDocument::create(init);
+ m_writer = DocumentWriter::create(m_document.get(), response.mimeType(), "UTF-8");
return StateLoading;
}
@@ -162,14 +162,7 @@ void HTMLImportLoader::didRemoveAllPendingStylesheet()
bool HTMLImportLoader::hasPendingResources() const
{
- return m_importedDocument && m_importedDocument->styleEngine()->hasPendingSheets();
-}
-
-Document* HTMLImportLoader::importedDocument() const
-{
- if (m_state == StateError)
- return 0;
- return m_importedDocument.get();
+ return m_document && m_document->styleEngine()->hasPendingSheets();
}
void HTMLImportLoader::didFinishLoading()
@@ -179,7 +172,7 @@ void HTMLImportLoader::didFinishLoading()
clearResource();
- ASSERT(!m_importedDocument || !m_importedDocument->parsing());
+ ASSERT(!m_document || !m_document->parsing());
}
void HTMLImportLoader::moveToFirst(HTMLImportChild* import)
« no previous file with comments | « Source/core/html/imports/HTMLImportLoader.h ('k') | Source/core/html/imports/LinkImport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698