Commit Graph

55 Commits

Author SHA1 Message Date
trickypr
12495faed2 Bug 1510561 - Part 11: Apply plugin:mozilla/valid-jsdoc to browser/extensions/formautofill. r=sgalich
Differential Revision: https://phabricator.services.mozilla.com/D161386
2022-11-07 12:33:29 +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
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
Tooru Fujisawa
48c568867c Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
Kagami Sascha Rosylight
4fb733cb3b Bug 1773740 - Part 4: Reapply mach -l eslint --fix with use-isInstance changes r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D148939
2022-06-27 20:31:34 +00:00
Eugen Sawin
0d32a65fd0 Bug 1691821 - [1.c.3] Rename autofill paths to use the new toolkit component. r=zbraniecki,dimi
Differential Revision: https://phabricator.services.mozilla.com/D108058
2021-04-12 17:33:16 +00:00
Dorel Luca
565aa136f7 Backed out 7 changesets (bug 1691821) for Browser-chrome failures in autofill/FormAutofillParent.jsm. CLOSED TREE
Backed out changeset d12aec06eedd (bug 1691821)
Backed out changeset 0affe1783697 (bug 1691821)
Backed out changeset f807e0d0d095 (bug 1691821)
Backed out changeset abdc3fede62b (bug 1691821)
Backed out changeset cea92bd86972 (bug 1691821)
Backed out changeset 1c86de8cd775 (bug 1691821)
Backed out changeset e955f7f5503c (bug 1691821)
2021-04-10 03:05:35 +03:00
Eugen Sawin
5ba5b5c835 Bug 1691821 - [1.c.2] Rename autofill paths to use the new toolkit component. r=zbraniecki,dimi
Differential Revision: https://phabricator.services.mozilla.com/D108058
2021-04-09 22:12:12 +00:00
Zibi Braniecki
38d51aecc5 Bug 1654167 - Add preferences telemetry for Credit Card A/B testing. r=abr
Differential Revision: https://phabricator.services.mozilla.com/D84293
2020-07-28 00:29:50 +00:00
Zibi Braniecki
4d2a192059 Bug 1650222 - Verify CC number validity when editing the CC entry. r=abr
Differential Revision: https://phabricator.services.mozilla.com/D83527
2020-07-15 01:40:32 +00:00
Zibi Braniecki
7c39d8e5e6 Bug 1642064 - Separate Add and Edit credit card and address entry UI title. r=abr,MattN
Differential Revision: https://phabricator.services.mozilla.com/D78847
2020-06-11 19:30:32 +00:00
Zibi Braniecki
2a9e85d298 Bug 1619320 - Disable address field in Credit Card Entry. r=abr,MattN
Differential Revision: https://phabricator.services.mozilla.com/D78157
2020-06-08 19:02:53 +00:00
Noemi Erli
356c4044c4 Backed out changeset 94f2fb2c3a94 (bug 1619320) for causing failures in browser_editCreditCardDialog.js 2020-06-05 04:27:52 +03:00
Zibi Braniecki
9079917f3e Bug 1619320 - Disable address field in Credit Card Entry. r=abr,MattN
Differential Revision: https://phabricator.services.mozilla.com/D78157
2020-06-04 23:27:06 +00:00
monikamaheshwari
edb30ffaec Bug 1578683 Turn on ESLint rule prefer-boolean-length-check for toolkit and browser r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D45629
2019-09-14 09:39:26 +00:00
Victor Porof
6a87c31efe Bug 1561435 - Format browser/extensions/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D36045
2019-07-05 09:54:47 +02:00
Kris Maglione
856fa07b17 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16750
2019-01-17 10:18:31 -08:00
Jared Wein
6ee6f1dd90 Bug 1474905 - Use a dropdown for the state/province field when possible. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D11854
2018-12-20 22:10:00 +00:00
Cosmin Sabou
076b32a8e4 Backed out changeset c4d1729c029e (bug 1474905) for browser chrome failures on browser_editCreditCardDialog.js. CLOSED TREE 2018-12-14 21:44:32 +02:00
Jared Wein
762cc8ccca Bug 1474905 - Use a dropdown for the state/province field when possible. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D11854
2018-12-14 18:52:19 +00:00
Timothy Guan-tin Chien
67e3dcd7aa Bug 1399367 - Remove MasterPassword.{encrypt|decrypt}Sync() methods r=MattN
This also makes various AutofillRecords methods async, with the exception of
remove() and removeAll().

