| OLD | NEW |
| 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 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 3 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 dispatchInvalidationCallbacks(); | 90 dispatchInvalidationCallbacks(); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void CSSFontSelector::fontCacheInvalidated() | 93 void CSSFontSelector::fontCacheInvalidated() |
| 94 { | 94 { |
| 95 dispatchInvalidationCallbacks(); | 95 dispatchInvalidationCallbacks(); |
| 96 } | 96 } |
| 97 | 97 |
| 98 static AtomicString familyNameFromSettings(const GenericFontFamilySettings& sett
ings, const FontDescription& fontDescription, const AtomicString& genericFamilyN
ame) | 98 static AtomicString familyNameFromSettings(const GenericFontFamilySettings& sett
ings, const FontDescription& fontDescription, const AtomicString& genericFamilyN
ame) |
| 99 { | 99 { |
| 100 #if OS(ANDROID) |
| 101 if (fontDescription.genericFamily() == FontDescription::StandardFamily) |
| 102 return FontCache::getGenericFamilyNameForScript(FontFamilyNames::webkit_
standard, fontDescription); |
| 103 |
| 104 if (genericFamilyName.startsWith("-webkit-")) |
| 105 return FontCache::getGenericFamilyNameForScript(genericFamilyName, fontD
escription); |
| 106 #else |
| 100 UScriptCode script = fontDescription.script(); | 107 UScriptCode script = fontDescription.script(); |
| 101 | 108 |
| 102 #if OS(ANDROID) | |
| 103 if (fontDescription.genericFamily() == FontDescription::StandardFamily) | |
| 104 return FontCache::getGenericFamilyNameForScript(FontFamilyNames::webkit_
standard, script); | |
| 105 | |
| 106 if (genericFamilyName.startsWith("-webkit-")) | |
| 107 return FontCache::getGenericFamilyNameForScript(genericFamilyName, scrip
t); | |
| 108 #else | |
| 109 if (fontDescription.genericFamily() == FontDescription::StandardFamily) | 109 if (fontDescription.genericFamily() == FontDescription::StandardFamily) |
| 110 return settings.standard(script); | 110 return settings.standard(script); |
| 111 if (genericFamilyName == FontFamilyNames::webkit_serif) | 111 if (genericFamilyName == FontFamilyNames::webkit_serif) |
| 112 return settings.serif(script); | 112 return settings.serif(script); |
| 113 if (genericFamilyName == FontFamilyNames::webkit_sans_serif) | 113 if (genericFamilyName == FontFamilyNames::webkit_sans_serif) |
| 114 return settings.sansSerif(script); | 114 return settings.sansSerif(script); |
| 115 if (genericFamilyName == FontFamilyNames::webkit_cursive) | 115 if (genericFamilyName == FontFamilyNames::webkit_cursive) |
| 116 return settings.cursive(script); | 116 return settings.cursive(script); |
| 117 if (genericFamilyName == FontFamilyNames::webkit_fantasy) | 117 if (genericFamilyName == FontFamilyNames::webkit_fantasy) |
| 118 return settings.fantasy(script); | 118 return settings.fantasy(script); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 #if ENABLE(OILPAN) | 177 #if ENABLE(OILPAN) |
| 178 visitor->trace(m_document); | 178 visitor->trace(m_document); |
| 179 visitor->trace(m_fontFaceCache); | 179 visitor->trace(m_fontFaceCache); |
| 180 visitor->trace(m_clients); | 180 visitor->trace(m_clients); |
| 181 visitor->trace(m_fontLoader); | 181 visitor->trace(m_fontLoader); |
| 182 #endif | 182 #endif |
| 183 FontSelector::trace(visitor); | 183 FontSelector::trace(visitor); |
| 184 } | 184 } |
| 185 | 185 |
| 186 } | 186 } |
| OLD | NEW |