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

Unified Diff: third_party/WebKit/Source/core/dom/StyleEngine.cpp

Issue 2671933002: Migrate WTF::HashMap::add() to ::insert() (Closed)
Patch Set: Created 3 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
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 7950c0b649446db5c431f1712fc874ddaa956d0d..49ef7c1d2d14843820a1dddbf75041ff4ff1c6fc 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);

Powered by Google App Engine
This is Rietveld 408576698