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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Torch Mobile, Inc. 3 * Copyright (C) 2009 Torch Mobile, Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 void FontResource::allClientsRemoved() 178 void FontResource::allClientsRemoved()
179 { 179 {
180 m_fontData.clear(); 180 m_fontData.clear();
181 Resource::allClientsRemoved(); 181 Resource::allClientsRemoved();
182 } 182 }
183 183
184 void FontResource::checkNotify() 184 void FontResource::checkNotify()
185 { 185 {
186 m_fontLoadWaitLimitTimer.stop(); 186 m_fontLoadWaitLimitTimer.stop();
187
187 ResourceClientWalker<FontResourceClient> w(m_clients); 188 ResourceClientWalker<FontResourceClient> w(m_clients);
188 while (FontResourceClient* c = w.next()) 189 // FIXME: Remove this CORS fallback once we have enough UMA to make a decisi on.
189 c->fontLoaded(this); 190 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.
191 while (FontResourceClient* client = w.next())
192 client->corsFailed(this);
193 } else {
194 while (FontResourceClient* c = w.next())
195 c->fontLoaded(this);
196 }
190 } 197 }
191 198
192 } 199 }
OLDNEW
« 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