Commit Graph

56 Commits

Author SHA1 Message Date
Mark Banner
55a94e6bc8 Bug 1771173 - Rework FormAutoFill's log creation to make it easier for linters to handle. r=sgalich
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
2022-06-21 20:42:15 +00:00
Iulian Moraru
ad03aef826 Bug 1774385 - fix lint failures in FormAutofillHandler.jsm. CLOSED TREE r=fix 2022-06-20 12:48:02 +03:00
Anthony Hung
019dcb2f0e Bug 1774385 - Replace multiple ChromeUtils.defineModuleGetter call with one XPCOMUtils.defineLazyModuleGetters in Form Autofill. r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D149427
2022-06-20 09:07:41 +00:00
Tooru Fujisawa
8dd914a53f Bug 1773829 - Part 8: Stop using lazy getter unnecessarily in toolkit/components/formautofill/. r=sgalich
Depends on D149016

Differential Revision: https://phabricator.services.mozilla.com/D149017
2022-06-15 20:56:24 +00:00
Tooru Fujisawa
cf5cf9b573 Bug 1772101 - Part 50: Use plain object for FormAutofill.defineLazyLogGetter in toolkit/components/formautofill/. r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D147991
2022-06-07 04:31:07 +00:00
Tooru Fujisawa
9c60a283b8 Bug 1772101 - Part 20: Use plain object for lazy getter in toolkit/components/formautofill/. r=sgalich
Differential Revision: https://phabricator.services.mozilla.com/D147961
2022-06-07 04:30:58 +00:00
Sergey Galich
cd8b1906ac Bug 1771841 - use HTMLInputElement.isInstance(field) instead of ChromeUtils.getClassName(field) === "HTMLInputElement". r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D147712
2022-05-31 12:39:18 +00:00
Tim Giles
4da419b155 Bug 1743629 - Use adjacent label as placeholder format for cc-exp transformer. r=dimi,sgalich
When there is a label element right before a credit card expiry input, we will try and parse this label
as a placeholder. This allows our autofill to work as expected in cases where
the label is not wrapped around the expiry input.

Differential Revision: https://phabricator.services.mozilla.com/D145026
2022-05-06 18:00:20 +00:00
Tim Giles
6d906ceed4 Bug 1767130 - Fix default fill format for cc-exp-month input elements to MM. r=dimi,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D145493
2022-05-06 16:09:01 +00:00
Tim Giles
c3d6a5b3bd Bug 1436793 - Don't autofill disabled fields. r=sgalich,dimi
Differential Revision: https://phabricator.services.mozilla.com/D144638
2022-05-05 18:56:02 +00:00
Tim Giles
2d57fd5e09 Bug 1764709 - Always normalize credit card expiration month and year when creating a new record. r=geckoview-reviewers,dimi,sgalich,agi
Differential Revision: https://phabricator.services.mozilla.com/D144055
2022-05-02 18:18:39 +00:00
Molnar Sandor
87d5acd030 Backed out changeset 360f31b00167 (bug 1764709) for causing bc failures in browser_creditCard_submission_normalized. CLOSED TREE 2022-04-27 07:46:31 +03:00
Tim Giles
5155eeb268 Bug 1764709 - Always normalize credit card expiration month and year when creating a new record. r=geckoview-reviewers,dimi,sgalich,agi
Differential Revision: https://phabricator.services.mozilla.com/D144055
2022-04-26 21:53:17 +00:00
Tim Giles
1716553656 Bug 1748842 - Fix credit card not filling correctly on walmart.com. r=sgalich
Differential Revision: https://phabricator.services.mozilla.com/D143373
2022-04-19 18:01:01 +00:00
Tim Giles
c3f1f5f6ba Bug 1758369 - Ensure credit card number has no whitespaces or dashes before trying to match type. r=dimi,sgalich,geckoview-reviewers,agi
This fixes the cases where a website modifies the credit card number after it has been filled.

