| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 const AtomicString& generic_family_name) { | 92 const AtomicString& generic_family_name) { |
| 93 #if OS(ANDROID) | 93 #if OS(ANDROID) |
| 94 if (font_description.GenericFamily() == FontDescription::kStandardFamily) | 94 if (font_description.GenericFamily() == FontDescription::kStandardFamily) |
| 95 return FontCache::GetGenericFamilyNameForScript( | 95 return FontCache::GetGenericFamilyNameForScript( |
| 96 FontFamilyNames::webkit_standard, font_description); | 96 FontFamilyNames::webkit_standard, font_description); |
| 97 | 97 |
| 98 if (generic_family_name.StartsWith("-webkit-")) | 98 if (generic_family_name.StartsWith("-webkit-")) |
| 99 return FontCache::GetGenericFamilyNameForScript(generic_family_name, | 99 return FontCache::GetGenericFamilyNameForScript(generic_family_name, |
| 100 font_description); | 100 font_description); |
| 101 #else | 101 #else |
| 102 UScriptCode script = font_description.Script(); | 102 UScriptCode script = font_description.GetScript(); |
| 103 if (font_description.GenericFamily() == FontDescription::kStandardFamily) | 103 if (font_description.GenericFamily() == FontDescription::kStandardFamily) |
| 104 return settings.Standard(script); | 104 return settings.Standard(script); |
| 105 if (generic_family_name == FontFamilyNames::webkit_serif) | 105 if (generic_family_name == FontFamilyNames::webkit_serif) |
| 106 return settings.Serif(script); | 106 return settings.Serif(script); |
| 107 if (generic_family_name == FontFamilyNames::webkit_sans_serif) | 107 if (generic_family_name == FontFamilyNames::webkit_sans_serif) |
| 108 return settings.SansSerif(script); | 108 return settings.SansSerif(script); |
| 109 if (generic_family_name == FontFamilyNames::webkit_cursive) | 109 if (generic_family_name == FontFamilyNames::webkit_cursive) |
| 110 return settings.Cursive(script); | 110 return settings.Cursive(script); |
| 111 if (generic_family_name == FontFamilyNames::webkit_fantasy) | 111 if (generic_family_name == FontFamilyNames::webkit_fantasy) |
| 112 return settings.Fantasy(script); | 112 return settings.Fantasy(script); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 } | 174 } |
| 175 | 175 |
| 176 DEFINE_TRACE(CSSFontSelector) { | 176 DEFINE_TRACE(CSSFontSelector) { |
| 177 visitor->Trace(document_); | 177 visitor->Trace(document_); |
| 178 visitor->Trace(font_face_cache_); | 178 visitor->Trace(font_face_cache_); |
| 179 visitor->Trace(clients_); | 179 visitor->Trace(clients_); |
| 180 FontSelector::Trace(visitor); | 180 FontSelector::Trace(visitor); |
| 181 } | 181 } |
| 182 | 182 |
| 183 } // namespace blink | 183 } // namespace blink |
| OLD | NEW |