Backed out 8 changesets (bug 1878401, bug 1879041) for causing build bustages on widget/nsBaseFilePicker.cpp CLOSED TREE

Backed out changeset 2e2b8df3bdd6 (bug 1879041)
Backed out changeset 6d6952f9df2c (bug 1878401)
Backed out changeset 30b5bb590d3e (bug 1878401)
Backed out changeset 9a4b830334b9 (bug 1878401)
Backed out changeset 3c3d67f1fcb7 (bug 1878401)
Backed out changeset c83ba4026822 (bug 1878401)
Backed out changeset 6bcb670ce475 (bug 1878401)
Backed out changeset f263b196df96 (bug 1878401)
This commit is contained in:
Sandor Molnar
2024-02-28 17:56:48 +02:00
parent 0b69b3a243
commit c853f2f3e9
133 changed files with 255 additions and 311 deletions

View File

@@ -779,8 +779,8 @@ nsresult HTMLInputElement::InitFilePicker(FilePickerType aType) {
// Get parent nsPIDOMWindow object.
nsCOMPtr<Document> doc = OwnerDoc();
RefPtr<BrowsingContext> bc = doc->GetBrowsingContext();
if (!bc) {
nsCOMPtr<nsPIDOMWindowOuter> win = doc->GetWindow();
if (!win) {
return NS_ERROR_FAILURE;
}
@@ -793,14 +793,15 @@ nsresult HTMLInputElement::InitFilePicker(FilePickerType aType) {
nsAutoString okButtonLabel;
if (aType == FILE_PICKER_DIRECTORY) {
nsContentUtils::GetMaybeLocalizedString(nsContentUtils::eFORMS_PROPERTIES,
"DirectoryUpload", doc, title);
"DirectoryUpload", OwnerDoc(),
title);
nsContentUtils::GetMaybeLocalizedString(nsContentUtils::eFORMS_PROPERTIES,
"DirectoryPickerOkButtonLabel", doc,
okButtonLabel);
"DirectoryPickerOkButtonLabel",
OwnerDoc(), okButtonLabel);
} else {
nsContentUtils::GetMaybeLocalizedString(nsContentUtils::eFORMS_PROPERTIES,
"FileUpload", doc, title);
"FileUpload", OwnerDoc(), title);
}
nsCOMPtr<nsIFilePicker> filePicker =
@@ -817,7 +818,8 @@ nsresult HTMLInputElement::InitFilePicker(FilePickerType aType) {
mode = nsIFilePicker::modeOpen;
}
nsresult rv = filePicker->Init(bc, title, mode);
nsresult rv =
filePicker->Init(win, title, mode, OwnerDoc()->GetBrowsingContext());
NS_ENSURE_SUCCESS(rv, rv);
if (!okButtonLabel.IsEmpty()) {