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

Unified Diff: third_party/WebKit/Source/core/css/FontFace.cpp

Issue 2340273002: Fix FontFaceSet state getting stuck at loading (Closed)
Patch Set: Separate test case Created 4 years, 3 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 | « third_party/WebKit/Source/core/css/FontFace.h ('k') | third_party/WebKit/Source/core/css/FontFaceSet.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/FontFace.cpp
diff --git a/third_party/WebKit/Source/core/css/FontFace.cpp b/third_party/WebKit/Source/core/css/FontFace.cpp
index 98845b6f9edc1cda713bbd341d6e31999efc6f10..644bfc205f9a99b42578175a64c709ea25c1592e 100644
--- a/third_party/WebKit/Source/core/css/FontFace.cpp
+++ b/third_party/WebKit/Source/core/css/FontFace.cpp
@@ -381,6 +381,11 @@ ScriptPromise FontFace::load(ScriptState* scriptState)
void FontFace::loadWithCallback(LoadFontCallback* callback, ExecutionContext* context)
{
loadInternal(context);
+ addCallback(callback);
+}
+
+void FontFace::addCallback(LoadFontCallback* callback)
+{
if (m_status == Loaded)
callback->notifyLoaded(this);
else if (m_status == Error)
« no previous file with comments | « third_party/WebKit/Source/core/css/FontFace.h ('k') | third_party/WebKit/Source/core/css/FontFaceSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698