Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp

Issue 2581083003: Initial OpenType Font Variations Support (Closed)
Patch Set: Fix hash collision tests, adjust test expectations Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698