Commit graph

51 commits

Author SHA1 Message Date
Narcis Beleuzu
99f7b49656 Backed out changeset 3fa420b71260 (bug 1477113) for bc failures on browser_total.js. CLOSED TREE 2018-12-13 09:53:39 +02:00
Jared Wein
bbfb132319 Bug 1477113 - Dispatch paymentmethodchange event from the front-end. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D13740

--HG--
extra : moz-landing-system : lando
2018-12-13 06:35:30 +00:00
Matthew Noorenberghe
b82e3514a4 Bug 1495549 - Clear merchant payer errors when the payer address changes. r=jaws
Depends on D12605

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

--HG--
extra : moz-landing-system : lando
2018-12-11 18:17:31 +00:00
Matthew Noorenberghe
4d0cbeac7f Bug 1505141 - Always preserveOldProperties for payment request but blank mailing address fields by default. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D12190

--HG--
extra : moz-landing-system : lando
2018-11-21 00:46:23 +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
a75e459698 Bug 1495122 - Support regionCode and dependentLocality for merchant errors. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D11844

--HG--
extra : moz-landing-system : lando
2018-11-16 04:47:15 +00:00
Csoregi Natalia
9b0f48f9d3 Backed out changeset 081704356a93 (bug 1495122) for bc failures on browser_shippingaddresschange_error.js. CLOSED TREE 2018-11-16 00:13:55 +02:00
Jared Wein
cfab10d500 Bug 1495122 - Support regionCode and dependentLocality for merchant errors. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D11844

--HG--
extra : moz-landing-system : lando
2018-11-15 21:19:43 +00:00
shindli
5770e9cf94 Backed out changeset 3df92480890e (bug 1495122) as it was requested by the dev on irc 2018-11-15 23:13:12 +02:00
Jared Wein
d934d7d74c Bug 1495122 - Support regionCode and dependentLocality for merchant errors. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D11844

--HG--
extra : moz-landing-system : lando
2018-11-15 21:08:07 +00:00
Matthew Noorenberghe
7130ce9204 Bug 1435880 - Handle moving/detaching tabs between windows when a Payment Request is showing. r=jaws
Depends on D10180

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

--HG--
rename : browser/components/payments/test/browser/browser_show_dialog.js => browser/components/payments/test/browser/browser_tab_modal.js
extra : moz-landing-system : lando
2018-11-15 15:06:21 +00:00
Matthew Noorenberghe
b22b368fd6 Bug 1435880 - Put the payment dialog <browser> directly in the ChromeWindow. r=jaws
Remove the intermediate <html:iframe> as it makes support of detaching impossible since we would need
to swap both the <browser> and <html:iframe> contents during a tab detach.
Since a docshell swap requires both docshells to have a frame and document loaded and the move of the
tab won't wait on payments code to do async work to get frames and documents ready for swapping, I
couldn't see a way to get detaching to work with the nested frames.

* Swapping the docshell of only the outer <html:iframe> still caused a reload of the inner <browser>.

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

--HG--
extra : moz-landing-system : lando
2018-11-15 15:05:12 +00:00
Matthew Noorenberghe
fc94384b79 Bug 1486954 - Part IV, Recover from decryption errors in some places. r=MattN
In case of loss of OS key store key, we should still allow users to go into the manage credit cards dialog and fill the numbers back in.

This is not the migration strategy, see Part III.

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

--HG--
extra : rebase_source : dc710a2512b0d9b20e0fa74e641867525098eba2
extra : histedit_source : 4983a480565380ce4da6a0f099a5e4ae0e65797d
2018-10-22 22:57:29 -07:00
Timothy Guan-tin Chien
b2023e958b Bug 1486954 - Part I, Encrypt credit card numbers with OS key store. r=MattN
This patch morphs MasterPassword.jsm to OSKeyStore.jsm while keeping the same
API, as an adaptor between the API and the native API exposed as nsIOSKeyStore.idl.

Noted that OS Key Store has the concept of "recovery phrase" that we won't
be adopting here. The recovery phrase, together with our label, allow
the user to re-create the same key in OS key store.

Test case changes are needed because we have started asking for login in
places where we'll only do previously when "master password is enabled".
This also made some "when master password is enabled" tests invalid because
it is always considered enabled.

Some more test changes are needed simply because they previously rely on the
stable order of microtask resolutions (and the stable # of promises for a
specific operation). That has certainly changed with OSKeyStore.

The credit card form autofill is only enabled on Nightly.

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

--HG--
rename : browser/extensions/formautofill/MasterPassword.jsm => browser/extensions/formautofill/OSKeyStore.jsm
rename : browser/extensions/formautofill/test/browser/browser_creditCard_fill_master_password.js => browser/extensions/formautofill/test/browser/browser_creditCard_fill_cancel_login.js
extra : rebase_source : cabbd8cdec86e5b3965cf1c8b6e635b73b6c2095
extra : histedit_source : 65e71057104465553fefa1d0b293580efed53075
2018-10-17 02:31:04 +00:00
Matthew Noorenberghe
ec9bd73e34 Bug 1435871 - Open prefs from Payment Request in a tab. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D8497

--HG--
extra : moz-landing-system : lando
2018-10-20 03:40:05 +00:00
Matthew Noorenberghe
b059591dff Bug 1435871 - Implement a basic tab-modal dialog container for Payment Request. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D7934

--HG--
extra : moz-landing-system : lando
2018-10-20 03:39:32 +00:00
Jared Wein
e85599dc8f Bug 1494551 - Sort the formautofill data by the last used time. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D9174

--HG--
extra : moz-landing-system : lando
2018-10-19 17:00:31 +00:00
Jared Wein
eb7010591a Bug 1420853 - Ensure only fields valid for the given country are saved. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D9034

--HG--
extra : moz-landing-system : lando
2018-10-19 16:36:45 +00:00
Brindusan Cristian
1420f3437e Backed out 2 changesets (bug 1435871) for multiple browser-chrome failures on payments. CLOSED TREE
Backed out changeset 0f7592b662e2 (bug 1435871)
Backed out changeset 039f6d65036e (bug 1435871)
2018-10-19 12:36:13 +03:00
Matthew Noorenberghe
783e80be91 Bug 1435871 - Open prefs from Payment Request in a tab. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D8497

--HG--
extra : moz-landing-system : lando
2018-10-19 05:06:30 +00:00
Matthew Noorenberghe
28552cda7d Bug 1435871 - Implement a basic tab-modal dialog container for Payment Request. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D7934

--HG--
extra : moz-landing-system : lando
2018-10-19 05:06:22 +00:00
Margareta Eliza Balazs
53fc8ddacd Backed out 4 changesets (bug 1486954) for hangs on Linux. a=backout
Backed out changeset c895888bdddc (bug 1486954)
Backed out changeset 27e9286503e8 (bug 1486954)
Backed out changeset 87e64652386d (bug 1486954)
Backed out changeset 96a6e1ceb697 (bug 1486954)

--HG--
rename : browser/extensions/formautofill/OSKeyStore.jsm => browser/extensions/formautofill/MasterPassword.jsm
rename : browser/extensions/formautofill/test/browser/browser_creditCard_fill_cancel_login.js => browser/extensions/formautofill/test/browser/browser_creditCard_fill_master_password.js
2018-10-18 12:40:21 +03:00
Timothy Guan-tin Chien
3aaef61c6c Bug 1486954 - Part IV, Recover from decryption errors in some places r=MattN
In case of loss of OS key store key, we should still allow users to go into the manage credit cards dialog and fill the numbers back in.

This is not the migration strategy, see Part III.

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

--HG--
extra : moz-landing-system : lando
2018-10-17 02:34:22 +00:00
Timothy Guan-tin Chien
f47a796bf6 Bug 1486954 - Part I, (Nighty-only feature) Encrypt credit card numbers with OS key store r=MattN
This patch morphs MasterPassword.jsm to OSKeyStore.jsm while keeping the same
API, as an adaptor between the API and the native API exposed as nsIOSKeyStore.idl.

Noted that OS Key Store has the concept of "recovery phrase" that we won't
be adopting here. The recovery phrase, together with our label, allow
the user to re-create the same key in OS key store.

Test case changes are needed because we have started asking for login in
places where we'll only do previously when "master password is enabled".
This also made some "when master password is enabled" tests invalid because
it is always considered enabled.

Some more test changes are needed simply because they previously rely on the
stable order of microtask resolutions (and the stable # of promises for a
specific operation). That has certainly changed with OSKeyStore.

The credit card form autofill is only enabled on Nightly.

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

--HG--
rename : browser/extensions/formautofill/MasterPassword.jsm => browser/extensions/formautofill/OSKeyStore.jsm
rename : browser/extensions/formautofill/test/browser/browser_creditCard_fill_master_password.js => browser/extensions/formautofill/test/browser/browser_creditCard_fill_cancel_login.js
extra : moz-landing-system : lando
2018-10-17 02:31:04 +00:00
Eden Chuang
05093acbf4 Bug 1441752 - Adding an new attribute regionCode in PaymentAddress. r=baku
--HG--
extra : histedit_source : d71b94a611ff5cd3f5b556de9157ff46a5cfeda6
2018-09-28 12:21:59 +02:00
Jared Wein
acbe499b25 Bug 1470184 - Update the Preferences text and layout for Web Payments. r=flod,MattN
Differential Revision: https://phabricator.services.mozilla.com/D6937

--HG--
extra : moz-landing-system : lando
2018-09-28 08:29:01 +00:00
Matthew Noorenberghe
05d5fb0939 Bug 1490805 - Add a required CSC/CVV field to the add card page. r=jaws
Depends on D6882

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

--HG--
extra : moz-landing-system : lando
2018-09-27 17:26:24 +00:00
Matthew Noorenberghe
4aaa87fe69 Bug 1432939 - Link to Firefox Options/Preferences from the PaymentRequest dialog. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D6724

--HG--
extra : moz-landing-system : lando
2018-09-25 17:26:38 +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
Sam Foster
a3ee1b5ad2 Bug 1429181 - Fix serialization of payment method data. r=MattN
* Includes a workaround to explicitly cloneInto the paymentMethods data when we create the PaymentRequest object in the content window in tests.

MozReview-Commit-ID: LFy0h3fIXXA

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

--HG--
extra : moz-landing-system : lando
2018-09-14 20:24:08 +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
Marcos Cáceres
8128af9850 Bug 1485881 - Drop support for PaymentAddress.languageCode r=smaug
--HG--
extra : rebase_source : 6400765c8b669126c7a71f5094dd160b2b1a89ce
2018-08-27 16:30:00 +03:00
Matthew Noorenberghe
b0560084b3 Bug 1476204 - Handle autofill record update state changes in the unpriv. PR forms. r=jaws
This is easier to understand as we don't have to round-trip the whole success and error states to the privileged wrapper which could potentially lead to stale state changes.
This is also much simpler for the basic-card-form as it doesn't need a lot of the complexity of the previous implementation.

* Move selectedStateKey from page to address-page since it doesn't apply to basic-card-page

MozReview-Commit-ID: B4kiZNWElGI

--HG--
extra : rebase_source : bcca13bbdc506961834e2e3cc078dad7d6ee7ca7
2018-07-25 12:37:51 -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
46813c4815 Bug 1476204 - Handle autofill record update state changes in the unpriv. PR forms. r=jaws
This is easier to understand as we don't have to round-trip the whole success and error states to the privileged wrapper which could potentially lead to stale state changes.
This is also much simpler for the basic-card-form as it doesn't need a lot of the complexity of the previous implementation.

* Move selectedStateKey from page to address-page since it doesn't apply to basic-card-page

MozReview-Commit-ID: B4kiZNWElGI

--HG--
extra : rebase_source : 183a3bd44ed33566fccdc024eabdccef83554d50
2018-07-25 12:37:51 -07:00
Matthew Noorenberghe
a6b3276e31 Bug 1463538 - Remove the formautofill-storage-changed observer at PR dialog unload. r=jaws
MozReview-Commit-ID: H0PWlps796I

--HG--
extra : rebase_source : 52430c8af7604c33be87199953fc45f16b62bd48
2018-07-21 22:17:49 -07:00
Gurzau Raul
cd2f4fd65e Backed out 4 changesets (bug 1463538) for failing on /payments/test/browser/browser_payments_onboarding_wizard.js
Backed out changeset 1c945ede0071 (bug 1463538)
Backed out changeset 8ccd9f4b230d (bug 1463538)
Backed out changeset e078fb39875e (bug 1463538)
Backed out changeset 798bf0d7928c (bug 1463538)
2018-07-24 11:16:21 +03:00
Matthew Noorenberghe
cb1a98462c Bug 1463538 - Remove the formautofill-storage-changed observer at PR dialog unload. r=jaws
MozReview-Commit-ID: H0PWlps796I

--HG--
extra : rebase_source : 52430c8af7604c33be87199953fc45f16b62bd48
2018-07-21 22:17:49 -07:00
Sam Foster
799c3f4923 Bug 1447777 - Add completion fail and timeout error pages. r=MattN
* A new CompletionErrorPage / completion-error-page element which represents the content of the completion error
* Leave the dialog open when complete() results in a 'fail' or 'timeout'.
* The 'done' button on the fail & timeout error page closes the dialog by sending a message up to the paymentDialogWrapper.
* Rewrite the pay button rendering logic to ensure it is disabled when it should be
* Retry handling and UI not addressed here. Will need a new bug when the DOM support has landed.
* Extend completeStatus support in debugging.html and group like actions to tidy up a bit

MozReview-Commit-ID: GDhJqrj14uT

* Add tests to verify that the dialog stays open when completion fails or times out
* Add tests to verify that complete() throws after the timeout
* Rework completeStatus mochitest for PaymentDialog

MozReview-Commit-ID: 4ZNVEYMp7h5

--HG--
extra : rebase_source : 1d8e691eb44e74156a956dff73e1359af2a6934a
2018-07-20 15:51:52 -07:00
Sam Foster
1830053e3f Bug 1468644 - cc-numbers are always masked in dialog content; tests to verify this and card details in the payment response. r=jaws
MozReview-Commit-ID: 34MkjyRBth7

--HG--
extra : rebase_source : 04a75ec0d87d9458fab314fe42dddd798957cb61
2018-07-18 12:45:45 -07:00
Sam Foster
4cf8d4350f Bug 1463608 - Expose FormAutofill computeFields methods, use them for temporary records in payments. r=MattN
* Test helpers for cards
* Refactor the test_add_link test to test in private & non-private window

MozReview-Commit-ID: AeVJOkSwQps

--HG--
extra : rebase_source : 6e8380826bcac87bc408ff75a6a398b5c4f6cafa
2018-05-30 16:56:25 -07:00
Matthew Noorenberghe
8378baa979 Bug 1466720 - Don't reload l10n.js in the PaymentRequest scope on a refresh. r=sfoster
There was an error trying to redefine variables from l10n.js via loadSubScript. We really only need
it loaded once like a frame script but I had to fix the l10n.js code to handle this properly.

MozReview-Commit-ID: EbNrEaRQJbs

--HG--
extra : rebase_source : 6e544dd61798ebe3865ca108e59392a1319d7eeb
2018-06-11 00:03:47 -07:00
Jared Wein
3c2f74832e Bug 1429180 - Change selectedStateKey to an array that defines the path within the state object that should be updated. r=MattN
MozReview-Commit-ID: IjJfmUtvjdz

--HG--
extra : rebase_source : 9a866b4823885d326e53f6fda46a6005b5cf5e41
2018-05-21 22:05:47 -04:00
Jared Wein
d9f3ec17f2 Bug 1429180 - Option to use a new billing address when adding a new payment method. r=MattN
MozReview-Commit-ID: 5LrpUw1LdT3

--HG--
extra : rebase_source : a2266d92902800af60978011ccd34bdc7a06b7f5
2018-05-10 15:12:01 -04:00
Sam Foster
ec6b7b7e5e Bug 1427960 - Add temporary addresses to state, add toggle to enable saving/not new addresses. r=MattN
* Implement store in paymentDialogWrapper for temporary addresses & creditCards
* Add the persist checkbox to the add/edit address form. Defaults to unchecked when adding an address in a private session.
* The union of saved and temporary addresses can be retrieved from paymentRequest.getAddresses(). References to state.savedAddresses updated to use this when appropriate
* New tests for adding and editing addresses from a private window


MozReview-Commit-ID: KyD2BPNFYtZ

--HG--
extra : rebase_source : 28e17a2c018a684fab42b1321b739047b1522884
2018-04-26 15:05:10 -07:00
Matthew Noorenberghe
08d188e41d Bug 1443735 - Don't select a PaymentRequest shipping address by default. r=sfoster
This is possibly a temporary solution to avoid sending the user's address to the merchant until they've interacted with the shipping address picker.

MozReview-Commit-ID: 5q8BYr1rLwP

--HG--
extra : rebase_source : e6c5ecee96acc4aaa25c2082b7d6a654bb82e135
2018-05-17 15:48:04 -07:00
Matthew Noorenberghe
e2784528d8 Bug 1458376 - Use a <xul:browser> to display the PaymentRequest UI to fix <select> dropdowns. r=jaws
This fixes <select> dropdowns and also gets rid of the thin bottom gray line in the dialog.

MozReview-Commit-ID: I7v0mVjAnQZ

--HG--
rename : browser/components/payments/content/paymentDialogWrapper.xhtml => browser/components/payments/content/paymentDialogWrapper.xul
extra : rebase_source : 98bdde63ee1bcc1ffcdd8db6cd61962edefb6348
2018-05-10 22:05:04 -07:00
Kris Maglione
a259026c9d Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY

--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
2018-04-22 20:55:06 -07:00