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

Unified Diff: sky/engine/core/html/parser/HTMLParserIdioms.cpp

Issue 708233002: Remove many attributes. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
« no previous file with comments | « sky/engine/core/html/parser/HTMLParserIdioms.h ('k') | sky/engine/core/rendering/RenderImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/html/parser/HTMLParserIdioms.cpp
diff --git a/sky/engine/core/html/parser/HTMLParserIdioms.cpp b/sky/engine/core/html/parser/HTMLParserIdioms.cpp
index fbb60829d1c11fd9257e15496c4e8e5ebb9b9768..e5a1b4a9e53595f6f1610e84b0464873a13c6c9c 100644
--- a/sky/engine/core/html/parser/HTMLParserIdioms.cpp
+++ b/sky/engine/core/html/parser/HTMLParserIdioms.cpp
@@ -317,37 +317,6 @@ enum Mode {
Pragma,
};
-WTF::TextEncoding encodingFromMetaAttributes(const HTMLAttributeList& attributes)
-{
- bool gotPragma = false;
- Mode mode = None;
- String charset;
-
- for (HTMLAttributeList::const_iterator iter = attributes.begin(); iter != attributes.end(); ++iter) {
- const String& attributeName = iter->first;
- const String& attributeValue = AtomicString(iter->second);
-
- if (threadSafeMatch(attributeName, HTMLNames::http_equivAttr)) {
- if (equalIgnoringCase(attributeValue, "content-type"))
- gotPragma = true;
- } else if (charset.isEmpty()) {
- if (threadSafeMatch(attributeName, HTMLNames::charsetAttr)) {
- charset = attributeValue;
- mode = Charset;
- } else if (threadSafeMatch(attributeName, HTMLNames::contentAttr)) {
- charset = extractCharset(attributeValue);
- if (charset.length())
- mode = Pragma;
- }
- }
- }
-
- if (mode == Charset || (mode == Pragma && gotPragma))
- return WTF::TextEncoding(stripLeadingAndTrailingHTMLSpaces(charset));
-
- return WTF::TextEncoding();
-}
-
static bool threadSafeEqual(const StringImpl* a, const StringImpl* b)
{
if (a == b)
« no previous file with comments | « sky/engine/core/html/parser/HTMLParserIdioms.h ('k') | sky/engine/core/rendering/RenderImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698