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 * | 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 m_sources.removeFirst(); | 77 m_sources.removeFirst(); |
78 if (!isValid()) | 78 if (!isValid()) |
79 setLoadStatus(FontFace::Error); | 79 setLoadStatus(FontFace::Error); |
80 } | 80 } |
81 } | 81 } |
82 | 82 |
83 if (m_segmentedFontFace) | 83 if (m_segmentedFontFace) |
84 m_segmentedFontFace->fontLoaded(this); | 84 m_segmentedFontFace->fontLoaded(this); |
85 } | 85 } |
86 | 86 |
| 87 void CSSFontFace::fontLoadWaitLimitExceeded(CSSFontFaceSource* source) |
| 88 { |
| 89 if (!isValid() || source != m_sources.first()) |
| 90 return; |
| 91 if (m_segmentedFontFace) |
| 92 m_segmentedFontFace->fontLoadWaitLimitExceeded(this); |
| 93 } |
| 94 |
87 PassRefPtr<SimpleFontData> CSSFontFace::getFontData(const FontDescription& fontD
escription) | 95 PassRefPtr<SimpleFontData> CSSFontFace::getFontData(const FontDescription& fontD
escription) |
88 { | 96 { |
89 if (!isValid()) | 97 if (!isValid()) |
90 return 0; | 98 return 0; |
91 | 99 |
92 while (!m_sources.isEmpty()) { | 100 while (!m_sources.isEmpty()) { |
93 OwnPtr<CSSFontFaceSource>& source = m_sources.first(); | 101 OwnPtr<CSSFontFaceSource>& source = m_sources.first(); |
94 if (RefPtr<SimpleFontData> result = source->getFontData(fontDescription)
) { | 102 if (RefPtr<SimpleFontData> result = source->getFontData(fontDescription)
) { |
95 if (loadStatus() == FontFace::Unloaded && (source->isLoading() || so
urce->isLoaded())) | 103 if (loadStatus() == FontFace::Unloaded && (source->isLoading() || so
urce->isLoaded())) |
96 setLoadStatus(FontFace::Loading); | 104 setLoadStatus(FontFace::Loading); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 index += U16_LENGTH(c); | 197 index += U16_LENGTH(c); |
190 for (unsigned i = 0; i < m_ranges.size(); i++) { | 198 for (unsigned i = 0; i < m_ranges.size(); i++) { |
191 if (m_ranges[i].contains(c)) | 199 if (m_ranges[i].contains(c)) |
192 return true; | 200 return true; |
193 } | 201 } |
194 } | 202 } |
195 return false; | 203 return false; |
196 } | 204 } |
197 | 205 |
198 } | 206 } |
OLD | NEW |