diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:50 +0000 |
commit | def92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch) | |
tree | 2ef34b9ad8bb9a9220e05d60352558b15f513894 /netwerk/base/LoadInfo.cpp | |
parent | Adding debian version 125.0.3-1. (diff) | |
download | firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'netwerk/base/LoadInfo.cpp')
-rw-r--r-- | netwerk/base/LoadInfo.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/netwerk/base/LoadInfo.cpp b/netwerk/base/LoadInfo.cpp index eb90324c37..6be031113f 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 @@ -528,7 +530,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 |