Commit graph

113 commits

Author SHA1 Message Date
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
Masayuki Nakano
0acd37ec1d Bug 1504911 - part 4: Make all script for web content dispatch "input" event with proper event interface r=smaug
Currently, some "input" event dispatchers in our script dispatch "input" event
with UIEvent.  This is completely wrong.  For conforming to HTML spec, Event
is proper event.  Additionally, for conforming to Input Events, InputEvent
is proper event only on <textarea> or <input> element which has a single line
editor.

For making us to maintain easier, this patch adds new API, "isInputEventTarget"
to MozEditableElement which returns true when "input" event dispatcher should
use InputEvent for the input element.

Finally, this makes some dispatchers use setUserInput() instead of
setting value and dispatching event by themselves.  This also makes
us to maintain them easier.

Note that this does not touch "input" event dispatchers which dispatch events
only for chrome (such as URL bar, some pages in about: scheme) for making
this change safer as far as possible.

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

--HG--
extra : moz-landing-system : lando
2018-11-20 14:35:38 +00:00
Timothy Guan-tin Chien
9ac2863a64 Bug 1504268 - Show proper OS login dialog labels when filling/editing credit cards r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D11095

--HG--
extra : moz-landing-system : lando
2018-11-19 21:00:02 +00:00
Jared Wein
416ff8c392 Bug 1481972 - Add remaining countries to address autofill countries list. r=MattN
Saving and filling the countries via Form Autofill will still be limited to certain countries
but this allows the storage to be useful for Web Payments in other countries.

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

--HG--
extra : amend_source : c6810478b747cf51aaaafa73f83682cb23711231
2018-09-23 23:50:03 -07:00
Mark Banner
6feaa5a9c3 Bug 1478308 - Remove unnecessary ChromeUtils.imports in browser/ r=mikedeboer
MozReview-Commit-ID: BYTDdLU2HoM

--HG--
extra : rebase_source : 1e31ff288280d09ae226cdc698331263ba969205
2018-07-25 09:10:07 +01:00
Narcis Beleuzu
d47c829065 Backed out 4 changesets (bug 1478308) for ESlint failure on AttributionCode.jsm. CLOSED TREE
Backed out changeset a809b45ff49b (bug 1478308)
Backed out changeset c68131530742 (bug 1478308)
Backed out changeset 0e4ba7a6dc1a (bug 1478308)
Backed out changeset 32a27f317a77 (bug 1478308)
2018-07-26 11:13:28 +03:00
Mark Banner
180233c593 Bug 1478308 - Remove unnecessary ChromeUtils.imports in browser/ r=mikedeboer
MozReview-Commit-ID: BYTDdLU2HoM

--HG--
extra : rebase_source : 67dc15c0cdff0234d3274f1a8978d1f2a5b3f411
2018-07-25 09:10:07 +01:00
Boris Zbarsky
270fa12c79 Bug 1476145 part 3. Stop using getInterface(nsIDOMWindowUtils) in browser/. r=gijs 2018-07-24 19:47:41 -04: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
Adrian Wielgosik
8c66c095f4 Bug 1418078 - Convert JS users of nsIDOMHTMLInputElement. r=bz
MozReview-Commit-ID: 55aIiNHS0xs

--HG--
extra : rebase_source : cacb9fc29daa5d620d4a0cd6ab3f09cde765036f
2018-04-18 22:29:50 +02:00
Florian Quèze
682b1ec3b2 Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01: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
Matthew Noorenberghe
9a64450314 Bug 1435274 - Stop form autofilling if the master password prompt is cancelled. r=johannh
MozReview-Commit-ID: HnFbcWYX6QL

--HG--
extra : rebase_source : 4c8491c460d7fc0a9dc606f4c624d4e35e881586
2018-02-02 21:42:31 -08:00
Florian Quèze
2b1c8dccb6 Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01: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
steveck-chung
dcdc4dd0c6 Bug 1426652 - Allow the form with non-autocomplete-attr cc-number and cc-name as valid credit card form, r=lchang
MozReview-Commit-ID: 8eqJUSYyPXr

--HG--
extra : rebase_source : ca43986ddead180de155954fc45c1330553a6c15
2018-01-10 15:50:46 +08:00
Sean Lee
546e6de7bf Bug 1417834 - Part 2: Implement FormAutofillCreditCardSection and FormAutofillAddressSection inhertied from FormAutofillSection. r=lchang,ralin
MozReview-Commit-ID: 4i4suqQhUA1

--HG--
extra : rebase_source : 4e6e80b7d512e6e8b5cf8328247be89f1974ad61
2017-12-16 13:20:48 -06:00
Ray Lin
c6429b4677 Bug 1423805 - Handle auto-filled input correctness upon target set instead of section-level. r=lchang
MozReview-Commit-ID: K79dmtJ2aFy

--HG--
extra : rebase_source : 40bd6499f141cabbeb161235854e433f930f4fa4
2017-12-07 15:09:36 +08:00
Sean Lee
22fe0e9aeb Bug 1417803 - Part 2: Add a underscore to the private functions. r=lchang,ralin
MozReview-Commit-ID: K8FLWgojZrw

