Bug 1441794 - Add deprecation warning to passive OBJECT_SUBREQUEST loads. r?ckerschb draft
authorJonathan Kingston <jkt@mozilla.com>
Wed, 28 Feb 2018 13:56:35 +0000
changeset 761114 a4e67bf587159c181bbb119ef1c7946108f64d13
parent 760817 4ea447c2e10fe0f797a09bdd13edddc01c1732a9
push id100868
push userbmo:jkt@mozilla.com
push dateWed, 28 Feb 2018 18:08:00 +0000
reviewersckerschb
bugs1441794
milestone60.0a1
Bug 1441794 - Add deprecation warning to passive OBJECT_SUBREQUEST loads. r?ckerschb MozReview-Commit-ID: 3j2t5FDZFmp
dom/base/nsDeprecatedOperationList.h
dom/locales/en-US/chrome/dom/dom.properties
dom/security/nsMixedContentBlocker.cpp
--- 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;