Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index db5f3b0b2f44c73ef3afdf7fcdcee96e46f19ae8..d15744f63c770033c23bf9905536dae90475b354 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -815,11 +815,6 @@ void Document::setImport(HTMLImport* import) |
m_import = import; |
} |
-void Document::didLoadAllImports() |
-{ |
- executeScriptsWaitingForResourcesIfNeeded(); |
-} |
- |
bool Document::haveImportsLoaded() const |
{ |
return !m_import || !m_import->state().shouldBlockScriptExecution(); |
@@ -2843,20 +2838,37 @@ LocalFrame* Document::findUnsafeParentScrollPropagationBoundary() |
return 0; |
} |
+void Document::didLoadAllImports() |
+{ |
+ if (!haveStylesheetsLoaded()) |
+ return; |
+ |
+ didLoadAllScriptBlockingResources(); |
+} |
+ |
void Document::didRemoveAllPendingStylesheet() |
{ |
m_needsNotifyRemoveAllPendingStylesheet = false; |
styleResolverChanged(RecalcStyleDeferred, hasNodesWithPlaceholderStyle() ? FullStyleUpdate : AnalyzedStyleUpdate); |
+ |
+ if (m_import) |
+ m_import->didRemoveAllPendingStylesheet(); |
+ if (!haveImportsLoaded()) |
+ return; |
+ |
+ didLoadAllScriptBlockingResources(); |
+} |
+ |
+void Document::didLoadAllScriptBlockingResources() |
+{ |
executeScriptsWaitingForResourcesIfNeeded(); |
if (m_gotoAnchorNeededAfterStylesheetsLoad && view()) |
view()->scrollToFragment(m_url); |
- |
- if (m_import) |
- m_import->didRemoveAllPendingStylesheet(); |
} |
+ |
void Document::executeScriptsWaitingForResourcesIfNeeded() |
{ |
if (!haveStylesheetsAndImportsLoaded()) |