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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/FontFallbackIterator.cpp

Issue 2615813003: Migrate WTF::Vector::append() to ::push_back() [part 14 of N] (Closed)
Patch Set: rebase, small fix in FontSettings.h 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/fonts/FontFallbackIterator.h" 5 #include "platform/fonts/FontFallbackIterator.h"
6 6
7 #include "platform/fonts/FontCache.h" 7 #include "platform/fonts/FontCache.h"
8 #include "platform/fonts/FontDescription.h" 8 #include "platform/fonts/FontDescription.h"
9 #include "platform/fonts/FontFallbackList.h" 9 #include "platform/fonts/FontFallbackList.h"
10 #include "platform/fonts/SegmentedFontData.h" 10 #include "platform/fonts/SegmentedFontData.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 m_fallbackStage = FontGroupFonts; 172 m_fallbackStage = FontGroupFonts;
173 m_currentFontDataIndex++; 173 m_currentFontDataIndex++;
174 } 174 }
175 175
176 if (rangeSetContributesForHint(hintList, currentSegmentedFace.get())) { 176 if (rangeSetContributesForHint(hintList, currentSegmentedFace.get())) {
177 const SimpleFontData* fontData = currentSegmentedFace->fontData(); 177 const SimpleFontData* fontData = currentSegmentedFace->fontData();
178 if (const CustomFontData* customFontData = fontData->customFontData()) 178 if (const CustomFontData* customFontData = fontData->customFontData())
179 customFontData->beginLoadIfNeeded(); 179 customFontData->beginLoadIfNeeded();
180 if (!fontData->isLoading()) 180 if (!fontData->isLoading())
181 return uniqueOrNext(currentSegmentedFace, hintList); 181 return uniqueOrNext(currentSegmentedFace, hintList);
182 m_trackedLoadingRangeSets.append(currentSegmentedFace); 182 m_trackedLoadingRangeSets.push_back(currentSegmentedFace);
183 } 183 }
184 184
185 return next(hintList); 185 return next(hintList);
186 } 186 }
187 187
188 PassRefPtr<SimpleFontData> FontFallbackIterator::fallbackPriorityFont( 188 PassRefPtr<SimpleFontData> FontFallbackIterator::fallbackPriorityFont(
189 UChar32 hint) { 189 UChar32 hint) {
190 return FontCache::fontCache()->fallbackFontForCharacter( 190 return FontCache::fontCache()->fallbackFontForCharacter(
191 m_fontDescription, hint, 191 m_fontDescription, hint,
192 m_fontFallbackList->primarySimpleFontData(m_fontDescription), 192 m_fontFallbackList->primarySimpleFontData(m_fontDescription),
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 if (!hint || m_previouslyAskedForHint.contains(hint)) 235 if (!hint || m_previouslyAskedForHint.contains(hint))
236 return nullptr; 236 return nullptr;
237 m_previouslyAskedForHint.add(hint); 237 m_previouslyAskedForHint.add(hint);
238 return fontCache->fallbackFontForCharacter( 238 return fontCache->fallbackFontForCharacter(
239 m_fontDescription, hint, 239 m_fontDescription, hint,
240 m_fontFallbackList->primarySimpleFontData(m_fontDescription)); 240 m_fontFallbackList->primarySimpleFontData(m_fontDescription));
241 } 241 }
242 242
243 } // namespace blink 243 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698