diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /widget/windows/nsFilePicker.cpp | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'widget/windows/nsFilePicker.cpp')
-rw-r--r-- | widget/windows/nsFilePicker.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/widget/windows/nsFilePicker.cpp b/widget/windows/nsFilePicker.cpp index 310c54bb40..fb4c6e80b5 100644 --- a/widget/windows/nsFilePicker.cpp +++ b/widget/windows/nsFilePicker.cpp @@ -19,6 +19,7 @@ #include "mozilla/BackgroundHangMonitor.h" #include "mozilla/Components.h" #include "mozilla/dom/BrowsingContext.h" +#include "mozilla/dom/CanonicalBrowsingContext.h" #include "mozilla/dom/Directory.h" #include "mozilla/Logging.h" #include "mozilla/ipc/UtilityProcessManager.h" @@ -94,19 +95,14 @@ nsFilePicker::nsFilePicker() : mSelectedType(1) {} NS_IMPL_ISUPPORTS(nsFilePicker, nsIFilePicker) NS_IMETHODIMP nsFilePicker::Init( - mozIDOMWindowProxy* aParent, const nsAString& aTitle, - nsIFilePicker::Mode aMode, - mozilla::dom::BrowsingContext* aBrowsingContext) { + mozilla::dom::BrowsingContext* aBrowsingContext, const nsAString& aTitle, + nsIFilePicker::Mode aMode) { // Don't attempt to open a real file-picker in headless mode. if (gfxPlatform::IsHeadless()) { return nsresult::NS_ERROR_NOT_AVAILABLE; } - nsCOMPtr<nsPIDOMWindowOuter> window = do_QueryInterface(aParent); - nsIDocShell* docShell = window ? window->GetDocShell() : nullptr; - mLoadContext = do_QueryInterface(docShell); - - return nsBaseFilePicker::Init(aParent, aTitle, aMode, aBrowsingContext); + return nsBaseFilePicker::Init(aBrowsingContext, aTitle, aMode); } namespace mozilla::detail { @@ -1053,7 +1049,7 @@ void nsFilePicker::RememberLastUsedDirectory() { } bool nsFilePicker::IsPrivacyModeEnabled() { - return mLoadContext && mLoadContext->UsePrivateBrowsing(); + return mBrowsingContext && mBrowsingContext->UsePrivateBrowsing(); } bool nsFilePicker::IsDefaultPathLink() { |