Index: Source/core/fetch/ResourceFetcher.cpp |
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp |
index 4cf0f1faf9e187c1ebd992a41e018025cb6984fb..1bfc3ac7ad6b196d2d0fe497b52af2a5f070c71a 100644 |
--- a/Source/core/fetch/ResourceFetcher.cpp |
+++ b/Source/core/fetch/ResourceFetcher.cpp |
@@ -299,6 +299,8 @@ ResourcePtr<Resource> ResourceFetcher::fetchSynchronously(FetchRequest& request) |
ResourcePtr<ImageResource> ResourceFetcher::fetchImage(FetchRequest& request) |
{ |
+ if (request.resourceRequest().requestContext() == WebURLRequest::RequestContextUnspecified) |
+ request.mutableResourceRequest().setRequestContext(WebURLRequest::RequestContextImage); |
if (LocalFrame* f = frame()) { |
if (f->document()->pageDismissalEventBeingDispatched() != Document::NoDismissal) { |
KURL requestURL = request.resourceRequest().url(); |
@@ -637,9 +639,12 @@ bool ResourceFetcher::canRequest(Resource::Type type, const ResourceRequest& res |
} |
// FIXME: Should we consider forPreload here? |
- if (!checkInsecureContent(type, url, effectiveFrame, effectiveTreatment)) |
+ if (!checkInsecureContent(type, url, effectiveFrame, effectiveTreatment)) { |
+ ASSERT(MixedContentChecker::shouldBlockFetch(effectiveFrame, resourceRequest, url)); |
return false; |
+ } |
+ ASSERT(!MixedContentChecker::shouldBlockFetch(effectiveFrame, resourceRequest, url)); |
return true; |
} |