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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 if (genericFamilyName == FontFamilyNames::webkit_monospace) | 121 if (genericFamilyName == FontFamilyNames::webkit_monospace) |
122 return settings.fixed(script); | 122 return settings.fixed(script); |
123 if (genericFamilyName == FontFamilyNames::webkit_pictograph) | 123 if (genericFamilyName == FontFamilyNames::webkit_pictograph) |
124 return settings.pictograph(script); | 124 return settings.pictograph(script); |
125 if (genericFamilyName == FontFamilyNames::webkit_standard) | 125 if (genericFamilyName == FontFamilyNames::webkit_standard) |
126 return settings.standard(script); | 126 return settings.standard(script); |
127 #endif | 127 #endif |
128 return emptyAtom; | 128 return emptyAtom; |
129 } | 129 } |
130 | 130 |
| 131 void CSSFontSelector::reportFirstNonBlankText(bool isCustomFont) |
| 132 { |
| 133 if (isCustomFont) |
| 134 m_document->markFirstCustomFontText(); |
| 135 m_document->markFirstNonBlankText(); |
| 136 } |
| 137 |
131 PassRefPtr<FontData> CSSFontSelector::getFontData(const FontDescription& fontDes
cription, const AtomicString& familyName) | 138 PassRefPtr<FontData> CSSFontSelector::getFontData(const FontDescription& fontDes
cription, const AtomicString& familyName) |
132 { | 139 { |
133 if (CSSSegmentedFontFace* face = m_fontFaceCache.get(fontDescription, family
Name)) | 140 if (CSSSegmentedFontFace* face = m_fontFaceCache.get(fontDescription, family
Name)) |
134 return face->getFontData(fontDescription); | 141 return face->getFontData(fontDescription); |
135 | 142 |
136 // Try to return the correct font based off our settings, in case we were ha
nded the generic font family name. | 143 // Try to return the correct font based off our settings, in case we were ha
nded the generic font family name. |
137 AtomicString settingsFamilyName = familyNameFromSettings(m_genericFontFamily
Settings, fontDescription, familyName); | 144 AtomicString settingsFamilyName = familyNameFromSettings(m_genericFontFamily
Settings, fontDescription, familyName); |
138 if (settingsFamilyName.isEmpty()) | 145 if (settingsFamilyName.isEmpty()) |
139 return nullptr; | 146 return nullptr; |
140 | 147 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 #if ENABLE(OILPAN) | 186 #if ENABLE(OILPAN) |
180 visitor->trace(m_document); | 187 visitor->trace(m_document); |
181 visitor->trace(m_fontFaceCache); | 188 visitor->trace(m_fontFaceCache); |
182 visitor->trace(m_clients); | 189 visitor->trace(m_clients); |
183 visitor->trace(m_fontLoader); | 190 visitor->trace(m_fontLoader); |
184 #endif | 191 #endif |
185 FontSelector::trace(visitor); | 192 FontSelector::trace(visitor); |
186 } | 193 } |
187 | 194 |
188 } | 195 } |
OLD | NEW |