Differential Revision: https://phabricator.services.mozilla.com/D140858
2022-04-05 15:46:02 +00:00
Tim Giles
5d1bbb4885 Bug 1760834 - Add missing cc-exp-month and cc-exp-year to credit card record when captured record contains cc-exp. r=dimi,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D141907
2022-04-04 14:55:14 +00:00
Tim Giles
61ab42f86f Bug 1752198 - Respect readonly fields when previewing and filling from autofill. r=dimi,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D141669
2022-04-04 13:57:41 +00:00
Csoregi Natalia
01ba6967fd Backed out changeset 7b32aee78e60 (bug 1758369) for credit card issues. CLOSED TREE 2022-03-24 22:01:49 +02:00
Tim Giles
4de62c6ef4 Bug 1758369 - Ensure credit card number has no whitespaces or dashes before trying to match type. r=dimi,sgalich
This fixes the cases where a website modifies the credit card number after it has been filled.

Differential Revision: https://phabricator.services.mozilla.com/D140858
2022-03-24 18:19:49 +00:00
Dimi
02ad0a2235 Bug 1757731 - P2. Add cc_form_v2 telemetry event to collect more detailed information r=sgalich,tgiles
The previous `cc_form` event telemetry lack the following information:
1. Field-specific information.
  * cc-exp, cc-exp-month, and cc-exp-year are all merged to cc-exp
  * no cc-type
2. Clear form action

The `cc_form_v2` event telemetry aims to collect field specific
information so we can know whether we perform particular bad (or good)
on certain fields.

Differential Revision: https://phabricator.services.mozilla.com/D141009
2022-03-23 09:07:28 +00:00
Dimi
f51ed420cf Bug 1757731 - P1. Move telemetry related function to FormAutofillTelemetryUtils.jsm r=sgalich,tgiles
This patch adds CreditCardTelemetryUtils object to process credit card related telemetry.
This patches doesn't change the logic regarding how we record telemetry.

Differential Revision: https://phabricator.services.mozilla.com/D141008
2022-03-23 09:07:28 +00:00
Tim Giles
74a7107ac0 Bug 1740001 - Add cc exp year transformer, send input and change events when resetting select element via clear form. r=dimi,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D139026
2022-03-16 14:01:57 +00:00
Tim Giles
162063a96d Bug 1753517 - Remove unneeded logging. r=sgalich,dimi
Differential Revision: https://phabricator.services.mozilla.com/D138044
2022-02-08 22:23:08 +00:00
Tim Giles
685cd4d006 Bug 1745248 - Allow each autofill feature to detect if it should be enabled depending on search region. r=dimi,sgalich,preferences-reviewers,skhamis,LougeniaBailey
Differential Revision: https://phabricator.services.mozilla.com/D133818
2022-02-08 19:31:58 +00:00
criss
554340009a Backed out changeset 690addca2aaa (bug 1753517) for causing Xpcshell failures 2022-02-08 17:56:39 +02:00
Tim Giles
259ac05f2a Bug 1753517 - Remove unneeded logging. r=sgalich,dimi
Differential Revision: https://phabricator.services.mozilla.com/D138044
2022-02-08 14:49:09 +00:00
Iulian Moraru
e13fe3ef05 Backed out 4 changesets (bug 1745248) for causing issues with credit card sync. a=backout
Backed out changeset 324a6acb8612 (bug 1745248)
Backed out changeset f54ce6b7dd26 (bug 1745248)
Backed out changeset c7212ce535e4 (bug 1745248)
Backed out changeset 06d57e874522 (bug 1745248)
2022-02-03 00:50:29 +02:00
Tim Giles
c5cbdd8cd4 Bug 1745248 - Allow each autofill feature to detect if it should be enabled depending on search region. r=dimi,sgalich,preferences-reviewers,skhamis,LougeniaBailey
Differential Revision: https://phabricator.services.mozilla.com/D133818
2022-01-26 20:11:41 +00:00
Cosmin Sabou
af66b13655 Backed out 3 changesets (Bug 1745248) for causing issues with FormAutofill.jsm. CLOSED TREE
Backed out changeset b39b99edef97 (bug 1745248)
Backed out changeset b09a96820c2c (bug 1745248)
Backed out changeset 03dd6cedf996 (bug 1745248)
2022-01-06 20:56:43 +02:00
Tim Giles
68cc118b29 Bug 1740070 - Reset <select> elements when autofilled form is cleared. r=sgalich,dimi
Differential Revision: https://phabricator.services.mozilla.com/D133213
2022-01-05 21:56:50 +00:00
Tim Giles
c07db9e20a Bug 1745248 - Allow each autofill feature to detect if it should be enabled depending on search region. r=dimi,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D133818
2021-12-17 21:41:22 +00:00
Sandor Molnar
f00947fe24 Backed out 3 changesets (bug 1745248) for causing bc failures in browser_first_time_use_doorhanger. CLOSED TREE
Backed out changeset ef2454116a21 (bug 1745248)
Backed out changeset 8aeb5a348950 (bug 1745248)
Backed out changeset b1808ec2fe97 (bug 1745248)
2021-12-17 21:12:27 +02:00
Tim Giles
c7cf4969d5 Bug 1745248 - Allow each autofill feature to detect if it should be enabled depending on search region. r=dimi,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D133818
2021-12-17 18:25:25 +00:00
Tim Giles
3bd9b1ec1a Bug 1740446 - Fix credit card expiry placeholder logic when field is using 'j' to represent year. r=sgalich
Differential Revision: https://phabricator.services.mozilla.com/D131167
2021-11-17 14:53:14 +00:00
Tim Giles
d717e970d4 Bug 1688576: Add workaround for cc-expiry being stored as 'YYYY-MM' when websites expect 'MM/YYYY'. r=dimi
Changes the presentation format of expiry date to MM/YYYY so that Zalando's payment site doesn't break when we fill expiry dates.

