diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /toolkit/components/formautofill/default | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 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.mjs | 30 |
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" ); |