summaryrefslogtreecommitdiffstats
path: root/toolkit/components/formautofill/shared/FormAutofillSection.sys.mjs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /toolkit/components/formautofill/shared/FormAutofillSection.sys.mjs
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-adbda400be353e676059e335c3c0aaf99e719475.tar.xz
firefox-adbda400be353e676059e335c3c0aaf99e719475.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/formautofill/shared/FormAutofillSection.sys.mjs')
-rw-r--r--toolkit/components/formautofill/shared/FormAutofillSection.sys.mjs24
1 files changed, 14 insertions, 10 deletions
diff --git a/toolkit/components/formautofill/shared/FormAutofillSection.sys.mjs b/toolkit/components/formautofill/shared/FormAutofillSection.sys.mjs
index 1c7696432a..7bda4c167b 100644
--- a/toolkit/components/formautofill/shared/FormAutofillSection.sys.mjs
+++ b/toolkit/components/formautofill/shared/FormAutofillSection.sys.mjs
@@ -7,7 +7,7 @@ import { FormAutofill } from "resource://autofill/FormAutofill.sys.mjs";
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
- AutofillTelemetry: "resource://autofill/AutofillTelemetry.sys.mjs",
+ AutofillTelemetry: "resource://gre/modules/shared/AutofillTelemetry.sys.mjs",
CreditCard: "resource://gre/modules/CreditCard.sys.mjs",
FormAutofillNameUtils:
"resource://gre/modules/shared/FormAutofillNameUtils.sys.mjs",
@@ -79,40 +79,40 @@ export class FormAutofillSection {
* Examine the section is createable for storing the profile. This method
* must be overrided.
*
- * @param {Object} record The record for examining createable
+ * @param {Object} _record The record for examining createable
* @returns {boolean} True for the record is createable, otherwise false
*
*/
- isRecordCreatable(record) {
+ isRecordCreatable(_record) {
throw new TypeError("isRecordCreatable method must be overridden");
}
/**
* Override this method if the profile is needed to apply some transformers.
*
- * @param {object} profile
+ * @param {object} _profile
* A profile should be converted based on the specific requirement.
*/
- applyTransformers(profile) {}
+ applyTransformers(_profile) {}
/**
* Override this method if the profile is needed to be customized for
* previewing values.
*
- * @param {object} profile
+ * @param {object} _profile
* A profile for pre-processing before previewing values.
*/
- preparePreviewProfile(profile) {}
+ preparePreviewProfile(_profile) {}
/**
* Override this method if the profile is needed to be customized for filling
* values.
*
- * @param {object} profile
+ * @param {object} _profile
* A profile for pre-processing before filling values.
* @returns {boolean} Whether the profile should be filled.
*/
- async prepareFillingProfile(profile) {
+ async prepareFillingProfile(_profile) {
return true;
}
@@ -846,6 +846,10 @@ export class FormAutofillAddressSection extends FormAutofillSection {
value =
FormAutofillUtils.getAbbreviatedSubregionName([value, text]) || text;
}
+ } else if (fieldDetail.fieldName == "country") {
+ // This is a temporary fix. Ideally we should have either case-insensitive comparaison of country codes
+ // or handle this elsewhere see Bug 1889234 for more context.
+ value = value.toUpperCase();
}
return value;
}
@@ -884,7 +888,7 @@ export class FormAutofillCreditCardSection extends FormAutofillSection {
}
}
- _handlePageHide(event) {
+ _handlePageHide(_event) {
this.handler.window.removeEventListener(
"pagehide",
this._handlePageHide.bind(this)