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

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

Issue 230383003: Webfont CORS-enabled fetching with fallback (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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.cpp
diff --git a/Source/core/fetch/FontResource.cpp b/Source/core/fetch/FontResource.cpp
index 0a0138d10236ad804099fbf37f20d5237eec6bc0..4df1d89a788a350318aa69ee6c0f80938d42095b 100644
--- a/Source/core/fetch/FontResource.cpp
+++ b/Source/core/fetch/FontResource.cpp
@@ -184,9 +184,16 @@ void FontResource::allClientsRemoved()
void FontResource::checkNotify()
{
m_fontLoadWaitLimitTimer.stop();
+
ResourceClientWalker<FontResourceClient> w(m_clients);
- while (FontResourceClient* c = w.next())
- c->fontLoaded(this);
+ // FIXME: Remove this CORS fallback once we have enough UMA to make a decision.
+ if (errorOccurred() && m_options.corsEnabled == IsCORSEnabled) {
Kunihiko Sakamoto 2014/04/09 10:24:18 Can we retry only when the error is CORS violation
bashi 2014/04/10 03:40:56 Done.
+ while (FontResourceClient* client = w.next())
+ client->corsFailed(this);
+ } else {
+ while (FontResourceClient* c = w.next())
+ c->fontLoaded(this);
+ }
}
}
« Source/core/css/RemoteFontFaceSource.cpp ('K') | « Source/core/fetch/FontResource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698