Commit Graph

234 Commits

Author SHA1 Message Date
Jonathan Sudiaman
febfadf50b Bug 1790758 - Convert Region.jsm and IgnoreLists.jsm JSM modules to ESMs r=Standard8,preferences-reviewers,credential-management-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D157337
2022-09-20 12:21:45 +00:00
Butkovits Atila
d974ae273d Backed out changeset f0bd843698b2 (bug 1765409) for causing failure at browser_creditCard_selected_attribute_does_not_change.js. CLOSED TREE 2022-09-08 22:48:10 +03:00
Dimi
ea32429d95 Bug 1786583 - show "Forms and Autofill" sub heading when either address or credit card autofill is enabled r=sgalich
Differential Revision: https://phabricator.services.mozilla.com/D156807
2022-09-08 16:05:12 +00:00
Tim Giles
1b36ec8c37 Bug 1765409 - Do not change the 'selected' attribute of option elements when autofilling. r=credential-management-reviewers,dimi
Differential Revision: https://phabricator.services.mozilla.com/D144433
2022-09-08 15:24:45 +00:00
Dimi
6797aa6bdb Bug 1787162 - Treat form with cc-name and cc-exp field as a valid credit card form r=sgalich
Differential Revision: https://phabricator.services.mozilla.com/D155580
2022-09-05 09:15:40 +00:00
Dimi
f290c944d0 Bug 1788621 - Add an extra rule to determine whether a form with only a cc-number field is a valid cc form r=sgalich
Differential Revision: https://phabricator.services.mozilla.com/D156165
2022-09-02 10:18:24 +00:00
Noemi Erli
4672cb4140 Backed out changeset f3e5a79c5252 (bug 1788621) for causing failures in browser_creditCard_heuristics.js 2022-09-02 06:01:45 +03:00
Dimi
8edd1db6e0 Bug 1788621 - Add an extra rule to determine whether a form with only a cc-number field is a valid cc form r=sgalich
Differential Revision: https://phabricator.services.mozilla.com/D156165
2022-09-01 22:09:07 +00:00
Eemeli Aro
40341acaff Bug 1446164 - Migrate formautofill edit dialogs to Fluent. r=sgalich,fluent-reviewers,flod
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
2022-09-01 20:35:37 +00:00
Eemeli Aro
6186d62a9e Bug 1786708 - Migrate formautofill management dialogs to Fluent. r=sgalich,fluent-reviewers,preferences-reviewers,flod,jaws
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
2022-09-01 20:35:34 +00:00
Norisz Fay
4961fb7d01 Backed out 2 changesets (bug 1786708, bug 1446164) for causing multiple failures CLOSED TREE
Backed out changeset 469e2500f00e (bug 1446164)
Backed out changeset 0d298c6f7475 (bug 1786708)
2022-09-01 15:34:56 +03:00
Eemeli Aro
27d39b80cc Bug 1446164 - Migrate formautofill edit dialogs to Fluent. r=sgalich,fluent-reviewers,flod
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
2022-09-01 08:26:47 +00:00
Eemeli Aro
868f4c2248 Bug 1786708 - Migrate formautofill management dialogs to Fluent. r=sgalich,fluent-reviewers,preferences-reviewers,flod,jaws
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
2022-09-01 08:26:46 +00:00
Dimi
d5789e420f Bug 1783129 - P1. Use a higher confidence threshold when determining whether a form with only a credit card number field as a valid cc section r=sgalich
In nightly and early beta, we still use 0.5 as the threshold so we can collect more data.
In release, use 0.95 as the threshold

Differential Revision: https://phabricator.services.mozilla.com/D155486
2022-08-29 06:44:32 +00:00
Dimi
7ef9484430 Bug 1784860 - Do not use transform function for testConfidence pref r=sgalich
`parseFloat` returns NaN when we pass null to it.
Since we use "null" to distinguish the case when the pref is set or
not, this patch moves `parseFloat` inside the if statemenet so we only
call it when the pref is set.

