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

Unified Diff: trunk/Source/core/dom/Document.cpp

Issue 201673005: Revert 169577 "[HTML Import] Let script block by pending resourc..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 9 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 | « trunk/Source/core/dom/Document.h ('k') | trunk/Source/core/html/imports/HTMLImportsController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/Source/core/dom/Document.cpp
===================================================================
--- trunk/Source/core/dom/Document.cpp (revision 169768)
+++ trunk/Source/core/dom/Document.cpp (working copy)
@@ -816,6 +816,11 @@
m_import = import;
}
+void Document::didLoadAllImports()
+{
+ executeScriptsWaitingForResourcesIfNeeded();
+}
+
bool Document::haveImportsLoaded() const
{
return !m_import || !m_import->state().shouldBlockScriptExecution();
@@ -2840,37 +2845,20 @@
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())
« no previous file with comments | « trunk/Source/core/dom/Document.h ('k') | trunk/Source/core/html/imports/HTMLImportsController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698