Commit graph

54 commits

Author SHA1 Message Date
Eemeli Aro
9e7ffeb5e0 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
e1a0b90205 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
5475c4b139 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
bf93d07148 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
764ef75de5 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
b0aad68d81 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
96e01b8c73 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
f3fbc60884 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
11395cf9ff 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
9830564143 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
9d127ef2c4 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
02fec8feb0 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
795e870d49 Backed out changeset 94f2fb2c3a94 (bug 1619320) for causing failures in browser_editCreditCardDialog.js 2020-06-05 04:27:52 +03:00
Zibi Braniecki
7c97f420c8 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
9d60e0d578 Bug 1578683 Turn on ESLint rule prefer-boolean-length-check for toolkit and browser r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D45629

--HG--
extra : moz-landing-system : lando
2019-09-14 09:39:26 +00:00
Victor Porof
2995d5960c Bug 1561435 - Format browser/extensions/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D36045

--HG--
extra : source : 0d17c165e0453b1e05ee73771f7a6e18af093578
2019-07-05 09:54:47 +02:00
Kris Maglione
e930b89c34 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

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Jared Wein
4bf1467ca5 Bug 1474905 - Use a dropdown for the state/province field when possible. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D11854

--HG--
extra : moz-landing-system : lando
2018-12-20 22:10:00 +00:00
Cosmin Sabou
1d49103119 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
91e9a06355 Bug 1474905 - Use a dropdown for the state/province field when possible. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D11854

--HG--
extra : moz-landing-system : lando
2018-12-14 18:52:19 +00:00
Timothy Guan-tin Chien
4b8e9c3d4a 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

--HG--
extra : moz-landing-system : lando
2018-09-05 17:54:48 +00:00
Csoregi Natalia
0ee540d6b5 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
a3d7d3c3d1 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

--HG--
extra : moz-landing-system : lando
2018-09-05 00:32:57 +00:00
Mark Banner
8d235f8e45 Bug 1478305 - Remove unnecessary imports and fix ESLint warnings about unused variables for browser/. r=jaws
MozReview-Commit-ID: 1vHR6ixePkN

--HG--
extra : rebase_source : 8f9a322d1ff075ab56b81f8710df5d841839865b
2018-07-30 10:27:36 +01:00
Matthew Noorenberghe
07463fbd62 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

--HG--
extra : rebase_source : 4dcbee371cd0e30b5823b803c4f4734f897ec786
2018-07-26 13:40:22 -07:00
Cosmin Sabou
80a830bce7 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
f5f3467e63 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

--HG--
extra : rebase_source : 467fa09ea07c0234e1839b6dfd7e53375c118104
2018-07-25 16:38:25 -07:00
Kris Maglione
a4453fc75f Bug 1474140: Don't load FormAutofillUtils.jsm at content process startup. r=MattN
MozReview-Commit-ID: 2bOyTPU9QbX

--HG--
extra : rebase_source : 8f8c7e216612437f853df2b5cc8dd5fb3174d10b
2018-07-07 17:49:34 -07:00
Matthew Noorenberghe
72c9dc3548 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

--HG--
extra : rebase_source : 610d157c41739eb160ea48ed8fa28627df837424
2018-03-14 18:11:03 -07:00
Matthew Noorenberghe
20d07e9fd2 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

--HG--
extra : rebase_source : 0461cb9335e24c4e853efaab5ea3c80e36ab2597
2018-03-14 18:11:36 -07:00
Matthew Noorenberghe
a1b80e17b9 Bug 1427954 - Move autofill edit dialog l10n to mutation observers. r=sfoster
MozReview-Commit-ID: 5jSj0xPBTQj

--HG--
extra : rebase_source : c673bee489ae495b3842a4bac71b9246175659b8
2018-03-14 18:12:00 -07:00
Matthew Noorenberghe
a5d3be5673 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

