OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/css/RemoteFontFaceSource.h" | 5 #include "core/css/RemoteFontFaceSource.h" |
6 | 6 |
7 #include "core/css/CSSCustomFontData.h" | 7 #include "core/css/CSSCustomFontData.h" |
8 #include "core/css/CSSFontFace.h" | 8 #include "core/css/CSSFontFace.h" |
9 #include "core/css/CSSFontSelector.h" | 9 #include "core/css/CSSFontSelector.h" |
10 #include "core/dom/Document.h" | 10 #include "core/dom/Document.h" |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 211 |
212 if (!m_font->ensureCustomFontData() || m_period == FailurePeriod) | 212 if (!m_font->ensureCustomFontData() || m_period == FailurePeriod) |
213 return nullptr; | 213 return nullptr; |
214 | 214 |
215 m_histograms.recordFallbackTime(m_font.get()); | 215 m_histograms.recordFallbackTime(m_font.get()); |
216 | 216 |
217 return SimpleFontData::create( | 217 return SimpleFontData::create( |
218 m_font->platformDataFromCustomData(fontDescription.effectiveFontSize(), | 218 m_font->platformDataFromCustomData(fontDescription.effectiveFontSize(), |
219 fontDescription.isSyntheticBold(), | 219 fontDescription.isSyntheticBold(), |
220 fontDescription.isSyntheticItalic(), | 220 fontDescription.isSyntheticItalic(), |
221 fontDescription.orientation()), | 221 fontDescription.orientation(), |
| 222 fontDescription.variationSettings()), |
222 CustomFontData::create()); | 223 CustomFontData::create()); |
223 } | 224 } |
224 | 225 |
225 PassRefPtr<SimpleFontData> RemoteFontFaceSource::createLoadingFallbackFontData( | 226 PassRefPtr<SimpleFontData> RemoteFontFaceSource::createLoadingFallbackFontData( |
226 const FontDescription& fontDescription) { | 227 const FontDescription& fontDescription) { |
227 // This temporary font is not retained and should not be returned. | 228 // This temporary font is not retained and should not be returned. |
228 FontCachePurgePreventer fontCachePurgePreventer; | 229 FontCachePurgePreventer fontCachePurgePreventer; |
229 SimpleFontData* temporaryFont = | 230 SimpleFontData* temporaryFont = |
230 FontCache::fontCache()->getNonRetainedLastResortFallbackFont( | 231 FontCache::fontCache()->getNonRetainedLastResortFallbackFont( |
231 fontDescription); | 232 fontDescription); |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 return Miss; | 466 return Miss; |
466 case FromUnknown: | 467 case FromUnknown: |
467 // Fall through. | 468 // Fall through. |
468 default: | 469 default: |
469 NOTREACHED(); | 470 NOTREACHED(); |
470 } | 471 } |
471 return Miss; | 472 return Miss; |
472 } | 473 } |
473 | 474 |
474 } // namespace blink | 475 } // namespace blink |
OLD | NEW |