summaryrefslogtreecommitdiffstats
path: root/toolkit/components/formautofill/default
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
commit59203c63bb777a3bacec32fb8830fba33540e809 (patch)
tree58298e711c0ff0575818c30485b44a2f21bf28a0 /toolkit/components/formautofill/default
parentAdding upstream version 126.0.1. (diff)
downloadfirefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz
firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/formautofill/default')
-rw-r--r--toolkit/components/formautofill/default/FormAutofillPrompter.sys.mjs30
1 files changed, 25 insertions, 5 deletions
diff --git a/toolkit/components/formautofill/default/FormAutofillPrompter.sys.mjs b/toolkit/components/formautofill/default/FormAutofillPrompter.sys.mjs
index 05dcf5bace..2a72f302fe 100644
--- a/toolkit/components/formautofill/default/FormAutofillPrompter.sys.mjs
+++ b/toolkit/components/formautofill/default/FormAutofillPrompter.sys.mjs
@@ -19,6 +19,7 @@ const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
CreditCard: "resource://gre/modules/CreditCard.sys.mjs",
formAutofillStorage: "resource://autofill/FormAutofillStorage.sys.mjs",
+ OSKeyStore: "resource://gre/modules/OSKeyStore.sys.mjs",
});
ChromeUtils.defineLazyGetter(lazy, "log", () =>
@@ -475,9 +476,29 @@ export class AddressSaveDoorhanger extends AutofillDoorhanger {
];
break;
case "address":
- data = ["address-level2", "address-level1", "postal-code"].map(
- field => [field, this.oldRecord[field], this.newRecord[field]]
- );
+ data = [
+ [
+ "address-level2",
+ this.oldRecord["address-level2"],
+ this.newRecord["address-level2"],
+ ],
+ [
+ "address-level1",
+ FormAutofillUtils.getAbbreviatedSubregionName(
+ this.oldRecord["address-level1"],
+ this.oldRecord.country
+ ) || this.oldRecord["address-level1"],
+ FormAutofillUtils.getAbbreviatedSubregionName(
+ this.newRecord["address-level1"],
+ this.newRecord.country
+ ) || this.newRecord["address-level1"],
+ ],
+ [
+ "postal-code",
+ this.oldRecord["postal-code"],
+ this.newRecord["postal-code"],
+ ],
+ ];
break;
case "name":
case "country":
@@ -1301,7 +1322,7 @@ export let FormAutofillPrompter = {
return;
}
- if (!(await FormAutofillUtils.ensureLoggedIn()).authenticated) {
+ if (!(await lazy.OSKeyStore.ensureLoggedIn(false)).authenticated) {
lazy.log.warn("User canceled encryption login");
return;
}
@@ -1338,7 +1359,6 @@ export let FormAutofillPrompter = {
);
const { ownerGlobal: win } = browser;
- await win.ensureCustomElements("moz-support-link");
win.MozXULElement.insertFTLIfNeeded(
"toolkit/formautofill/formAutofill.ftl"
);