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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.h

Issue 2540653002: Revert of Script blocking resources tracking should be only done by Document::isScriptExecutionReady (Closed)
Patch Set: Created 4 years, 1 month 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: third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.h
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.h b/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.h
index 938c9ee41e64d5d563ea4f285b2c4f386ce911a5..2c251c8f12684b1a79b4d212d9230666bb6436a0 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.h
+++ b/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.h
@@ -64,6 +64,9 @@
const TextPosition& scriptStartPosition);
void executeScriptsWaitingForLoad(Resource*);
+ bool hasScriptsWaitingForResources() const {
+ return m_hasScriptsWaitingForResources;
+ }
void executeScriptsWaitingForResources();
bool executeScriptsWaitingForParsing();
@@ -92,7 +95,7 @@
void runScript(Element*, const TextPosition& scriptStartPosition);
- bool isPendingScriptReady();
+ bool isPendingScriptReady(const PendingScript*);
void stopWatchingResourceForLoad(Resource*);
@@ -104,6 +107,12 @@
Member<PendingScript> m_parserBlockingScript;
// http://www.whatwg.org/specs/web-apps/current-work/#list-of-scripts-that-will-execute-when-the-document-has-finished-parsing
HeapDeque<Member<PendingScript>> m_scriptsToExecuteAfterParsing;
+
+ // We only want stylesheet loads to trigger script execution if script
+ // execution is currently stopped due to stylesheet loads, otherwise we'd
+ // cause nested script execution when parsing <style> tags since </style>
+ // tags can cause Document to call executeScriptsWaitingForResources.
+ bool m_hasScriptsWaitingForResources;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698