tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit b6455e4c30a8ceaaf45137a62ed59f294bf02a6f
parent 21b5e322a3bd2525101c9fd2c333f3e810b1d592
Author: Gijs Kruitbosch <gijskruitbosch@gmail.com>
Date:   Fri, 19 Dec 2025 11:45:09 +0000

Bug 2005730 - make 'card' find payments by restoring search-l10n-ids in settings, r=credential-management-reviewers,mtigley

Differential Revision: https://phabricator.services.mozilla.com/D277019

Diffstat:
Mtoolkit/components/formautofill/FormAutofillPreferences.sys.mjs | 33+++++++++++++++++++++++++--------
1 file changed, 25 insertions(+), 8 deletions(-)

diff --git a/toolkit/components/formautofill/FormAutofillPreferences.sys.mjs b/toolkit/components/formautofill/FormAutofillPreferences.sys.mjs @@ -6,14 +6,6 @@ * Injects the form autofill section into about:preferences. */ -const MANAGE_ADDRESSES_URL = - "chrome://formautofill/content/manageAddresses.xhtml"; -const EDIT_ADDRESS_URL = "chrome://formautofill/content/editAddress.xhtml"; -const MANAGE_CREDITCARDS_URL = - "chrome://formautofill/content/manageCreditCards.xhtml"; -const EDIT_CREDIT_CARD_URL = - "chrome://formautofill/content/editCreditCard.xhtml"; - import { FormAutofill } from "resource://autofill/FormAutofill.sys.mjs"; import { FormAutofillUtils } from "resource://gre/modules/shared/FormAutofillUtils.sys.mjs"; @@ -38,6 +30,21 @@ ChromeUtils.defineLazyGetter( ) ); +const MANAGE_ADDRESSES_URL = + "chrome://formautofill/content/manageAddresses.xhtml"; +const EDIT_ADDRESS_URL = "chrome://formautofill/content/editAddress.xhtml"; +const MANAGE_CREDITCARDS_URL = + "chrome://formautofill/content/manageCreditCards.xhtml"; +const EDIT_CREDIT_CARD_URL = + "chrome://formautofill/content/editCreditCard.xhtml"; + +const { + MANAGE_ADDRESSES_L10N_IDS, + EDIT_ADDRESS_L10N_IDS, + MANAGE_CREDITCARDS_L10N_IDS, + EDIT_CREDITCARD_L10N_IDS, +} = FormAutofillUtils; + const { ENABLED_AUTOFILL_ADDRESSES_PREF, ENABLED_AUTOFILL_CREDITCARDS_PREF } = FormAutofill; @@ -62,6 +69,11 @@ const FORM_AUTOFILL_CONFIG = { id: "savedPaymentsButton", l10nId: "autofill-payment-methods-manage-payments-button", control: "moz-box-button", + controlAttrs: { + "search-l10n-ids": MANAGE_CREDITCARDS_L10N_IDS.concat( + EDIT_CREDITCARD_L10N_IDS + ).join(","), + }, }, ], }, @@ -77,6 +89,11 @@ const FORM_AUTOFILL_CONFIG = { id: "savedAddressesButton", l10nId: "autofill-addresses-manage-addresses-button", control: "moz-box-button", + controlAttrs: { + "search-l10n-ids": MANAGE_ADDRESSES_L10N_IDS.concat( + EDIT_ADDRESS_L10N_IDS + ).join(","), + }, }, ], },