| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 FontDescription requestedFontDescription(fontDescription); | 143 FontDescription requestedFontDescription(fontDescription); |
| 144 requestedFontDescription.setTraits(m_traits); | 144 requestedFontDescription.setTraits(m_traits); |
| 145 requestedFontDescription.setSyntheticBold(m_traits.weight() < FontWeight600
&& desiredTraits.weight() >= FontWeight600); | 145 requestedFontDescription.setSyntheticBold(m_traits.weight() < FontWeight600
&& desiredTraits.weight() >= FontWeight600); |
| 146 requestedFontDescription.setSyntheticItalic(m_traits.style() == FontStyleNor
mal && desiredTraits.style() == FontStyleItalic); | 146 requestedFontDescription.setSyntheticItalic(m_traits.style() == FontStyleNor
mal && desiredTraits.style() == FontStyleItalic); |
| 147 | 147 |
| 148 for (FontFaceList::reverse_iterator it = m_fontFaces.rbegin(); it != m_fontF
aces.rend(); ++it) { | 148 for (FontFaceList::reverse_iterator it = m_fontFaces.rbegin(); it != m_fontF
aces.rend(); ++it) { |
| 149 if (!(*it)->cssFontFace()->isValid()) | 149 if (!(*it)->cssFontFace()->isValid()) |
| 150 continue; | 150 continue; |
| 151 if (RefPtr<SimpleFontData> faceFontData = (*it)->cssFontFace()->getFontD
ata(requestedFontDescription)) { | 151 if (RefPtr<SimpleFontData> faceFontData = (*it)->cssFontFace()->getFontD
ata(requestedFontDescription)) { |
| 152 ASSERT(!faceFontData->isSegmented()); | 152 ASSERT(!faceFontData->isSegmented()); |
| 153 #if ENABLE(SVG_FONTS) | |
| 154 // For SVG Fonts that specify that they only support the "normal" va
riant, we will assume they are incapable | |
| 155 // of small-caps synthesis and just ignore the font face. | |
| 156 if (faceFontData->isSVGFont() && desiredTraits.variant() == FontVari
antSmallCaps && m_traits.variant() == FontVariantNormal) | |
| 157 continue; | |
| 158 #endif | |
| 159 appendFontData(fontData.get(), faceFontData.release(), (*it)->cssFon
tFace()->ranges()); | 153 appendFontData(fontData.get(), faceFontData.release(), (*it)->cssFon
tFace()->ranges()); |
| 160 } | 154 } |
| 161 } | 155 } |
| 162 if (fontData->numRanges()) | 156 if (fontData->numRanges()) |
| 163 return fontData; // No release, we have a reference to an object in the
cache which should retain the ref count it has. | 157 return fontData; // No release, we have a reference to an object in the
cache which should retain the ref count it has. |
| 164 | 158 |
| 165 return nullptr; | 159 return nullptr; |
| 166 } | 160 } |
| 167 | 161 |
| 168 bool CSSSegmentedFontFace::isLoading() const | 162 bool CSSSegmentedFontFace::isLoading() const |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 206 |
| 213 void CSSSegmentedFontFace::trace(Visitor* visitor) | 207 void CSSSegmentedFontFace::trace(Visitor* visitor) |
| 214 { | 208 { |
| 215 #if ENABLE(OILPAN) | 209 #if ENABLE(OILPAN) |
| 216 visitor->trace(m_fontSelector); | 210 visitor->trace(m_fontSelector); |
| 217 visitor->trace(m_fontFaces); | 211 visitor->trace(m_fontFaces); |
| 218 #endif | 212 #endif |
| 219 } | 213 } |
| 220 | 214 |
| 221 } | 215 } |
| OLD | NEW |