Noted that I didn't implement any kind of "lock" for FormAutofillStorage --
please do not call these methods concurrently -- if you must please |await|
for the last call to resolve. This most likely would happen in tests, and
shouldn't happen in the real world, given that all user actions happen on
macrotasks, and probably not at the next tick, unless Quicksilver is a
Firefox user.

FormAutofillStorage can be improved if there are complex use cases for it.

Differential Revision: https://phabricator.services.mozilla.com/D4420
2018-09-05 17:54:48 +00:00
Csoregi Natalia
a34cf6da92 Backed out changeset 56aa054d4cc0 (bug 1399367) for browser/extensions/formautofill/test/unit/test_activeStatus.js failures. CLOSED TREE 2018-09-05 05:47:21 +03:00
Timothy Guan-tin Chien
6071bf1543 Bug 1399367 - Remove MasterPassword.{encrypt|decrypt}Sync() methods r=MattN
This also makes various AutofillRecords methods async, with the exception of
remove() and removeAll().

Noted that I didn't implement any kind of "lock" for FormAutofillStorage --
please do not call these methods concurrently -- if you must please |await|
for the last call to resolve. This most likely would happen in tests, and
shouldn't happen in the real world, given that all user actions happen on
macrotasks, and probably not at the next tick, unless Quicksilver is a
Firefox user.

FormAutofillStorage can be improved if there are complex use cases for it.

Differential Revision: https://phabricator.services.mozilla.com/D4420
2018-09-05 00:32:57 +00:00
Mark Banner
76e8f30587 Bug 1478305 - Remove unnecessary imports and fix ESLint warnings about unused variables for browser/. r=jaws
MozReview-Commit-ID: 1vHR6ixePkN
2018-07-30 10:27:36 +01:00
Matthew Noorenberghe
5df3a9f472 Bug 1476204 - Check Luhn algorithm in the basic-card-form and in storage and disable save button when invalid. r=jaws
* Provide an cc-exp-year option to match cc-exp-month
* Make cc-number and cc-name required in the basic-card-form
* Disable the basic-card-page save button when the form is invalid.

MozReview-Commit-ID: LjzsnAKJp6R
2018-07-26 13:40:22 -07:00
Cosmin Sabou
4d1b71eee6 Backed out 5 changesets (bug 1476204) for browser chrome failures on browser_editCreditCardDialog. CLOSED TREE
Backed out changeset 10f3d1014592 (bug 1476204)
Backed out changeset a88879ea32e8 (bug 1476204)
Backed out changeset 001f13f2dd21 (bug 1476204)
Backed out changeset f0f464e3c27c (bug 1476204)
Backed out changeset ed92000eca20 (bug 1476204)
2018-07-26 04:12:56 +03:00
Matthew Noorenberghe
1ba778c9a8 Bug 1476204 - Check Luhn algorithm in the basic-card-form and in storage and disable save button when invalid. r=jaws
* Provide an cc-exp-year option to match cc-exp-month
* Make cc-number and cc-name required in the basic-card-form
* Disable the basic-card-page save button when the form is invalid.

MozReview-Commit-ID: LjzsnAKJp6R
2018-07-25 16:38:25 -07:00
Kris Maglione
76e74e6ca5 Bug 1474140: Don't load FormAutofillUtils.jsm at content process startup. r=MattN
MozReview-Commit-ID: 2bOyTPU9QbX
2018-07-07 17:49:34 -07:00
Matthew Noorenberghe
578163b125 Bug 1427954 - Pass FormAutofillUtils.isCCNumber to EditCreditCard. r=sfoster
The point of this is to remove dependencies on privileged code from autofillEditForms.js so it can
be used in the unprivileged PaymentRequest dialog. The PaymentRequest dialog will be able to inject
the privileged APIs in a different way.

