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

Unified Diff: Source/core/page/PageSerializer.cpp

Issue 74513003: Moved text decoding to the parser thread (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@parserthread_step25
Patch Set: Removed AtomicString from HTMLMetaCharsetParser Created 7 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: Source/core/page/PageSerializer.cpp
diff --git a/Source/core/page/PageSerializer.cpp b/Source/core/page/PageSerializer.cpp
index 59a6542c5de492030ac17ef04b00ca0c42031d2c..460ca698407fddc38e58f864fb43436c02096e28 100644
--- a/Source/core/page/PageSerializer.cpp
+++ b/Source/core/page/PageSerializer.cpp
@@ -53,6 +53,7 @@
#include "core/html/HTMLInputElement.h"
#include "core/html/HTMLLinkElement.h"
#include "core/html/HTMLStyleElement.h"
+#include "core/html/parser/HTMLIdentifier.h"
#include "core/html/parser/HTMLMetaCharsetParser.h"
#include "core/frame/Frame.h"
#include "core/page/Page.h"
@@ -80,8 +81,9 @@ static bool isCharsetSpecifyingNode(Node* node)
if (element->hasAttributes()) {
for (unsigned i = 0; i < element->attributeCount(); ++i) {
const Attribute* attribute = element->attributeItem(i);
+ HTMLIdentifier attributeName(attribute->name().localName(), Likely8Bit);
// FIXME: We should deal appropriately with the attribute if they have a namespace.
- attributes.append(std::make_pair(attribute->name().toString(), attribute->value().string()));
+ attributes.append(std::make_pair(attributeName, attribute->value().string()));
}
}
WTF::TextEncoding textEncoding = HTMLMetaCharsetParser::encodingFromMetaAttributes(attributes);

Powered by Google App Engine
This is Rietveld 408576698