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

Side by Side Diff: Source/platform/fonts/FontCache.cpp

Issue 330543004: Only FontCache should know about system font substitution (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/LocalFontFaceSource.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
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 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 if (shouldRetain == DoNotRetain) 163 if (shouldRetain == DoNotRetain)
164 ASSERT(m_purgePreventCount); 164 ASSERT(m_purgePreventCount);
165 #endif 165 #endif
166 166
167 return gFontDataCache->get(platformData, shouldRetain); 167 return gFontDataCache->get(platformData, shouldRetain);
168 } 168 }
169 169
170 bool FontCache::isPlatformFontAvailable(const FontDescription& fontDescription, const AtomicString& family) 170 bool FontCache::isPlatformFontAvailable(const FontDescription& fontDescription, const AtomicString& family)
171 { 171 {
172 bool checkingAlternateName = true; 172 bool checkingAlternateName = true;
173 return getFontPlatformData(fontDescription, family, checkingAlternateName); 173 return getFontPlatformData(fontDescription, adjustFamilyNameToAvoidUnsupport edFonts(family), checkingAlternateName);
174 } 174 }
175 175
176 SimpleFontData* FontCache::getNonRetainedLastResortFallbackFont(const FontDescri ption& fontDescription) 176 SimpleFontData* FontCache::getNonRetainedLastResortFallbackFont(const FontDescri ption& fontDescription)
177 { 177 {
178 return getLastResortFallbackFont(fontDescription, DoNotRetain).leakRef(); 178 return getLastResortFallbackFont(fontDescription, DoNotRetain).leakRef();
179 } 179 }
180 180
181 void FontCache::releaseFontData(const SimpleFontData* fontData) 181 void FontCache::releaseFontData(const SimpleFontData* fontData)
182 { 182 {
183 ASSERT(gFontDataCache); 183 ASSERT(gFontDataCache);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 clients.append(*it); 295 clients.append(*it);
296 296
297 ASSERT(numClients == clients.size()); 297 ASSERT(numClients == clients.size());
298 for (size_t i = 0; i < numClients; ++i) 298 for (size_t i = 0; i < numClients; ++i)
299 clients[i]->fontCacheInvalidated(); 299 clients[i]->fontCacheInvalidated();
300 300
301 purge(ForcePurge); 301 purge(ForcePurge);
302 } 302 }
303 303
304 } // namespace WebCore 304 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/LocalFontFaceSource.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698