Reorders the credit card transformers so that the expiry date transformer runs before the match select transformer.
This is to ensure the presentation form of expiry date (MM/YYYY) is used to create cached values for possible select element matches, as opposed to the underlying storage format of expiry date (YYYY-MM).

Because the 'profile' used in getAdaptedProfiles becomes a presentation ready form of the stored data, I've written a note explaining why the default test credit card record now has a expiry date format of 'MM/YYYY' as opposed to the old format.

Differential Revision: https://phabricator.services.mozilla.com/D125884
2021-10-26 14:22:21 +00:00
Tim Giles Jr
08a40c5131 Bug 1735562 - Remove Nightly only gates for multiple cc-number field capture and autofill. r=sgalich
Differential Revision: https://phabricator.services.mozilla.com/D128642
2021-10-18 13:43:49 +00:00
Tim Giles
8e0c611c6e Bug 1688607 - Enable autofill and capturing when there are multiple credit card number fields. r=sgalich
Enable the feature only in Nightly.

Add functionality for previewing and autofilling into multiple cc-number fields.

Fix test_Lush.js case.

Add logic to handle credit card saving/update when multiple cc-number fields are present.

Add heuristic test for Lufthansa site.

Add test for filling cc-number when there are multiple cc-number fields in a form.

Add test for collecting multiple cc-number fields via collectFormFields.

Add multiple cc-number fields case to onFormSubmitted test.

Add multiple cc-number fields with maxlength=4 case to markAsAutofillField.

Add implementation of the preview and fill test cases for multiple cc-number fields.