Differential Revision: https://phabricator.services.mozilla.com/D154666
2022-08-16 16:08:37 +00:00
Emilio Cobos Álvarez
0f16115b60 Bug 1784265 - Drop support for flex attribute values other than 0 and 1. r=dholbert,mconley,preferences-reviewers
This makes it easier to get parity between legacy and regular flex
without having to either have tons of arbitrary attribute selectors in
the xul sheet, nor adding attribute lookup hacks to the html flexbox
layout.

Also, reimplement the remaining supported flex attribute-values (0 and 1)
purely in terms of CSS rules in xul.css (regardless of whether
emulate-moz-box-with-flex is enabled).

In practice these are pretty uncommon and the style attribute does the
trick in every case I've tried.

Add a debug-only assertion to ensure we preserve behavior for now.

Add a new test with another behavior difference between flexbox
emulation and old xul layout because the old reftest now passes. Use
replaced elements, which in modern flex are treated differently.

Differential Revision: https://phabricator.services.mozilla.com/D154394
2022-08-12 23:13:41 +00:00
Marian-Vasile Laza
b160c98958 Backed out 3 changesets (bug 1784265) for causing reftest failures on flex-emulation-1.xhtml. CLOSED TREE
Backed out changeset 415da4b53bdd (bug 1784265)
Backed out changeset e27b21c54b1f (bug 1784265)
Backed out changeset fcb1a053fbe2 (bug 1784265)
2022-08-13 01:14:13 +03:00
Emilio Cobos Álvarez
5c4a2beefd Bug 1784265 - Drop support for flex attribute values other than 0 and 1. r=dholbert,mconley,preferences-reviewers
This makes it easier to get parity between legacy and regular flex
without having to either have tons of arbitrary attribute selectors in
the xul sheet, nor adding attribute lookup hacks to the html flexbox
layout.

Also, reimplement the remaining supported flex attribute-values (0 and 1)
purely in terms of CSS rules in xul.css (regardless of whether
emulate-moz-box-with-flex is enabled).

In practice these are pretty uncommon and the style attribute does the
trick in every case I've tried.

Add a debug-only assertion to ensure we preserve behavior for now.

Add a new test with another behavior difference between flexbox
emulation and old xul layout because the old reftest now passes. Use
replaced elements, which in modern flex are treated differently.

Differential Revision: https://phabricator.services.mozilla.com/D154394
2022-08-12 19:34:34 +00:00
Dimi
18266b853c Bug 1783600 - P2. Test confidence value is set in cc_form_v2 events telemetry r=sgalich
Differential Revision: https://phabricator.services.mozilla.com/D153912
2022-08-11 13:49:11 +00:00
Dimi
1999825675 Bug 1783600 - P1. Store confidence value in credit card form detection telemetry r=sgalich
Differential Revision: https://phabricator.services.mozilla.com/D153911
2022-08-11 13:49:11 +00:00
Dimi
ca3d9c21e1 Bug 1782535 - P1. Treat form contains only a credit card number field as a valid credit card form only in nightly and early beta r=sgalich
Differential Revision: https://phabricator.services.mozilla.com/D153581
2022-08-03 15:38:20 +00:00
Dimi
238a7019e3 Bug 1775233 - P1. Consider credit card sections that contain only a credit card number field to be valid cc sections r=sgalich
Before this patch, we consider credit card sections with only one cc-number
field to be valid sections ONLY IF its cc-number field has
"autocomplete=cc-number". In other words, if we infer the field is
a cc-number field because of our detection heuristic, the section
is considered to be invalid.

In this patch, we remove the "autocomplete=cc-number" constrain, which
means as long as a credit card section has a cc-number field, it is a
valid cc section.

