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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.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/modules/canvas2d/CanvasRenderingContext2D.cpp
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
index b0e83170c6d953edb1f86a84d0eb6447724e94d6..c224d54a4d3d7b78c7f04298d663f76c70832e5d 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
@@ -462,7 +462,7 @@ void CanvasRenderingContext2D::setFont(const String& newFont) {
if (i != m_fontsResolvedUsingCurrentStyle.end()) {
DCHECK(m_fontLRUList.contains(newFont));
m_fontLRUList.remove(newFont);
- m_fontLRUList.add(newFont);
+ m_fontLRUList.insert(newFont);
modifiableState().setFont(
i->value, canvas()->document().styleEngine().fontSelector());
} else {
@@ -483,7 +483,7 @@ void CanvasRenderingContext2D::setFont(const String& newFont) {
*parsedStyle);
m_fontsResolvedUsingCurrentStyle.insert(newFont, fontStyle->font());
DCHECK(!m_fontLRUList.contains(newFont));
- m_fontLRUList.add(newFont);
+ m_fontLRUList.insert(newFont);
pruneLocalFontCache(canvasFontCache->hardMaxFonts()); // hard limit
m_shouldPruneLocalFontCache = true; // apply soft limit
modifiableState().setFont(
« no previous file with comments | « third_party/WebKit/Source/core/timing/PerformanceBase.cpp ('k') | third_party/WebKit/Source/modules/canvas2d/HitRegion.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698