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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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, const String& text) |
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, text); |
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 Loading... |
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 } |
OLD | NEW |