Chromium Code Reviews| Index: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp |
| diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp |
| index 471f98fae3e9992d44a7f91549ee9d60213933c6..3080598fcc67b0367c1d2578aaef0145dbddde55 100644 |
| --- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp |
| +++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp |
| @@ -442,12 +442,16 @@ Resource* ResourceFetcher::requestResource(FetchRequest& request, const Resource |
| } |
| } |
| - bool isStaticData = request.resourceRequest().url().protocolIsData() || substituteData.isValid() || m_archive; |
| + bool isDataUrl = request.resourceRequest().url().protocolIsData(); |
| + bool isStaticData = isDataUrl || substituteData.isValid() || m_archive; |
| Resource* resource(nullptr); |
| if (isStaticData) { |
| resource = resourceForStaticData(request, factory, substituteData); |
| - // Abort the request if the archive doesn't contain the resource. |
| - if (!resource && m_archive) |
| + // Abort the request if the archive doesn't contain the resource, except |
|
Dmitry Titov
2016/09/19 19:54:16
I still feel the resourceForStaticData should succ
dewittj
2016/09/20 22:44:55
The CSS spec says that fonts should not be "downlo
Nate Chapin
2016/09/21 19:30:02
What if resourceForStaticData() checks resourceNee
|
| + // in the case of data URLs which might have resources such as fonts |
| + // that need to be decoded only on demand. These data URLs are allowed |
| + // to be processed using the normal ResourceFetcher machinery. |
| + if (!resource && !isDataUrl && m_archive) |
| return nullptr; |
| } |
| if (!resource) |