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

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

Issue 230383003: Webfont CORS-enabled fetching with fallback (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add invalidator, retry only CORS failure 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/ResourceFetcher.cpp
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp
index d92da593f3ae0325bb14189c975f42a10a52aa8b..6502aa9a7cf352a135fd5e7ea01f7f9c64ad937b 100644
--- a/Source/core/fetch/ResourceFetcher.cpp
+++ b/Source/core/fetch/ResourceFetcher.cpp
@@ -570,6 +570,12 @@ bool ResourceFetcher::canAccessResource(Resource* resource, SecurityOrigin* sour
String resourceType = Resource::resourceTypeToString(resource->type(), resource->options().initiatorInfo);
frame()->document()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, resourceType + " from origin '" + SecurityOrigin::create(url)->toString() + "' has been blocked from loading by Cross-Origin Resource Sharing policy: " + errorDescription);
}
+
+ // FIXME: Remove later, http://crbug.com/286681
+ if (resource->type() == Resource::Font) {
+ FontResource* fontResource = toFontResource(resource);
+ fontResource->setCORSFailed();
+ }
return false;
}
return true;
« Source/core/css/CSSFontFaceSrcValue.cpp ('K') | « Source/core/fetch/FontResource.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698