| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 return face->getFontData(fontDescription); | 126 return face->getFontData(fontDescription); |
| 127 | 127 |
| 128 // Try to return the correct font based off our settings, in case we were ha
nded the generic font family name. | 128 // Try to return the correct font based off our settings, in case we were ha
nded the generic font family name. |
| 129 AtomicString settingsFamilyName = familyNameFromSettings(m_genericFontFamily
Settings, fontDescription, familyName); | 129 AtomicString settingsFamilyName = familyNameFromSettings(m_genericFontFamily
Settings, fontDescription, familyName); |
| 130 if (settingsFamilyName.isEmpty()) | 130 if (settingsFamilyName.isEmpty()) |
| 131 return nullptr; | 131 return nullptr; |
| 132 | 132 |
| 133 return FontCache::fontCache()->getFontData(fontDescription, settingsFamilyNa
me); | 133 return FontCache::fontCache()->getFontData(fontDescription, settingsFamilyNa
me); |
| 134 } | 134 } |
| 135 | 135 |
| 136 void CSSFontSelector::willUseFontData(const FontDescription& fontDescription, co
nst AtomicString& family, UChar32 character) | 136 void CSSFontSelector::willUseFontData(const FontDescription& fontDescription, co
nst AtomicString& family, const String& text) |
| 137 { | 137 { |
| 138 CSSSegmentedFontFace* face = m_fontFaceCache.get(fontDescription, family); | 138 CSSSegmentedFontFace* face = m_fontFaceCache.get(fontDescription, family); |
| 139 if (face) | 139 if (face) |
| 140 face->willUseFontData(fontDescription, character); | 140 face->willUseFontData(fontDescription, text); |
| 141 } | 141 } |
| 142 | 142 |
| 143 void CSSFontSelector::willUseRange(const FontDescription& fontDescription, const
AtomicString& family, const FontDataForRangeSet& rangeSet) | 143 void CSSFontSelector::willUseRange(const FontDescription& fontDescription, const
AtomicString& family, const FontDataForRangeSet& rangeSet) |
| 144 { | 144 { |
| 145 CSSSegmentedFontFace* face = m_fontFaceCache.get(fontDescription, family); | 145 CSSSegmentedFontFace* face = m_fontFaceCache.get(fontDescription, family); |
| 146 if (face) | 146 if (face) |
| 147 face->willUseRange(fontDescription, rangeSet); | 147 face->willUseRange(fontDescription, rangeSet); |
| 148 } | 148 } |
| 149 | 149 |
| 150 bool CSSFontSelector::isPlatformFontAvailable(const FontDescription& fontDescrip
tion, const AtomicString& passedFamily) | 150 bool CSSFontSelector::isPlatformFontAvailable(const FontDescription& fontDescrip
tion, const AtomicString& passedFamily) |
| (...skipping 14 matching lines...) Expand all Loading... |
| 165 | 165 |
| 166 DEFINE_TRACE(CSSFontSelector) | 166 DEFINE_TRACE(CSSFontSelector) |
| 167 { | 167 { |
| 168 visitor->trace(m_document); | 168 visitor->trace(m_document); |
| 169 visitor->trace(m_fontFaceCache); | 169 visitor->trace(m_fontFaceCache); |
| 170 visitor->trace(m_clients); | 170 visitor->trace(m_clients); |
| 171 FontSelector::trace(visitor); | 171 FontSelector::trace(visitor); |
| 172 } | 172 } |
| 173 | 173 |
| 174 } // namespace blink | 174 } // namespace blink |
| OLD | NEW |