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

Unified Diff: Source/core/css/FontFace.h

Issue 196383035: Fix promise resolution of FontFaceSet#load() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: naming Created 6 years, 9 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/CSSSegmentedFontFace.cpp ('k') | Source/core/css/FontFace.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/FontFace.h
diff --git a/Source/core/css/FontFace.h b/Source/core/css/FontFace.h
index 06c0d85be0b85112cf804a842eaef149cd8000cd..94a4aade630dc66a87ca3d53f18df9247b525b83 100644
--- a/Source/core/css/FontFace.h
+++ b/Source/core/css/FontFace.h
@@ -93,6 +93,14 @@ public:
bool hadBlankText() const;
+ class LoadFontCallback : public RefCounted<LoadFontCallback> {
+ public:
+ virtual ~LoadFontCallback() { }
+ virtual void notifyLoaded(FontFace*) = 0;
+ virtual void notifyError(FontFace*) = 0;
+ };
+ void loadWithCallback(PassRefPtr<LoadFontCallback>, ExecutionContext*);
+
private:
FontFace();
@@ -103,6 +111,7 @@ private:
bool setPropertyValue(PassRefPtrWillBeRawPtr<CSSValue>, CSSPropertyID);
bool setFamilyValue(CSSValueList*);
void resolveReadyPromises();
+ void loadInternal(ExecutionContext*);
AtomicString m_family;
RefPtrWillBeMember<CSSValue> m_src;
@@ -117,6 +126,7 @@ private:
Vector<OwnPtr<FontFaceReadyPromiseResolver> > m_readyResolvers;
OwnPtr<CSSFontFace> m_cssFontFace;
+ Vector<RefPtr<LoadFontCallback> > m_callbacks;
};
typedef Vector<RefPtr<FontFace> > FontFaceArray;
« no previous file with comments | « Source/core/css/CSSSegmentedFontFace.cpp ('k') | Source/core/css/FontFace.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698