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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 if (loadStatus() == FontFace::Unloaded) | 104 if (loadStatus() == FontFace::Unloaded) |
105 setLoadStatus(FontFace::Loading); | 105 setLoadStatus(FontFace::Loading); |
106 if (loadStatus() == FontFace::Loading) | 106 if (loadStatus() == FontFace::Loading) |
107 setLoadStatus(FontFace::Error); | 107 setLoadStatus(FontFace::Error); |
108 return nullptr; | 108 return nullptr; |
109 } | 109 } |
110 | 110 |
111 bool CSSFontFace::maybeScheduleFontLoad(const FontDescription& fontDescription,
UChar32 character) | 111 bool CSSFontFace::maybeScheduleFontLoad(const FontDescription& fontDescription,
UChar32 character) |
112 { | 112 { |
113 if (m_ranges.contains(character)) { | 113 if (m_ranges->contains(character)) { |
114 if (loadStatus() == FontFace::Unloaded) | 114 if (loadStatus() == FontFace::Unloaded) |
115 load(fontDescription); | 115 load(fontDescription); |
116 return true; | 116 return true; |
117 } | 117 } |
118 return false; | 118 return false; |
119 } | 119 } |
120 | 120 |
121 bool CSSFontFace::maybeScheduleFontLoad(const FontDescription& fontDescription,
const FontDataRange& range) | 121 bool CSSFontFace::maybeScheduleFontLoad(const FontDescription& fontDescription,
const FontDataForRangeSet& rangeSet) |
122 { | 122 { |
123 if (m_ranges.contains(range) || (range.isEntireRange() && m_ranges.isEntireR
ange())) { | 123 if (m_ranges == rangeSet.ranges()) { |
124 if (loadStatus() == FontFace::Unloaded) { | 124 if (loadStatus() == FontFace::Unloaded) { |
125 load(fontDescription); | 125 load(fontDescription); |
126 } | 126 } |
127 return true; | 127 return true; |
128 } | 128 } |
129 return false; | 129 return false; |
130 } | 130 } |
131 | 131 |
132 void CSSFontFace::load() | 132 void CSSFontFace::load() |
133 { | 133 { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 } | 196 } |
197 | 197 |
198 DEFINE_TRACE(CSSFontFace) | 198 DEFINE_TRACE(CSSFontFace) |
199 { | 199 { |
200 visitor->trace(m_segmentedFontFace); | 200 visitor->trace(m_segmentedFontFace); |
201 visitor->trace(m_sources); | 201 visitor->trace(m_sources); |
202 visitor->trace(m_fontFace); | 202 visitor->trace(m_fontFace); |
203 } | 203 } |
204 | 204 |
205 } // namespace blink | 205 } // namespace blink |
OLD | NEW |