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

Unified Diff: third_party/WebKit/Source/core/html/canvas/CanvasFontCache.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/html/canvas/CanvasFontCache.cpp
diff --git a/third_party/WebKit/Source/core/html/canvas/CanvasFontCache.cpp b/third_party/WebKit/Source/core/html/canvas/CanvasFontCache.cpp
index 664b9dc9f0b3f6b448b6ada1edc8cec10440ae43..c562981329d41b2598bc44e5c51189a6b534badb 100644
--- a/third_party/WebKit/Source/core/html/canvas/CanvasFontCache.cpp
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasFontCache.cpp
@@ -73,7 +73,7 @@ bool CanvasFontCache::getFontUsingDefaultStyle(const String& fontString,
RefPtr<ComputedStyle> fontStyle =
ComputedStyle::clone(*m_defaultFontStyle.get());
m_document->ensureStyleResolver().computeFont(fontStyle.get(), *parsedStyle);
- m_fontsResolvedUsingDefaultStyle.add(fontString, fontStyle->font());
+ m_fontsResolvedUsingDefaultStyle.insert(fontString, fontStyle->font());
resolvedFont = m_fontsResolvedUsingDefaultStyle.find(fontString)->value;
return true;
}
@@ -99,7 +99,7 @@ MutableStylePropertySet* CanvasFontCache::parseFont(const String& fontString) {
if (fontValue &&
(fontValue->isInitialValue() || fontValue->isInheritedValue()))
return nullptr;
- m_fetchedFonts.add(fontString, parsedStyle);
+ m_fetchedFonts.insert(fontString, parsedStyle);
m_fontLRUList.add(fontString);
// Hard limit is applied here, on the fly, while the soft limit is
// applied at the end of the task.

Powered by Google App Engine
This is Rietveld 408576698