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

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

Issue 2614663004: Pause HTML parser for external stylesheets in the body (Closed)
Patch Set: Added Tests 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/HTMLTreeBuilderSimulator.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilderSimulator.cpp b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilderSimulator.cpp
index d23ba6139b787362ccc9bbd6358ba352763fd952..1821aad0b39d84707cae333f006e21df4a9b2375 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilderSimulator.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilderSimulator.cpp
@@ -145,6 +145,8 @@ HTMLTreeBuilderSimulator::SimulatedToken HTMLTreeBuilderSimulator::simulate(
} else if (threadSafeMatch(tagName, scriptTag)) {
tokenizer->setState(HTMLTokenizer::ScriptDataState);
simulatedToken = ScriptStart;
+ } else if (threadSafeMatch(tagName, linkTag)) {
+ simulatedToken = Link;
} else if (threadSafeMatch(tagName, styleTag) ||
threadSafeMatch(tagName, iframeTag) ||
threadSafeMatch(tagName, xmpTag) ||
@@ -176,6 +178,8 @@ HTMLTreeBuilderSimulator::SimulatedToken HTMLTreeBuilderSimulator::simulate(
tokenizer->setState(HTMLTokenizer::DataState);
return ScriptEnd;
}
+ if (threadSafeMatch(tagName, styleTag))
+ simulatedToken = StyleEnd;
}
// FIXME: Also setForceNullCharacterReplacement when in text mode.

Powered by Google App Engine
This is Rietveld 408576698