Differential Revision: https://phabricator.services.mozilla.com/D151806
2022-07-18 07:11:55 +00:00
Tooru Fujisawa
328d63ce7f Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-12 04:21:34 +00:00
Andreea Pavel
f009ba2983 Backed out 11 changesets (Bug 1777486) for failing bc at browser_startup.js on a CLOSED TREE
Backed out changeset b6c4c386f1a6 (Bug 1777486)
Backed out changeset 195cc2de8433 (Bug 1777486)
Backed out changeset 20c746fb1648 (Bug 1777486)
Backed out changeset d5fd8173d62d (Bug 1777486)
Backed out changeset 6d758fab5a3e (Bug 1777486)
Backed out changeset e938b601ba15 (Bug 1777486)
Backed out changeset 0c4ea0b9416b (Bug 1777486)
Backed out changeset 0559c53cc668 (Bug 1777486)
Backed out changeset eea573d3a9f9 (Bug 1777486)
Backed out changeset 9ce3a6496a49 (bug 1777486)
Backed out changeset b0867652fc48 (bug 1777486)
2022-07-11 22:24:40 +03:00
Tooru Fujisawa
bf0a8b781b Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-11 15:09:13 +00:00
Tooru Fujisawa
b10d0289af Bug 1667455 - Part 4: Stop importing Services.jsm from JSM. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,application-update-reviewers,pip-reviewers,twisniewski,devtools-reviewers,m_kato,jdescottes,ochameau,mconley,sfoster,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D150893
2022-07-11 12:41:50 +00:00
Tim Giles
e24e99953b Bug 1773212 - Fix OS authentication checkbox for credit card autofill not wrapping its text. r=sgalich
Differential Revision: https://phabricator.services.mozilla.com/D150426
2022-06-28 16:38:27 +00:00
Kris Maglione
211cd54aba Bug 1776207: Part 1 - Remove obsolete _xpcom_factory definitions. r=mccr8
They only work with `generateNSGetFactory` definitions, which don't exist
anymore.

Differential Revision: https://phabricator.services.mozilla.com/D150191
2022-06-27 21:19:51 +00:00
Sergey Galich
ca469bd8b6 Bug 1773047 - Remove the security.insecure_field_warning.contextual.enabled pref r=dimi,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D149550
2022-06-27 17:18:41 +00:00
Barret Rennie
725cfaa094 Bug 1772933 - Port osfile.jsm usage to IOUtils in toolkit/components/formautofill/ r=sgalich
Differential Revision: https://phabricator.services.mozilla.com/D149301
2022-06-23 23:41:48 +00:00
Iulian Moraru
eafc4e9bfc Backed out changeset 9c9b960cb8bf (bug 1773047) for causing multiple failures related to Autocomplete. CLOSED TREE 2022-06-22 22:02:41 +03:00
Sergey Galich
40ae641e5d Bug 1773047 - Remove the security.insecure_field_warning.contextual.enabled pref r=dimi,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D149550
2022-06-22 17:48:18 +00:00
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
Tooru Fujisawa
bf94464e91 Bug 1772351 - Part 1: Stop calling ChromeUtils.defineModuleGetter for AppConstants. r=florian
Differential Revision: https://phabricator.services.mozilla.com/D148164
2022-06-06 04:42:08 +00:00
Molnar Sandor
4c2b06df41 Backed out 15 changesets (bug 1772313, bug 1772351, bug 1772360) for causing xpc failures in telemetry/tests/unit/test_SocketScalars.js CLOSED TREE
Backed out changeset c8b0a2ed239e (bug 1772360)
Backed out changeset 1922adad6abe (bug 1772351)
Backed out changeset 6d3634cce489 (bug 1772351)
Backed out changeset f03968a9d053 (bug 1772351)
Backed out changeset e7a38ef90fe4 (bug 1772351)
Backed out changeset b389e7654771 (bug 1772313)
Backed out changeset 59a33598ff51 (bug 1772313)
Backed out changeset ab60885a8a93 (bug 1772313)
Backed out changeset aad8efac9d05 (bug 1772313)
Backed out changeset 4378e519a8e7 (bug 1772313)
Backed out changeset 302ac54741f8 (bug 1772313)
Backed out changeset 74c59f9fd51c (bug 1772313)
Backed out changeset 575fb877c56c (bug 1772313)
Backed out changeset 2eaa68f10b19 (bug 1772313)
Backed out changeset 4a8b3ba193dc (bug 1772313)
2022-06-06 07:04:25 +03:00
Tooru Fujisawa
6ed0357d29 Bug 1772351 - Part 1: Stop calling ChromeUtils.defineModuleGetter for AppConstants. r=florian
Differential Revision: https://phabricator.services.mozilla.com/D148164
2022-06-06 02:49:12 +00:00
Dimi
622e53ad6f Bug 1771148 - Ignore events in formautofill from about page or documents with null or system principal r=sgalich
This patch follows how we ignore events in LoginManagerChild.shouldIgnoreLoginManagerEvent

