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

Unified Diff: Source/core/loader/MixedContentChecker.cpp

Issue 657353002: Mixed Content: Re-allow non-webby URLs in IFrames. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Created 6 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: Source/core/loader/MixedContentChecker.cpp
diff --git a/Source/core/loader/MixedContentChecker.cpp b/Source/core/loader/MixedContentChecker.cpp
index 62bbf611caafdbd91447449200f2bac0563471ad..ea0c172a059dc2be2d59240bafc1023be6195208 100644
--- a/Source/core/loader/MixedContentChecker.cpp
+++ b/Source/core/loader/MixedContentChecker.cpp
@@ -249,6 +249,15 @@ bool MixedContentChecker::shouldBlockFetch(LocalFrame* frame, const ResourceRequ
if (contextType == ContextTypeBlockableUnlessLax)
contextType = RuntimeEnabledFeatures::laxMixedContentCheckingEnabled() ? ContextTypeOptionallyBlockable : ContextTypeBlockable;
+ // If we're loading the main resource of a subframe, we need to take a close look at the loaded URL.
+ // If we're dealing with a CORS-enabled scheme, then block mixed frames as active content. Otherwise,
+ // treat frames as passive content.
+ //
+ // FIXME: Remove this temporary hack once we have a reasonable API for launching external applications
+ // via URLs. http://crbug.com/318788 and https://crbug.com/393481
+ if (resourceRequest.frameType() == WebURLRequest::FrameTypeNested && !SchemeRegistry::shouldTreatURLSchemeAsCORSEnabled(url.protocol()))
+ contextType = ContextTypeOptionallyBlockable;
+
switch (contextType) {
case ContextTypeOptionallyBlockable:
allowed = client->allowDisplayingInsecureContent(settings && settings->allowDisplayOfInsecureContent(), securityOrigin, url);

Powered by Google App Engine
This is Rietveld 408576698