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

Side by Side Diff: Source/core/css/CSSFontSelector.cpp

Issue 195893047: Remove FontDescription::isSpecifiedFont. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated bit count. Created 6 years, 9 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 | « no previous file | Source/core/css/resolver/FontBuilder.cpp » ('j') | 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) 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 void CSSFontSelector::fontCacheInvalidated() 150 void CSSFontSelector::fontCacheInvalidated()
151 { 151 {
152 dispatchInvalidationCallbacks(); 152 dispatchInvalidationCallbacks();
153 } 153 }
154 154
155 static AtomicString familyNameFromSettings(const GenericFontFamilySettings& sett ings, const FontDescription& fontDescription, const AtomicString& genericFamilyN ame) 155 static AtomicString familyNameFromSettings(const GenericFontFamilySettings& sett ings, const FontDescription& fontDescription, const AtomicString& genericFamilyN ame)
156 { 156 {
157 UScriptCode script = fontDescription.script(); 157 UScriptCode script = fontDescription.script();
158 158
159 #if OS(ANDROID) 159 #if OS(ANDROID)
160 if (fontDescription.genericFamily() == FontDescription::StandardFamily && !f ontDescription.isSpecifiedFont()) 160 if (fontDescription.genericFamily() == FontDescription::StandardFamily)
161 return FontCache::getGenericFamilyNameForScript(FontFamilyNames::webkit_ standard, script); 161 return FontCache::getGenericFamilyNameForScript(FontFamilyNames::webkit_ standard, script);
162 162
163 if (genericFamilyName.startsWith("-webkit-")) 163 if (genericFamilyName.startsWith("-webkit-"))
164 return FontCache::getGenericFamilyNameForScript(genericFamilyName, scrip t); 164 return FontCache::getGenericFamilyNameForScript(genericFamilyName, scrip t);
165 #else 165 #else
166 if (fontDescription.genericFamily() == FontDescription::StandardFamily && !f ontDescription.isSpecifiedFont()) 166 if (fontDescription.genericFamily() == FontDescription::StandardFamily)
167 return settings.standard(script); 167 return settings.standard(script);
168 if (genericFamilyName == FontFamilyNames::webkit_serif) 168 if (genericFamilyName == FontFamilyNames::webkit_serif)
169 return settings.serif(script); 169 return settings.serif(script);
170 if (genericFamilyName == FontFamilyNames::webkit_sans_serif) 170 if (genericFamilyName == FontFamilyNames::webkit_sans_serif)
171 return settings.sansSerif(script); 171 return settings.sansSerif(script);
172 if (genericFamilyName == FontFamilyNames::webkit_cursive) 172 if (genericFamilyName == FontFamilyNames::webkit_cursive)
173 return settings.cursive(script); 173 return settings.cursive(script);
174 if (genericFamilyName == FontFamilyNames::webkit_fantasy) 174 if (genericFamilyName == FontFamilyNames::webkit_fantasy)
175 return settings.fantasy(script); 175 return settings.fantasy(script);
176 if (genericFamilyName == FontFamilyNames::webkit_monospace) 176 if (genericFamilyName == FontFamilyNames::webkit_monospace)
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 m_fontLoader.loadPendingFonts(); 219 m_fontLoader.loadPendingFonts();
220 } 220 }
221 221
222 void CSSFontSelector::updateGenericFontFamilySettings(Document& document) 222 void CSSFontSelector::updateGenericFontFamilySettings(Document& document)
223 { 223 {
224 ASSERT(document.settings()); 224 ASSERT(document.settings());
225 m_genericFontFamilySettings = document.settings()->genericFontFamilySettings (); 225 m_genericFontFamilySettings = document.settings()->genericFontFamilySettings ();
226 } 226 }
227 227
228 } 228 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/resolver/FontBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698