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

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

Issue 2671933002: Migrate WTF::HashMap::add() to ::insert() (Closed)
Patch Set: rebase, add TODOs Created 3 years, 10 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/HTMLTreeBuilder.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
index ce80c79feda1f1ed9968d322301f756b4aca6471..77c75411940920e79105b0bd2e864c4741efc8d3 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
@@ -449,7 +449,7 @@ static void mapLoweredLocalNameToName(PrefixedNameToQualifiedNameMap* map,
const AtomicString& localName = name.localName();
AtomicString loweredLocalName = localName.lower();
if (loweredLocalName != localName)
- map->add(loweredLocalName, name);
+ map->insert(loweredLocalName, name);
}
}
@@ -502,7 +502,7 @@ static void addNamesWithPrefix(PrefixedNameToQualifiedNameMap* map,
const AtomicString& localName = name->localName();
AtomicString prefixColonLocalName = prefix + ':' + localName;
QualifiedName nameWithPrefix(prefix, localName, name->namespaceURI());
- map->add(prefixColonLocalName, nameWithPrefix);
+ map->insert(prefixColonLocalName, nameWithPrefix);
}
}
@@ -519,9 +519,9 @@ static void adjustForeignAttributes(AtomicHTMLToken* token) {
std::unique_ptr<const QualifiedName* []> xmlAttrs = XMLNames::getXMLAttrs();
addNamesWithPrefix(map, xmlAtom, xmlAttrs.get(), XMLNames::XMLAttrsCount);
- map->add(WTF::xmlnsAtom, XMLNSNames::xmlnsAttr);
- map->add("xmlns:xlink", QualifiedName(xmlnsAtom, xlinkAtom,
- XMLNSNames::xmlnsNamespaceURI));
+ map->insert(WTF::xmlnsAtom, XMLNSNames::xmlnsAttr);
+ map->insert("xmlns:xlink", QualifiedName(xmlnsAtom, xlinkAtom,
+ XMLNSNames::xmlnsNamespaceURI));
}
for (unsigned i = 0; i < token->attributes().size(); ++i) {

Powered by Google App Engine
This is Rietveld 408576698