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

Unified Diff: third_party/WebKit/Source/core/loader/resource/FontResource.cpp

Issue 2717123003: RemoteFontFaceSource should keep FontCustomPlatformData over FontResource revalidation (Closed)
Patch Set: test description Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/loader/resource/FontResource.cpp
diff --git a/third_party/WebKit/Source/core/loader/resource/FontResource.cpp b/third_party/WebKit/Source/core/loader/resource/FontResource.cpp
index 64018324443f9cc114c8dc730cce18e10ffbae53..1488e55eb3b6ecf26e3174930f1c1c07056c3abc 100644
--- a/third_party/WebKit/Source/core/loader/resource/FontResource.cpp
+++ b/third_party/WebKit/Source/core/loader/resource/FontResource.cpp
@@ -131,7 +131,7 @@ void FontResource::startLoadLimitTimers() {
BLINK_FROM_HERE);
}
-bool FontResource::ensureCustomFontData() {
+PassRefPtr<FontCustomPlatformData> FontResource::getCustomFontData() {
if (!m_fontData && !errorOccurred() && !isLoading()) {
if (data())
m_fontData = FontCustomPlatformData::create(data(), m_otsParsingMessage);
@@ -143,18 +143,7 @@ bool FontResource::ensureCustomFontData() {
recordPackageFormatHistogram(PackageFormatUnknown);
}
}
- return m_fontData.get();
-}
-
-FontPlatformData FontResource::platformDataFromCustomData(
- float size,
- bool bold,
- bool italic,
- FontOrientation orientation,
- FontVariationSettings* fontVariationSettings) {
- DCHECK(m_fontData);
- return m_fontData->fontPlatformData(size, bold, italic, orientation,
- fontVariationSettings);
+ return m_fontData;
}
void FontResource::willReloadAfterDiskCacheMiss() {
@@ -210,7 +199,7 @@ void FontResource::notifyClientsLongLimitExceeded() {
}
void FontResource::allClientsAndObserversRemoved() {
- m_fontData.reset();
+ m_fontData.clear();
Resource::allClientsAndObserversRemoved();
}

Powered by Google App Engine
This is Rietveld 408576698