MozReview-Commit-ID: 34PvRxzWcSr
2018-03-14 18:11:03 -07:00
Matthew Noorenberghe
c4094215a1 Bug 1427954 - Pass supported and default countries to EditAutofillForm and move loadInitialValues. r=sfoster
The point of this is to remove dependencies on privileged code from autofillEditForms.js so it can
be used in the unprivileged PaymentRequest dialog. The PaymentRequest dialog will be able to inject
the privileged APIs in a different way.

MozReview-Commit-ID: 4KITOMz7Uxh
2018-03-14 18:11:36 -07:00
Matthew Noorenberghe
1597ac3676 Bug 1427954 - Move autofill edit dialog l10n to mutation observers. r=sfoster
MozReview-Commit-ID: 5jSj0xPBTQj
2018-03-14 18:12:00 -07:00
Matthew Noorenberghe
28196f5a82 Bug 1427954 - Remove string bundle references from autofillEditForms.js. r=sfoster
This is a step on the path to making it unpriveleged.

MozReview-Commit-ID: 3DSYvM2Pje9
2018-03-14 18:12:15 -07:00
Matthew Noorenberghe
79e4b011ea Bug 1427954 - Remove unused uninit code from editDialog.js and autofillEditForms.js. r=sfoster
MozReview-Commit-ID: 9GP1gsycgJo
2018-03-14 17:31:56 -07:00
Matthew Noorenberghe
447c316378 Bug 1427954 - Split autofill dialog logic from field logic. r=sfoster
We want to re-use the field/form logic but not the dialog-specific logic so this separates them out.

Custom Elements aren't enabled by default yet so we can't use them yet.

MozReview-Commit-ID: 60hMpgSOmpp
2018-03-14 18:12:38 -07:00
Matthew Noorenberghe
85cea5f35d Bug 1427954 - Don't pass child elements into the constructor. r=sfoster
MozReview-Commit-ID: 2iqHks0yD0v
2018-03-14 18:12:58 -07:00
Matthew Noorenberghe
6983623bf5 Bug 1427954 - Remove unused Services and XPCOMUtils imports in editDialog.js. r=sfoster
MozReview-Commit-ID: F4ryqNOYMn6
2018-03-14 17:06:42 -07:00
Daniel Marshall
7724f2e32c Bug 1434483 - Renamed profileStorage singleton to formAutofillStorage to make it more clear; r=MattN
MozReview-Commit-ID: CaPYBGLfs5I
2018-02-10 21:23:19 +00:00
Narcis Beleuzu
439cc34017 Backed out changeset a8130e46c530 (bug 1434483) for ESlint failures on browser_change_shipping.js. CLOSED TREE 2018-03-05 23:50:02 +02:00
Daniel Marshall
49ad18cee3 Bug 1434483 - Renamed profileStorage singleton to formAutofillStorage to make it more clear; r=MattN
MozReview-Commit-ID: CaPYBGLfs5I
2018-02-10 21:23:19 +00:00
Ian Moody
a54a2601c7 Bug 1432070 - Block context menu in Autofill preference dialogs, except on text fields. r=MattN,scottwu
The context menu shown is the standard web page one, and so inappropriate for
inside preferences.  Keep it on text fields so text editing commands are still
available, though unfortunately so are "This Frame", "Inspect Element", and
"Add a Keyword for this Search".

MozReview-Commit-ID: 7L012CZ4BhR
2018-01-21 22:50:07 +00:00
Andrew McCreight
272cee1e65 Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG
2018-02-06 09:36:57 -08:00
George Dan, Ryan Neilsen, Dylan Turner
61369dbaa9 Bug 1387632: Rename ProfileStorage module to FormAutofillStorage. r=MattN 2018-01-30 14:44:59 -08:00
Kris Maglione
0bb74efdf1 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Cosmin Sabou
f09d6d985d Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
fd67f090b2 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Brindusan Cristian
483ba301cb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione
683a97d172 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Scott Wu
1e0139fa29 Bug 1421538 - Set country field to default country when creating new addresses. r=lchang
MozReview-Commit-ID: 5Bd6TdZOej
2018-01-03 17:50:44 +08:00
Scott Wu
7c6b72fff4 Bug 1383687 - Order edit dialog fields based on country selected. r=lchang,steveck
MozReview-Commit-ID: 1qPxvHhNGtK
2017-11-03 16:24:30 +08:00