Bug 1441794 - Add deprecation warning to passive OBJECT_SUBREQUEST loads. r?ckerschb
MozReview-Commit-ID: 3j2t5FDZFmp
--- a/dom/base/nsDeprecatedOperationList.h
+++ b/dom/base/nsDeprecatedOperationList.h
@@ -37,8 +37,9 @@ DEPRECATED_OPERATION(PrefixedImageSmooth
DEPRECATED_OPERATION(PrefixedFullscreenAPI)
DEPRECATED_OPERATION(LenientSetter)
DEPRECATED_OPERATION(FileLastModifiedDate)
DEPRECATED_OPERATION(ImageBitmapRenderingContext_TransferImageBitmap)
DEPRECATED_OPERATION(URLCreateObjectURL_MediaStream)
DEPRECATED_OPERATION(XMLBaseAttribute)
DEPRECATED_OPERATION(WindowContentUntrusted)
DEPRECATED_OPERATION(RegisterProtocolHandlerInsecure)
+DEPRECATED_OPERATION(MixedDisplayObjectSubrequest)
--- a/dom/locales/en-US/chrome/dom/dom.properties
+++ b/dom/locales/en-US/chrome/dom/dom.properties
@@ -349,8 +349,9 @@ ModuleSourceMalformed=Module source URI is malformed: “%S”.
ScriptSourceNotAllowed=<script> source URI is not allowed in this document: “%S”.
ModuleSourceNotAllowed=Module source URI is not allowed in this document: “%S”.
# LOCALIZATION NOTE: %1$S is the invalid property value and %2$S is the property name.
InvalidKeyframePropertyValue=Keyframe property value “%1$S” is invalid according to the syntax for “%2$S”.
# LOCALIZATION NOTE: Do not translate "ReadableStream".
ReadableStreamReadingFailed=Failed to read data from the ReadableStream: “%S”.
# LOCALIZATION NOTE: Do not translate "registerProtocolHandler".
RegisterProtocolHandlerInsecureWarning=Use of the registerProtocolHandler for insecure connections will be removed in version 62.
+MixedDisplayObjectSubrequestWarning=Loading insecure content within a plugin embedded in a secure connection is going to be removed.
--- a/dom/security/nsMixedContentBlocker.cpp
+++ b/dom/security/nsMixedContentBlocker.cpp
@@ -902,16 +902,19 @@ nsMixedContentBlocker::ShouldLoad(bool a
cc->SendAccumulateMixedContentHSTS(uri, active,
originAttributes);
}
}
}
// set hasMixedContentObjectSubrequest on this object if necessary
if (aContentType == TYPE_OBJECT_SUBREQUEST) {
+ if (!sBlockMixedObjectSubrequest) {
+ rootDoc->WarnOnceAbout(nsIDocument::eMixedDisplayObjectSubrequest);
+ }
rootDoc->SetHasMixedContentObjectSubrequest(true);
}
// If the content is display content, and the pref says display content should be blocked, block it.
if (sBlockMixedDisplay && classification == eMixedDisplay) {
if (allowMixedContent) {
LogMixedContentMessage(classification, aContentLocation, rootDoc, eUserOverride);
*aDecision = nsIContentPolicy::ACCEPT;