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

Unified Diff: third_party/WebKit/Source/core/html/canvas/CanvasFontCache.cpp

Issue 2724363002: Migrate WTF::LinkedHashSet/ListHashSet::add() to ::insert() (Closed)
Patch Set: 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/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 5308b349753588f1ed5be703fd22fe4ed5c41625..5ba9184744b0315ca127524b2bb23c6faa981503 100644
--- a/third_party/WebKit/Source/core/html/canvas/CanvasFontCache.cpp
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasFontCache.cpp
@@ -60,7 +60,7 @@ bool CanvasFontCache::getFontUsingDefaultStyle(const String& fontString,
if (i != m_fontsResolvedUsingDefaultStyle.end()) {
ASSERT(m_fontLRUList.contains(fontString));
m_fontLRUList.remove(fontString);
- m_fontLRUList.add(fontString);
+ m_fontLRUList.insert(fontString);
resolvedFont = i->value;
return true;
}
@@ -85,7 +85,7 @@ MutableStylePropertySet* CanvasFontCache::parseFont(const String& fontString) {
ASSERT(m_fontLRUList.contains(fontString));
parsedStyle = i->value;
m_fontLRUList.remove(fontString);
- m_fontLRUList.add(fontString);
+ m_fontLRUList.insert(fontString);
} else {
parsedStyle = MutableStylePropertySet::create(HTMLStandardMode);
CSSParser::parseValue(parsedStyle, CSSPropertyFont, fontString, true);
@@ -100,7 +100,7 @@ MutableStylePropertySet* CanvasFontCache::parseFont(const String& fontString) {
(fontValue->isInitialValue() || fontValue->isInheritedValue()))
return nullptr;
m_fetchedFonts.insert(fontString, parsedStyle);
- m_fontLRUList.add(fontString);
+ m_fontLRUList.insert(fontString);
// Hard limit is applied here, on the fly, while the soft limit is
// applied at the end of the task.
if (m_fetchedFonts.size() > hardMaxFonts()) {
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/html/forms/FormController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698