summaryrefslogtreecommitdiffstats
path: root/netwerk/base/LoadInfo.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 05:21:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 05:21:19 +0000
commit520a92573ce79e3628762e4ce06e284d50c2e548 (patch)
treedd7bece82fdce266f06a6a2a6043264255631ee7 /netwerk/base/LoadInfo.cpp
parentAdding debian version 115.10.0esr-1~deb12u1. (diff)
downloadfirefox-esr-520a92573ce79e3628762e4ce06e284d50c2e548.tar.xz
firefox-esr-520a92573ce79e3628762e4ce06e284d50c2e548.zip
Merging upstream version 115.11.0esr.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'netwerk/base/LoadInfo.cpp')
-rw-r--r--netwerk/base/LoadInfo.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/netwerk/base/LoadInfo.cpp b/netwerk/base/LoadInfo.cpp
index e840a708fd..c06e8d660c 100644
--- a/netwerk/base/LoadInfo.cpp
+++ b/netwerk/base/LoadInfo.cpp
@@ -20,6 +20,7 @@
#include "mozilla/dom/ToJSValue.h"
#include "mozilla/dom/BrowsingContext.h"
#include "mozilla/dom/WindowGlobalParent.h"
+#include "mozilla/dom/nsHTTPSOnlyUtils.h"
#include "mozilla/net/CookieJarSettings.h"
#include "mozilla/NullPrincipal.h"
#include "mozilla/StaticPrefs_network.h"
@@ -216,8 +217,9 @@ LoadInfo::LoadInfo(
mDocumentHasUserInteracted =
aLoadingContext->OwnerDoc()->UserHasInteracted();
- // Inherit HTTPS-Only Mode flags from parent document
- mHttpsOnlyStatus |= aLoadingContext->OwnerDoc()->HttpsOnlyStatus();
+ // Inherit HTTPS-Only Mode flags from parent document.
+ mHttpsOnlyStatus |= nsHTTPSOnlyUtils::GetStatusForSubresourceLoad(
+ aLoadingContext->OwnerDoc()->HttpsOnlyStatus());
// When the element being loaded is a frame, we choose the frame's window
// for the window ID and the frame element's window as the parent
@@ -527,7 +529,9 @@ LoadInfo::LoadInfo(dom::WindowGlobalParent* aParentWGP,
parentBC->UsePrivateBrowsing());
}
- mHttpsOnlyStatus |= aParentWGP->HttpsOnlyStatus();
+ // Inherit HTTPS-Only Mode flags from embedder document.
+ mHttpsOnlyStatus |= nsHTTPSOnlyUtils::GetStatusForSubresourceLoad(
+ aParentWGP->HttpsOnlyStatus());
// For chrome BC, the mPrivateBrowsingId remains 0 even its
// UsePrivateBrowsing() is true, so we only update the mPrivateBrowsingId in