Differential Revision: https://phabricator.services.mozilla.com/D127987
2021-10-14 14:03:38 +00:00
owlishDeveloper
59e66a2525 Bug 1703976 - [1.0] Extend Autocomplete API to support credit card saving r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D111341
2021-10-02 00:28:05 +00:00
Noemi Erli
a8584c803d Backed out changeset 3339b501299a (bug 1703976) for causing geckoview failures CLOSED TREE 2021-09-28 02:38:01 +03:00
owlishDeveloper
981109533e Bug 1703976 - [1.0] Extend Autocomplete API to support credit card saving r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D111341
2021-09-27 21:41:13 +00:00
criss
3342a45a35 Backed out changeset ba8b96449fbd (bug 1703976) for causing Lint failures on Autocomplete.java. CLOSED TREE 2021-09-27 23:48:19 +03:00
owlishDeveloper
22e69b64f3 Bug 1703976 - [1.0] Extend Autocomplete API to support credit card saving r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D111341
2021-09-27 20:16:25 +00:00
Mark Banner
f321dfd6b1 Bug 1729460 - Change users of defineLazyServiceGetter(s) to use Services.* where appropriate. r=mossop,webdriver-reviewers,extension-reviewers,whimboo,robwu
Differential Revision: https://phabricator.services.mozilla.com/D124838
2021-09-10 12:09:49 +00:00
Noemi Erli
20dee875a7 Backed out 2 changesets (bug 1729460) for causing newtab failures CLOSED TREE
Backed out changeset 5617839462be (bug 1729460)
Backed out changeset 6d52fde3ee0e (bug 1729460)
2021-09-10 13:14:12 +03:00
Mark Banner
6a5ffbcc55 Bug 1729460 - Change users of defineLazyServiceGetter(s) to use Services.* where appropriate. r=mossop,webdriver-reviewers,extension-reviewers,whimboo,robwu
Differential Revision: https://phabricator.services.mozilla.com/D124838
2021-09-10 09:38:42 +00:00
Tim Giles
180e0a8e10 Bug 1687684 - Fix credit card autofill not working due to site prefilling fields. r=dimi,sfoster
Enables autofilling into fields that may have been filled by the site.
Enables autofill preview to work as expected if a field already has a value.
Ensures autofill does not restore the default value if the user manually clears out the field's value.

This fixes the case on next.co.uk where the value of the cardholder name is being used as a placeholder.

Differential Revision: https://phabricator.services.mozilla.com/D123260
2021-09-02 15:29:48 +00:00
Tim Giles
e7a99954e3 Bug 1687681: Add France specific CC expiry date transformation. r=dimi,sfoster
Our previous regex did not parse "AAAA" or "AA" so I've added this to the transformation regex.
For the year first regex, I added a separate regex because trying to bolt on the missing "AA" caused the resulting parsed result to drop characters for other locales ("yyyy" became "yyy" and the same with "aaaa").

Remove backslash as a supported month/year divider when checking expiry date placeholders.

Differential Revision: https://phabricator.services.mozilla.com/D120550
2021-08-17 15:58:48 +00:00
Cosmin Sabou
06b2f6c43b Backed out changeset 8077cd932f28 (bug 1687681) for causing build bustages. CLOSED TREE 2021-08-17 18:15:34 +03:00
Tim Giles
8fb5df6c5c Bug 1687681: Add France specific CC expiry date transformation. r=dimi,sfoster
Our previous regex did not parse "AAAA" or "AA" so I've added this to the transformation regex.
For the year first regex, I added a separate regex because trying to bolt on the missing "AA" caused the resulting parsed result to drop characters for other locales ("yyyy" became "yyy" and the same with "aaaa").

Remove backslash as a supported month/year divider when checking expiry date placeholders.

Differential Revision: https://phabricator.services.mozilla.com/D120550
2021-08-17 14:36:40 +00:00
Tim Giles
8678aed8da Bug 1687679: Fix CC expiration month not autofilling correctly on HTML inputs. r=dimi
Fixes the case where credit card autofill incorrectly fills the expiration month due to input elements and placeholders on those input elements.
Enables unit tests for form autofill.
Additionally adds tests to ensure the previous behavior of autofilling expiration month using select elements.

Added workarounds in tests so that we don't change the reality of the mocked CC storage.

Differential Revision: https://phabricator.services.mozilla.com/D119659
2021-08-16 14:44:20 +00:00