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

Unified Diff: Source/core/fetch/FontResource.h

Issue 230383003: Webfont CORS-enabled fetching with fallback (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase & reverse the enum values Created 6 years, 8 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
« no previous file with comments | « Source/core/css/RemoteFontFaceSource.cpp ('k') | Source/core/fetch/FontResource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/FontResource.h
diff --git a/Source/core/fetch/FontResource.h b/Source/core/fetch/FontResource.h
index 66df929ac409be9d97239251256d3fc3e5e8840a..d15455d06d1220e0629644f9ba791750069a076f 100644
--- a/Source/core/fetch/FontResource.h
+++ b/Source/core/fetch/FontResource.h
@@ -57,6 +57,9 @@ public:
virtual bool stillNeedsLoad() const OVERRIDE { return !m_loadInitiated; }
bool exceedsFontLoadWaitLimit() const { return m_exceedsFontLoadWaitLimit; }
+ void setCORSFailed() { m_corsFailed = true; }
+ bool isCORSFailed() const { return m_corsFailed; }
+
bool ensureCustomFontData();
FontPlatformData platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth);
@@ -75,6 +78,7 @@ private:
OwnPtr<FontCustomPlatformData> m_fontData;
bool m_loadInitiated;
bool m_exceedsFontLoadWaitLimit;
+ bool m_corsFailed;
Timer<FontResource> m_fontLoadWaitLimitTimer;
#if ENABLE(SVG_FONTS)
@@ -94,6 +98,7 @@ public:
virtual void fontLoaded(FontResource*) { }
virtual void didStartFontLoad(FontResource*) { }
virtual void fontLoadWaitLimitExceeded(FontResource*) { }
+ virtual void corsFailed(FontResource*) { }
};
}
« no previous file with comments | « Source/core/css/RemoteFontFaceSource.cpp ('k') | Source/core/fetch/FontResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698