Differential Revision: https://phabricator.services.mozilla.com/D147725
2022-06-02 11:43:45 +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
5280133204 Bug 1768642 - Use element's placeholder as a heuristic when trying to match field type. r=sgalich,dimi
This fixes the aliexpress case and other cases that I am unaware of.

Differential Revision: https://phabricator.services.mozilla.com/D145917
2022-05-31 09:27:54 +00:00
Tooru Fujisawa
139840e345 Bug 1610653 - Part 10: Do not use global this property assignment to define global variable in toolkit/components. r=Standard8,pip-reviewers,mhowell
Differential Revision: https://phabricator.services.mozilla.com/D144117
2022-05-30 15:19:39 +00:00
Dimi
c2a0ab04ac Bug 1765442 - Store the reference of HTMLLabelElement.control when generating label maps r=sgalich
Accessing control via `label.control` requires a call to native HTMLLabelElement::GetLabeledElement.
And for unmapped label case, we call
`this._unmappedLabels.filter(label => label.control == element);`
for every input element in the form. This means if a form has 10 labels
and 10 elements, a `identifyAutofillFields` call to the form  may invoke up to 100 (10x10)
HTMLLabelElement::GetLabeledElement call.

This patch fixes this issue by storing the reference of the control elements in
`this._unmappedLabelControls` to reduce the number of HTMLLabelElement::GetLabeledElement calls
(10 HTMLLabelElement::GetLabeledElement calls in the foregoing example).

Differential Revision: https://phabricator.services.mozilla.com/D146669
2022-05-25 17:21:04 +00:00
Dimi
d779871e93 Bug 1759418 - P2. Use Fathom to detect cc-number field r=sgalich
Differential Revision: https://phabricator.services.mozilla.com/D146792
2022-05-24 08:13:23 +00:00
Dimi
981c8648eb Bug 1759418 - P1. Update CreditCardRuleset.jsm to e6aff61 r=sgalich
The improvement includes:
1. Train the model with more en-US, fr-FR and de-DE samples
2. Add de-DE and fr-FR keywords
3. Remove nagative lookbehind and negative lookahead from regular
   expressions.
4. Check <td> and <dd> when searching labels
5. Add rule to look at the closest label
6. Remove IsNotVisble rule from cc-number and cc-name ruleset

Differential Revision: https://phabricator.services.mozilla.com/D146791
2022-05-24 08:13:22 +00:00
Iulian Moraru
64fd2232c6 Backed out 3 changesets (bug 1759418) for causing bp-hybrid bustages on FormAutofillNative.
Backed out changeset 7feecbf279d4 (bug 1759418)
Backed out changeset dbf65a66ad3f (bug 1759418)
Backed out changeset 013930ed617f (bug 1759418)
2022-05-24 01:13:43 +03:00
Dimi
82ce417418 Bug 1759418 - P2. Use Fathom to detect cc-number field r=sgalich
Differential Revision: https://phabricator.services.mozilla.com/D146792
2022-05-23 20:39:57 +00:00