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

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

Issue 248473005: Make CSSFontFace::willUseFontData() load fonts with unicode-range (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 return face->getFontData(fontDescription); 193 return face->getFontData(fontDescription);
194 194
195 // Try to return the correct font based off our settings, in case we were ha nded the generic font family name. 195 // Try to return the correct font based off our settings, in case we were ha nded the generic font family name.
196 AtomicString settingsFamilyName = familyNameFromSettings(m_genericFontFamily Settings, fontDescription, familyName); 196 AtomicString settingsFamilyName = familyNameFromSettings(m_genericFontFamily Settings, fontDescription, familyName);
197 if (settingsFamilyName.isEmpty()) 197 if (settingsFamilyName.isEmpty())
198 return nullptr; 198 return nullptr;
199 199
200 return FontCache::fontCache()->getFontData(fontDescription, settingsFamilyNa me); 200 return FontCache::fontCache()->getFontData(fontDescription, settingsFamilyNa me);
201 } 201 }
202 202
203 void CSSFontSelector::willUseFontData(const FontDescription& fontDescription, co nst AtomicString& family) 203 void CSSFontSelector::willUseFontData(const FontDescription& fontDescription, co nst AtomicString& family, UChar32 character)
204 { 204 {
205 CSSSegmentedFontFace* face = m_fontFaceCache.get(fontDescription, family); 205 CSSSegmentedFontFace* face = m_fontFaceCache.get(fontDescription, family);
206 if (face) 206 if (face)
207 face->willUseFontData(fontDescription); 207 face->willUseFontData(fontDescription, character);
208 } 208 }
209 209
210 void CSSFontSelector::clearDocument() 210 void CSSFontSelector::clearDocument()
211 { 211 {
212 m_fontLoader.clearResourceFetcher(); 212 m_fontLoader.clearResourceFetcher();
213 m_document = 0; 213 m_document = 0;
214 } 214 }
215 215
216 void CSSFontSelector::beginLoadingFontSoon(FontResource* font) 216 void CSSFontSelector::beginLoadingFontSoon(FontResource* font)
217 { 217 {
(...skipping 12 matching lines...) Expand all
230 } 230 }
231 231
232 void CSSFontSelector::trace(Visitor* visitor) 232 void CSSFontSelector::trace(Visitor* visitor)
233 { 233 {
234 visitor->trace(m_fontFaceCache); 234 visitor->trace(m_fontFaceCache);
235 visitor->trace(m_clients); 235 visitor->trace(m_clients);
236 visitor->trace(m_fontLoader); 236 visitor->trace(m_fontLoader);
237 } 237 }
238 238
239 } 239 }
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