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

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

Issue 270813003: Reland r172943 "Make CSSFontFace::willUseFontData() load fonts with unicode-range" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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/CSSFontSelector.h ('k') | Source/core/css/CSSSegmentedFontFace.h » ('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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 return face->getFontData(fontDescription); 207 return face->getFontData(fontDescription);
208 208
209 // Try to return the correct font based off our settings, in case we were ha nded the generic font family name. 209 // Try to return the correct font based off our settings, in case we were ha nded the generic font family name.
210 AtomicString settingsFamilyName = familyNameFromSettings(m_genericFontFamily Settings, fontDescription, familyName); 210 AtomicString settingsFamilyName = familyNameFromSettings(m_genericFontFamily Settings, fontDescription, familyName);
211 if (settingsFamilyName.isEmpty()) 211 if (settingsFamilyName.isEmpty())
212 return nullptr; 212 return nullptr;
213 213
214 return FontCache::fontCache()->getFontData(fontDescription, settingsFamilyNa me); 214 return FontCache::fontCache()->getFontData(fontDescription, settingsFamilyNa me);
215 } 215 }
216 216
217 void CSSFontSelector::willUseFontData(const FontDescription& fontDescription, co nst AtomicString& family) 217 void CSSFontSelector::willUseFontData(const FontDescription& fontDescription, co nst AtomicString& family, UChar32 character)
218 { 218 {
219 CSSSegmentedFontFace* face = m_fontFaceCache.get(fontDescription, family); 219 CSSSegmentedFontFace* face = m_fontFaceCache.get(fontDescription, family);
220 if (face) 220 if (face)
221 face->willUseFontData(fontDescription); 221 face->willUseFontData(fontDescription, character);
222 } 222 }
223 223
224 #if !ENABLE(OILPAN) 224 #if !ENABLE(OILPAN)
225 void CSSFontSelector::clearDocument() 225 void CSSFontSelector::clearDocument()
226 { 226 {
227 m_fontLoader.clearResourceFetcher(); 227 m_fontLoader.clearResourceFetcher();
228 m_document = nullptr; 228 m_document = nullptr;
229 } 229 }
230 #endif 230 #endif
231 231
(...skipping 16 matching lines...) Expand all
248 void CSSFontSelector::trace(Visitor* visitor) 248 void CSSFontSelector::trace(Visitor* visitor)
249 { 249 {
250 visitor->trace(m_document); 250 visitor->trace(m_document);
251 visitor->trace(m_fontFaceCache); 251 visitor->trace(m_fontFaceCache);
252 visitor->trace(m_clients); 252 visitor->trace(m_clients);
253 visitor->trace(m_fontLoader); 253 visitor->trace(m_fontLoader);
254 FontSelector::trace(visitor); 254 FontSelector::trace(visitor);
255 } 255 }
256 256
257 } 257 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSFontSelector.h ('k') | Source/core/css/CSSSegmentedFontFace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698