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

Side by Side Diff: third_party/WebKit/Source/core/css/FontFaceCache.cpp

Issue 2725063003: Migrate WTF::LinkedHashSet/ListHashSet/HashTable::remove() to ::erase() (Closed)
Patch Set: rebase Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 CSSSegmentedFontFace* segmentedFontFace = familyFontFacesIter->value; 98 CSSSegmentedFontFace* segmentedFontFace = familyFontFacesIter->value;
99 99
100 segmentedFontFace->removeFontFace(fontFace); 100 segmentedFontFace->removeFontFace(fontFace);
101 if (segmentedFontFace->isEmpty()) { 101 if (segmentedFontFace->isEmpty()) {
102 familyFontFaces->remove(familyFontFacesIter); 102 familyFontFaces->remove(familyFontFacesIter);
103 if (familyFontFaces->isEmpty()) 103 if (familyFontFaces->isEmpty())
104 m_fontFaces.remove(fontFacesIter); 104 m_fontFaces.remove(fontFacesIter);
105 } 105 }
106 m_fonts.erase(fontFace->family()); 106 m_fonts.erase(fontFace->family());
107 if (cssConnected) 107 if (cssConnected)
108 m_cssConnectedFontFaces.remove(fontFace); 108 m_cssConnectedFontFaces.erase(fontFace);
109 109
110 incrementVersion(); 110 incrementVersion();
111 } 111 }
112 112
113 void FontFaceCache::clearCSSConnected() { 113 void FontFaceCache::clearCSSConnected() {
114 for (const auto& item : m_styleRuleToFontFace) 114 for (const auto& item : m_styleRuleToFontFace)
115 removeFontFace(item.value.get(), true); 115 removeFontFace(item.value.get(), true);
116 m_styleRuleToFontFace.clear(); 116 m_styleRuleToFontFace.clear();
117 } 117 }
118 118
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 158 }
159 159
160 DEFINE_TRACE(FontFaceCache) { 160 DEFINE_TRACE(FontFaceCache) {
161 visitor->trace(m_fontFaces); 161 visitor->trace(m_fontFaces);
162 visitor->trace(m_fonts); 162 visitor->trace(m_fonts);
163 visitor->trace(m_styleRuleToFontFace); 163 visitor->trace(m_styleRuleToFontFace);
164 visitor->trace(m_cssConnectedFontFaces); 164 visitor->trace(m_cssConnectedFontFaces);
165 } 165 }
166 166
167 } // namespace blink 167 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSSegmentedFontFace.cpp ('k') | third_party/WebKit/Source/core/css/FontFaceSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698