--HG--
extra : rebase_source : e2cae197132b0fd2738a10e609c49d585e8991ed
2017-12-11 15:39:00 +08:00
Sean Lee
60cb50c7b5 Bug 1417803 - Part 1: Use activeSection to record the current focused field or section. r=lchang,ralin
MozReview-Commit-ID: 4mhmTcJOOz2

--HG--
extra : rebase_source : facb2f4070224d442bdbadb592bb46f7225566bd
2017-12-05 14:11:36 +08:00
Csoregi Natalia
45cdfa2e9e Backed out 3 changesets (bug 1417803) for failing browser/browser_device_width.js on Linux Stylo Disabled Debug platform. r=backout on a CLOSED TREE
Backed out changeset af5b96ec9db0 (bug 1417803)
Backed out changeset cd5e96cab7c5 (bug 1417803)
Backed out changeset fe9d556bdef4 (bug 1417803)
2017-12-18 21:23:05 +02:00
Sean Lee
e9699c8bff Bug 1417803 - Part 2: Add a underscore to the private functions. r=lchang,ralin
MozReview-Commit-ID: K8FLWgojZrw

--HG--
extra : rebase_source : 60421b657deb5d80698080f66bd20481c564f927
2017-12-11 15:39:00 +08:00
Sean Lee
85288e7197 Bug 1417803 - Part 1: Use activeSection to record the current focused field or section. r=lchang,ralin
MozReview-Commit-ID: 4mhmTcJOOz2

--HG--
extra : rebase_source : 60d6629cf0d67aff514e873ed1359dfa9c4f8d84
2017-12-05 14:11:36 +08:00
Luke Chang
261ab4c0c7 Bug 1422404 - [Form Autofill] Adapt profiles to the maxlength restriction of fields. r=seanlee
MozReview-Commit-ID: 5bNqQABJy1C

--HG--
extra : rebase_source : 77fb2e31ce71e28d53afd6c7bac1b7eda452b18b
2017-12-06 17:51:32 +08:00
Ray Lin
4af930c9a7 Bug 1421641 - Handle event listeners in mozSystemGroup and do full field states reset when clearing populated form. r=lchang
MozReview-Commit-ID: DcYD79LeA4N

--HG--
extra : rebase_source : 0097ae95358b0785ae6db30154c33aa145ba9154
2017-11-30 16:31:44 +08:00
Ray Lin
60d7ea01a2 Bug 1415073 - Refactor records structure of form autofill submission to adapt multiple sections. r=seanlee,steveck
MozReview-Commit-ID: Fs2hgA7H5GX

--HG--
extra : rebase_source : 976d4d1175982554d45de7b7364439bf922a963c
2017-11-21 12:26:10 +08:00
steveck-chung
90c21cb103 Bug 1417818 - Add CA/DE metadata from libaddressinput. r=lchang,scottwu
MozReview-Commit-ID: 56eHfN8DaUg

--HG--
extra : rebase_source : da01ce645e8618c6f7082f87bd67bd3c87efc851
2017-11-20 18:07:50 +08:00
Ray Lin
e2440dcf56 Bug 1420169 - Move the ownership of input handler from form to section. r=lchang
MozReview-Commit-ID: FZgLNAqg1hR

--HG--
extra : rebase_source : e7ca556e80c24d7db32603a28460c1f051dc8eb7
2017-11-24 01:01:45 +08:00
Ray Lin
6e6989c8a6 Bug 1407508 - Part 4. Implement clear populated form function for form autofill clear button. r=lchang,seanlee
With this patch, we're able to clear the populated form already. However,
we need some ways to invalidate mResults in AutoCompleteController to get
new results instead of cached one for clear button once the form has been
populated.

MozReview-Commit-ID: 8No9FXWJv0p

--HG--
extra : rebase_source : 08f598c1f97ade3a3b0dc99e424d0f711c2d6671
2017-10-16 13:52:30 +08:00
Ray Lin
02f5e6f893 Bug 1407508 - Part 1. Expose field states constants in FormAutofillUtils.jsm. r=lchang
MozReview-Commit-ID: G1jyiub2pRS

--HG--
extra : rebase_source : de7c014facdeb3bec1108b958a7e5910073cd6d9
2017-10-11 16:41:22 +08:00
Sean Lee
747b26c501 Bug 1339731 - Refactor some duplicated codes and remove the unused method. r=lchang,ralin
MozReview-Commit-ID: 5BHR2sJBASl

--HG--
extra : rebase_source : b0cc20356a2b72c5047c475562475b877831c41d
2017-11-20 09:19:51 +08:00
Sean Lee
bc4a3d74f8 Bug 1339731 - Refactor FormAutofillHandler to support multiple section machanism. r=lchang,ralin
MozReview-Commit-ID: D9g5fKTeTaL

--HG--
extra : rebase_source : ef5a572e5038dfe6746d99e683c53625d6c45d9a
2017-11-20 08:21:30 +08:00
Andreea Pavel
83c3d396d1 Backed out 2 changesets (bug 1339731) for failing browser/extensions/formautofill/test/mochitest/test_form_changes.html r=backout on a CLOSED TREE
Backed out changeset 9faf8dcf5c6e (bug 1339731)
Backed out changeset 8492412ff6f6 (bug 1339731)
2017-11-17 17:56:44 +02:00
Sean Lee
6e3173aa24 Bug 1339731 - Refactor some duplicated codes and remove the unused method. r=lchang,ralin
MozReview-Commit-ID: 459i0cUvXRz

--HG--
extra : rebase_source : 4220a26b6616c6964481411bc7f27129c833e85c
2017-11-13 10:19:15 +08:00
Sean Lee
29e1c4d8d8 Bug 1339731 - Refactor FormAutofillHandler to support multiple section machanism. r=lchang,ralin
MozReview-Commit-ID: D9g5fKTeTaL

--HG--
extra : rebase_source : 1b19750a6f1d9137b9e21170b854d89cd6d2859c
2017-10-26 17:57:36 +08:00
Kyle Machulis
bcce449ae5 Bug 1408186 - Remove nsIDOMHTMLSelectElement and nsIDOMHTMLOptionsCollection; r=bz
MozReview-Commit-ID: Gh3JwLUtmz9

--HG--
extra : rebase_source : 6cdee487246406cafe0e5a9afe4a44f62d131c8b
2017-10-12 16:32:25 -07:00
Luke Chang
fa911e3e35 Bug 1413118 - [Form Autofill] Fill "tel-national" to a recognized "tel" field even the international format passes "maxlength". r=seanlee
MozReview-Commit-ID: KOyFeaORTWV

--HG--
extra : rebase_source : 6e99ffa7685caab8bed5c31b87c2eeb8e3a7e0b8
2017-11-02 13:17:24 +08:00
Sean Lee
abfaaa7c0a Bug 1400112 - Refresh FormAutofillHandler.form when the related form is changed. r=lchang,MattN
MozReview-Commit-ID: EmSID172pWo

--HG--
extra : rebase_source : 33a73f22c2ee4ccc040e2b0dc1c41d141d412aa7
2017-09-15 11:32:13 +08:00
Sean Lee
63bfacc274 Bug 1406771 - Use input's placeholder to adjust the format of cc-exp. r=lchang
MozReview-Commit-ID: JGdXRwomEON

--HG--
extra : rebase_source : a219b79f9912db870456da95bda2b1bd3c5a75f7
2017-10-09 17:54:07 +08:00
Luke Chang
8897ae0b86 Bug 1360694 - [Form Autofill] Cap the length of profile fields saved in storage. r=ralin
MozReview-Commit-ID: I9x0tnGEt1Y

--HG--
extra : rebase_source : 22a9cf125c755c510723adb710392d1b29bd3be1
2017-10-19 12:06:40 +08:00
Luke Chang
0d110bc62f Bug 1400760 - [Form Autofill] Don't popup credit card dropdown if only cc-number field is identified and without @autocomplete. r=seanlee
MozReview-Commit-ID: JGoRLx2WEBG

--HG--
extra : rebase_source : 053ee36a3c16b2fcba250c7cabb0f749f626ccb9
2017-10-09 16:22:37 +08:00
Sean Lee
ac9aa82156 Bug 1405997 - Fill a non-autocomplete tel field with tel-national value. r=lchang
MozReview-Commit-ID: JpTqy42Y1ej

--HG--
extra : rebase_source : 8c75d80e936e035aa9b06bdff314a2643dbaf2ed
2017-10-06 02:24:48 +08:00
Luke Chang
af0cd9cd42 Bug 1404531 - [Form Autofill] Features on submission should be disabled when the prefs are set to false. r=steveck
MozReview-Commit-ID: F1DfnpFUVYg

--HG--
extra : rebase_source : 51facf2bf569e72667a023ceca39eea9d6096e43
2017-09-30 18:36:10 +08:00
Sean Lee
06f93d18d1 Bug 1401411 - All name related fields should be counted as 1 field only when creating the records. r=lchang
MozReview-Commit-ID: 468B9tlFH3p

--HG--
extra : rebase_source : 87b01de50367e5fa432e1178e632b070ae1753a8
2017-09-25 17:14:48 +08:00
Sebastian Hengst
fe0556cb3c Backed out changeset 130a44290c28 (bug 1401411) for eslint failure at browser/extensions/formautofill/test/unit/test_createRecords.js:207:8 | Missing trailing comma. r=backout 2017-09-29 09:43:51 +02:00
Sean Lee
33463b9597 Bug 1401411 - All name related fields should be counted as 1 field only when creating the records. r=lchang
MozReview-Commit-ID: 468B9tlFH3p

--HG--
extra : rebase_source : f1b6a8a4a99eb9a08a01902067767d6607545070
2017-09-25 17:14:48 +08:00