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

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: Add invalidator, retry only CORS failure 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
Index: Source/core/fetch/FontResource.h
diff --git a/Source/core/fetch/FontResource.h b/Source/core/fetch/FontResource.h
index 66df929ac409be9d97239251256d3fc3e5e8840a..dd392d16e988ebf3661beb9e962536e1c2561aae 100644
--- a/Source/core/fetch/FontResource.h
+++ b/Source/core/fetch/FontResource.h
@@ -57,6 +57,8 @@ public:
virtual bool stillNeedsLoad() const OVERRIDE { return !m_loadInitiated; }
bool exceedsFontLoadWaitLimit() const { return m_exceedsFontLoadWaitLimit; }
+ void setCORSFailed() { m_corsFailed = true; }
+
bool ensureCustomFontData();
FontPlatformData platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth);
@@ -75,6 +77,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 +97,7 @@ public:
virtual void fontLoaded(FontResource*) { }
virtual void didStartFontLoad(FontResource*) { }
virtual void fontLoadWaitLimitExceeded(FontResource*) { }
+ virtual void corsFailed(FontResource*) { }
};
}

Powered by Google App Engine
This is Rietveld 408576698