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

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

Issue 2390583002: [WIP] WebFonts cache-aware timeout adaption (Closed)
Patch Set: check ERR_CACHE_MISS directly in ResourceError Created 4 years, 2 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: third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp b/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp
index fd77f75d3d8b2a26c4ef4f56e41ff5706d0f2d70..0a2b8ff6db6f113304138d9c8476ecf2a106f106 100644
--- a/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp
@@ -35,6 +35,7 @@
#include "core/fetch/ResourceFetcher.h"
#include "core/loader/MixedContentChecker.h"
#include "platform/CrossOriginAttributeValue.h"
+#include "platform/RuntimeEnabledFeatures.h"
#include "platform/fonts/FontCache.h"
#include "platform/fonts/FontCustomPlatformData.h"
#include "platform/weborigin/SecurityPolicy.h"
@@ -90,6 +91,8 @@ FontResource* CSSFontFaceSrcValue::fetch(Document* document) const {
if (!m_fetched) {
FetchRequest request(ResourceRequest(m_absoluteResource),
FetchInitiatorTypeNames::css);
+ request.setIsCacheAwareLoadingEnabled(
+ RuntimeEnabledFeatures::webFontsCacheAwareTimeoutAdaptationEnabled());
request.setContentSecurityCheck(m_shouldCheckContentSecurityPolicy);
SecurityOrigin* securityOrigin = document->getSecurityOrigin();
setCrossOriginAccessControl(request, securityOrigin);

Powered by Google App Engine
This is Rietveld 408576698