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

Unified Diff: third_party/WebKit/Source/core/dom/StyleEngine.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/dom/StyleEngine.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
index a9a87fb0165ac028837a37056ad0e4109c5296bb..6a5d1cee16dcd80a5e82f980cc0b12abbbd8b548 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
@@ -98,7 +98,7 @@ TreeScopeStyleSheetCollection* StyleEngine::ensureStyleSheetCollectionFor(
return &documentStyleSheetCollection();
StyleSheetCollectionMap::AddResult result =
- m_styleSheetCollectionMap.add(&treeScope, nullptr);
+ m_styleSheetCollectionMap.insert(&treeScope, nullptr);
if (result.isNewEntry)
result.storedValue->value =
new ShadowTreeStyleSheetCollection(toShadowRoot(treeScope));
@@ -530,7 +530,7 @@ CSSStyleSheet* StyleEngine::createSheet(Element& element,
AtomicString textContent(text);
- auto result = m_textToSheetCache.add(textContent, nullptr);
+ auto result = m_textToSheetCache.insert(textContent, nullptr);
StyleSheetContents* contents = result.storedValue->value;
if (result.isNewEntry || !contents ||
!contents->isCacheableForStyleElement()) {
@@ -538,7 +538,7 @@ CSSStyleSheet* StyleEngine::createSheet(Element& element,
styleSheet = parseSheet(element, text, startPosition);
if (styleSheet->contents()->isCacheableForStyleElement()) {
result.storedValue->value = styleSheet->contents();
- m_sheetToTextCache.add(styleSheet->contents(), textContent);
+ m_sheetToTextCache.insert(styleSheet->contents(), textContent);
}
} else {
DCHECK(contents);
« no previous file with comments | « third_party/WebKit/Source/core/dom/SpaceSplitString.cpp ('k') | third_party/WebKit/Source/core/dom/UserActionElementSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698