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

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

Issue 238923009: HTML Imports: No more BlockingDocumentCreation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed the build breakage Created 6 years, 8 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/html/imports/HTMLImportStateResolver.cpp
diff --git a/Source/core/html/imports/HTMLImportStateResolver.cpp b/Source/core/html/imports/HTMLImportStateResolver.cpp
index e83449cad48b6407999839710c071d628231e45b..593b174c86e9841405dd37e7234f9a51ca3fc0fd 100644
--- a/Source/core/html/imports/HTMLImportStateResolver.cpp
+++ b/Source/core/html/imports/HTMLImportStateResolver.cpp
@@ -37,28 +37,18 @@ namespace WebCore {
inline bool HTMLImportStateResolver::isBlockingFollowers(HTMLImport* import)
{
- if (!import->hasLoader())
+ if (!import->loader())
return true;
- if (!import->ownsLoader())
- return false;
return !import->state().isReady();
}
-inline bool HTMLImportStateResolver::shouldBlockDocumentCreation() const
+inline bool HTMLImportStateResolver::shouldBlockScriptExecution() const
{
- // If any of its preceeding imports isn't ready, this import
- // cannot start loading because such preceeding onces can include
- // duplicating import that should wins over this.
for (const HTMLImport* ancestor = m_import; ancestor; ancestor = ancestor->parent()) {
if (ancestor->previous() && isBlockingFollowers(ancestor->previous()))
return true;
}
- return false;
-}
-
-inline bool HTMLImportStateResolver::shouldBlockScriptExecution() const
-{
for (HTMLImport* child = m_import->firstChild(); child; child = child->next()) {
if (child->isSync() && isBlockingFollowers(child))
return true;
@@ -74,8 +64,6 @@ inline bool HTMLImportStateResolver::isActive() const
HTMLImportState HTMLImportStateResolver::resolve() const
{
- if (shouldBlockDocumentCreation())
- return HTMLImportState(HTMLImportState::BlockingDocumentCreation);
if (shouldBlockScriptExecution())
return HTMLImportState(HTMLImportState::BlockingScriptExecution);
if (isActive())

Powered by Google App Engine
This is Rietveld 408576698