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

Unified Diff: third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp

Issue 2614663004: Pause HTML parser for external stylesheets in the body (Closed)
Patch Set: merge to trunk Created 3 years, 11 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: third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp b/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp
index 49b3dbea18446ecdd49dc60e213f9f219e3293d8..c95a98d156c2bbde67145a1b72a41fe2b4dd339b 100644
--- a/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp
+++ b/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp
@@ -291,6 +291,8 @@ void BackgroundHTMLParser::pumpTokenizer() {
m_token->clear();
if (simulatedToken == HTMLTreeBuilderSimulator::ScriptEnd ||
+ simulatedToken == HTMLTreeBuilderSimulator::StyleEnd ||
+ simulatedToken == HTMLTreeBuilderSimulator::Link ||
m_pendingTokens->size() >= m_pendingTokenLimit) {
shouldNotifyMainThread |= queueChunkForMainThread();
// If we're far ahead of the main thread, yield for a bit to avoid

Powered by Google App Engine
This is Rietveld 408576698