Migrating the strings used by the edit dialogs also allows/requires for their migration elsewhere.
Some streamlining is applied to how autofillEditForms.js gets access to e.g. FormFillUtils methods, so that they are no longer routed via the XHTML files' script tags. The prior independence of this file from internal dependencies appears to have been in place to support its use as a part of the Payments API's UI, but that was dropped in bug 1721229.
The Fluent migration script included in this patch also covers changes from the immediately preceding patch.
The intl documentation change is a typo correction that was noticed while working on this patch.
Differential Revision: https://phabricator.services.mozilla.com/D155705
A new FTL file for the extension is added under `browser/preferences/` rather than `browser/extensions/formautofill/`, as the former is a more common location for FTL localizations, and the extension already relies on an FTL file hosted outside its own directory, `toolkit/payments/payments.ftl`.
The dialogs are not fully migrated in this patch, as some of the strings are shared with the edit dialogs and are migrated separately.
A Fluent migration for the localization changes applied here is included in the next patch after this one.
Differential Revision: https://phabricator.services.mozilla.com/D155478
Migrating the strings used by the edit dialogs also allows/requires for their migration elsewhere.
Some streamlining is applied to how autofillEditForms.js gets access to e.g. FormFillUtils methods, so that they are no longer routed via the XHTML files' script tags. The prior independence of this file from internal dependencies appears to have been in place to support its use as a part of the Payments API's UI, but that was dropped in bug 1721229.
The Fluent migration script included in this patch also covers changes from the immediately preceding patch.
The intl documentation change is a typo correction that was noticed while working on this patch.
Depends on D155478
Differential Revision: https://phabricator.services.mozilla.com/D155705
A new FTL file for the extension is added under `browser/preferences/` rather than `browser/extensions/formautofill/`, as the former is a more common location for FTL localizations, and the extension already relies on an FTL file hosted outside its own directory, `toolkit/payments/payments.ftl`.
The dialogs are not fully migrated in this patch, as some of the strings are shared with the edit dialogs and are migrated separately.
A Fluent migration for the localization changes applied here is included in the next patch after this one.
Differential Revision: https://phabricator.services.mozilla.com/D155478
This rewrites the lazy getters, so that the lazy getter is defined at the call point, which makes it
easier for linters to understand what is being defined.
In some cases, the log is not being used, so the definition code is removed.
Differential Revision: https://phabricator.services.mozilla.com/D149716
mutation.target is HTMLDocument, which doesn't have closest function.
This patch uses mutation.target.documentElement instead.
Differential Revision: https://phabricator.services.mozilla.com/D147294
mutation.target is HTMLDocument, which doesn't have closest function.
This patch uses mutation.target.documentElement instead.
Differential Revision: https://phabricator.services.mozilla.com/D147294
Add logic to FormAutofillPrompter so that the specific credit card logo can be stored and loaded when needed.
Update the styling so that each credit card logo will fit appropriately and not stretch.
Add a default size for the generic credit card logo so that it will appear given the updated styling.
Move the majority CreditCardResult.getImageAt into a helper function in CreditCard so that FormAutofillPrompter can use it for showing the cc logo in the doorhanger/panel.
Remove call to deprecated CreditCard.getLabel and replace with CreditCard.getLabelInfo.
Add tests to cover new CreditCard.getCreditCardLogo function.
Differential Revision: https://phabricator.services.mozilla.com/D132835
CLOSED TREE
Backed out changeset 7b19f4ed5182 (bug 1681985)
Backed out changeset e77582268ce1 (bug 1681985)
Backed out changeset 386a8b11c127 (bug 1681985)
* We make some changes to heuristicsRegexp.js to improve accuracy. (Nothing else uses these regexps, so they're safe to change.) The commenting out of some languages in the expiration fields are because they caused a lot of false positives, according to Daniel Hertenstein's recollection. In any case, we've never preffed CC autofill on for those languages.
* Delete a few tests from test_known_strings.js and one from test_getInfo.js, which were testing for the presence of regexes we removed.
* Delete tests of CC autofill against third-party sites. These tests no longer work as xpcshell tests, since Fathom expects full layout and style information. The spirit of these tests is maintained by adding these pages to Fathom's training, validation, and testing corpora at 2bfcdf23dc. A few don't make it due to iframes which confound Fathom's capture tools, but the rest all succeed--and now improve the ML model as well as acting as tests. The training results after said integration reflect this improvement, which boosts testing precision and recall for every type.
* Add a mochitest to ensure the Fathom integration code can surface a decision that a field should not be autofilled. Decisions that go the other way are taken care of by the existing autofill tests.
Differential Revision: https://phabricator.services.mozilla.com/D100141
Ideally, the error message would be outside of the wrapping label element, which would avoid inclusion of the value in the label.
However, I didn't want to potentially mess with the visual presentation, especially given the tight timeline.
Differential Revision: https://phabricator.services.mozilla.com/D89547
This also updates the behavior of the allowDuplicates check:
Instead of only checking if the top dialog is a duplicate, it will now check the whole stack and
skip the dialog open if a duplicate URL is found.
This fixes an issue where callers could alternate between dialogs to bypass the check.
Differential Revision: https://phabricator.services.mozilla.com/D88422
CLOSED TREE
Backed out changeset 4fdb0c2beacf (bug 1399356)
Backed out changeset adabcdf04413 (bug 1399356)
Backed out changeset 468066fde214 (bug 1399356)