Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index ae93b19406f5fb4cec1ff4c2a7aa9be222f4e7f1..a98a967fb804e1022860fd098a56c818aaa3bfc0 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -816,11 +816,6 @@ void Document::setImport(HTMLImport* import) |
m_import = import; |
} |
-void Document::didLoadAllImports() |
-{ |
- executeScriptsWaitingForResourcesIfNeeded(); |
-} |
- |
bool Document::haveImportsLoaded() const |
{ |
return !m_import || !m_import->state().shouldBlockScriptExecution(); |
@@ -2845,20 +2840,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()) |