--HG--
extra : rebase_source : 0bf310f885091df7d5ee3eb06c24fa2d18425b39
2018-03-14 18:12:15 -07:00
Matthew Noorenberghe
9196b03577 Bug 1427954 - Remove unused uninit code from editDialog.js and autofillEditForms.js. r=sfoster
MozReview-Commit-ID: 9GP1gsycgJo

--HG--
extra : rebase_source : 8459765abc8c37ebb6db5170db422127e1ddd958
2018-03-14 17:31:56 -07:00
Matthew Noorenberghe
90954ade18 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

--HG--
rename : browser/extensions/formautofill/content/editDialog.js => browser/extensions/formautofill/content/autofillEditForms.js
extra : rebase_source : c75c68793e7e37f5fbb7a438d1419632975074fe
2018-03-14 18:12:38 -07:00
Matthew Noorenberghe
453586515e Bug 1427954 - Don't pass child elements into the constructor. r=sfoster
MozReview-Commit-ID: 2iqHks0yD0v

--HG--
extra : rebase_source : 596a583069c9178a00be61dc78af92e27289ce20
2018-03-14 18:12:58 -07:00
Matthew Noorenberghe
e83a9abda5 Bug 1427954 - Remove unused Services and XPCOMUtils imports in editDialog.js. r=sfoster
MozReview-Commit-ID: F4ryqNOYMn6

--HG--
extra : rebase_source : 56119da5b7b15c091dcb5de8d427b910237d634b
2018-03-14 17:06:42 -07:00
Daniel Marshall
d337129b4a Bug 1434483 - Renamed profileStorage singleton to formAutofillStorage to make it more clear; r=MattN
MozReview-Commit-ID: CaPYBGLfs5I

--HG--
extra : rebase_source : ea59d03458c0e253201fd2c1476062dfb2e9a3d6
2018-02-10 21:23:19 +00:00
Narcis Beleuzu
34b2bf4c13 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
57b922d77c Bug 1434483 - Renamed profileStorage singleton to formAutofillStorage to make it more clear; r=MattN
MozReview-Commit-ID: CaPYBGLfs5I

--HG--
extra : rebase_source : 379bd1db1e50ae415806713878e6b3ef36889e89
2018-02-10 21:23:19 +00:00
Ian Moody
122bb9bfa7 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

--HG--
extra : rebase_source : 6602db5e94efca3797892be44585389bfac80a9c
2018-01-21 22:50:07 +00:00
Andrew McCreight
5dec0e0beb 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

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
George Dan, Ryan Neilsen, Dylan Turner
4cbac2527f Bug 1387632: Rename ProfileStorage module to FormAutofillStorage. r=MattN
--HG--
rename : browser/extensions/formautofill/ProfileStorage.jsm => browser/extensions/formautofill/FormAutofillStorage.jsm
extra : rebase_source : aa456b06046f1d995d65bec13044cde081559061
extra : histedit_source : 620bdb1c33de4b4b656066ea6432826f3631c3b4
2018-01-30 14:44:59 -08:00
Kris Maglione
918ed6c474 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

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou
9a65a40178 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
6476f95b13 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

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian
af8879d1eb 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
c276bb9375 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

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Scott Wu
d435c59800 Bug 1421538 - Set country field to default country when creating new addresses. r=lchang
MozReview-Commit-ID: 5Bd6TdZOej

--HG--
extra : rebase_source : efe1f7c66ce7ee6291cb56a9eba75b5298b7d79f
2018-01-03 17:50:44 +08:00
Scott Wu
cefdf5737a Bug 1383687 - Order edit dialog fields based on country selected. r=lchang,steveck
MozReview-Commit-ID: 1qPxvHhNGtK

--HG--
extra : rebase_source : 12d892ce9c30f70b3fb5dd48c17744e23f45a604
2017-11-03 16:24:30 +08:00
Scott Wu
045d790150 Bug 1417843 - Add supportedCountries pref to configure which countries are supported. r=lchang,steveck
MozReview-Commit-ID: 13m1ezHcR8n

--HG--
extra : rebase_source : 4820c37143af678dd5a72b76622fc88be0ed11c4
2017-11-17 17:15:56 +08:00