Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / fetch / FontResource.h
index 66df929..f70a4c0 100644 (file)
@@ -35,9 +35,9 @@
 
 namespace WebCore {
 
+class Document;
 class ResourceFetcher;
 class FontPlatformData;
-class SVGDocument;
 class SVGFontElement;
 class FontCustomPlatformData;
 
@@ -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,10 +78,11 @@ private:
     OwnPtr<FontCustomPlatformData> m_fontData;
     bool m_loadInitiated;
     bool m_exceedsFontLoadWaitLimit;
+    bool m_corsFailed;
     Timer<FontResource> m_fontLoadWaitLimitTimer;
 
 #if ENABLE(SVG_FONTS)
-    RefPtr<WebCore::SVGDocument> m_externalSVGDocument;
+    RefPtr<WebCore::Document> m_externalSVGDocument;
 #endif
 
     friend class MemoryCache;
@@ -94,6 +98,7 @@ public:
     virtual void fontLoaded(FontResource*) { }
     virtual void didStartFontLoad(FontResource*) { }
     virtual void fontLoadWaitLimitExceeded(FontResource*) { }
+    virtual void corsFailed(FontResource*) { }
 };
 
 }