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

Unified Diff: Source/core/html/parser/HTMLTokenizer.cpp

Issue 141143007: Revert of Revert "Moved text decoding to the parser thread" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 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
« no previous file with comments | « Source/core/html/parser/HTMLTokenizer.h ('k') | Source/core/html/parser/HTMLViewSourceParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLTokenizer.cpp
diff --git a/Source/core/html/parser/HTMLTokenizer.cpp b/Source/core/html/parser/HTMLTokenizer.cpp
index ed8c954a64ba37c47c0ca2cd67657a6eb860f947..43e50c70c6723473f2a7e1643d7141e38581ed70 100644
--- a/Source/core/html/parser/HTMLTokenizer.cpp
+++ b/Source/core/html/parser/HTMLTokenizer.cpp
@@ -30,6 +30,7 @@
#include "HTMLNames.h"
#include "core/html/parser/HTMLEntityParser.h"
+#include "core/html/parser/HTMLParserIdioms.h"
#include "core/html/parser/HTMLTreeBuilder.h"
#include "platform/NotImplemented.h"
#include "core/xml/parser/MarkupTokenizerInlines.h"
@@ -1596,20 +1597,20 @@ String HTMLTokenizer::bufferedCharacters() const
return characters.toString();
}
-void HTMLTokenizer::updateStateFor(const AtomicString& tagName)
+void HTMLTokenizer::updateStateFor(const String& tagName)
{
- if (tagName == textareaTag || tagName == titleTag)
+ if (threadSafeMatch(tagName, textareaTag) || threadSafeMatch(tagName, titleTag))
setState(HTMLTokenizer::RCDATAState);
- else if (tagName == plaintextTag)
+ else if (threadSafeMatch(tagName, plaintextTag))
setState(HTMLTokenizer::PLAINTEXTState);
- else if (tagName == scriptTag)
+ else if (threadSafeMatch(tagName, scriptTag))
setState(HTMLTokenizer::ScriptDataState);
- else if (tagName == styleTag
- || tagName == iframeTag
- || tagName == xmpTag
- || (tagName == noembedTag && m_options.pluginsEnabled)
- || tagName == noframesTag
- || (tagName == noscriptTag && m_options.scriptEnabled))
+ else if (threadSafeMatch(tagName, styleTag)
+ || threadSafeMatch(tagName, iframeTag)
+ || threadSafeMatch(tagName, xmpTag)
+ || (threadSafeMatch(tagName, noembedTag) && m_options.pluginsEnabled)
+ || threadSafeMatch(tagName, noframesTag)
+ || (threadSafeMatch(tagName, noscriptTag) && m_options.scriptEnabled))
setState(HTMLTokenizer::RAWTEXTState);
}
« no previous file with comments | « Source/core/html/parser/HTMLTokenizer.h ('k') | Source/core/html/parser/HTMLViewSourceParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698