OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |