Index: Source/core/loader/FrameFetchContext.cpp |
diff --git a/Source/core/loader/FrameFetchContext.cpp b/Source/core/loader/FrameFetchContext.cpp |
index c0771e70b85666694be354ca9f2b1dec1e7cef9a..36634b265982630f0294a7750b64b30906e32b0e 100644 |
--- a/Source/core/loader/FrameFetchContext.cpp |
+++ b/Source/core/loader/FrameFetchContext.cpp |
@@ -496,21 +496,9 @@ bool FrameFetchContext::canRequest(Resource::Type type, const ResourceRequest& r |
// Last of all, check for mixed content. We do this last so that when |
// folks block mixed content with a CSP policy, they don't get a warning. |
// They'll still get a warning in the console about CSP blocking the load. |
- |
- // If we're loading the main resource of a subframe, ensure that we check |
- // against the parent of the active frame, rather than the frame itself. |
- LocalFrame* effectiveFrame = frame(); |
- if (resourceRequest.frameType() == WebURLRequest::FrameTypeNested) { |
- // FIXME: Deal with RemoteFrames. |
- Frame* parentFrame = effectiveFrame->tree().parent(); |
- ASSERT(parentFrame); |
- if (parentFrame->isLocalFrame()) |
- effectiveFrame = toLocalFrame(parentFrame); |
- } |
- |
MixedContentChecker::ReportingStatus mixedContentReporting = forPreload ? |
MixedContentChecker::SuppressReport : MixedContentChecker::SendReport; |
- return !MixedContentChecker::shouldBlockFetch(effectiveFrame, resourceRequest, url, mixedContentReporting); |
+ return !MixedContentChecker::shouldBlockFetch(MixedContentChecker::effectiveFrameForFrameType(frame(), resourceRequest.frameType()), resourceRequest, url, mixedContentReporting); |
} |
bool FrameFetchContext::isControlledByServiceWorker() const |