Граф коммитов

57 Коммитов

Автор SHA1 Сообщение Дата
Cameron McCormack d02e54b79b Bug 1430014 - Part 5: Stop building old style system classes when MOZ_OLD_STYLE is not defined. r=xidorn
MozReview-Commit-ID: CIHyPdF7Exl

--HG--
extra : source : 78a2fc781eead47af3923efcde58569c5d882ab1
2018-02-01 15:04:04 +11: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
Eden Chuang 6b14fc7125 Bug 1403079 - Add mAllowPaymentRequest and related methods on nsIDocument to check if PaymentRequest API is allowed to use. r=smaug
Add a new member mAllowPaymentRequest on nsIDocument and following related
methods,
  bool AllowPaymentRequest() const
  void SetAllowPaymentRequest(bool aAllowPaymentRequest)
mAllowPaymentRequest is used to check if PaymentRequest is allowed to use on
the document. According to the spec
  https://html.spec.whatwg.org/multipage/iframe-embed-object.html#allowed-to-use
the mAllowPaymentRequest should be true under following situations
  1. The document is the top level content document.
  2. The document is the same origin with its parent document and its parent
     document's mAllowPaymentRequest is true.
  3. The document is different origin with its parent document but its
     parent node is an iframe with allowpaymentrequest flag and the parent
     document's mAllowPaymentRquest is true.

This patch also include following mochitests
  1. test for allowpaymentrequest flag changing. The flag change effect should
     not be applied to the document immediately, it should be updated while
     the browsing context is updated.
  2. test for effect propagation in the nested iframe.
2017-10-19 15:56:51 +08:00
Andrew McCreight 298aa82710 Bug 1412125, part 2 - Fix dom/ mode lines. r=qdot
This was automatically generated by the script modeline.py.

MozReview-Commit-ID: BgulzkGteAL

--HG--
extra : rebase_source : a4b9d16a4c06c4e85d7d85f485221b1e4ebdfede
2017-10-26 15:08:41 -07:00
Eden Chuang 8eaa630afe Bug 1408250 - Don't expose PaymentRequest API in non-e10s. r=baku
1. PaymentRequest::PrefEnabled() returns false under non-e10s situation.
2. Add a new mochitest test_block_none10s.html to expect to get ReferenceError
   in non-e10s mode.
2017-10-20 00:10:25 +08:00
Masatoshi Kimura dbd92543c6 Bug 1313150 - Remove |weak| parameter from nsIMutableArray methods. r=froydnj
MozReview-Commit-ID: 7JoD4VYzZp3

--HG--
extra : rebase_source : 5db437f1c34608aa223916874d62b48c59baeae8
2017-10-21 23:53:02 +09:00
Eden Chuang 3d2f4c7cfc Bug 1403080 - Return null DOMString while PaymentOptions.requestShipping is false. r=baku
--HG--
extra : rebase_source : ec5f87928253c69d834f2a7a9a0c9b3b1f523c45
2017-09-28 15:20:19 +08:00
Eden Chuang f04fc2e524 Bug 1389418 - Mochitest for payment method identifier validation support in PaymentRequest API. r=baku
1. Test PaymentRequest construction with valid PMIs.
2. Test PaymentRequest construction with Invalid PMIs.
3. Test PaymentRequestUpdateEvent::updateWith with a valid PMI.
4. Test PaymentRequestUpdateEvent::updateWith with a invalid PMI.

Remove unnecessary html tags in html files.
2017-09-11 11:10:10 +08:00
Eden Chuang 150de62804 Bug 1389418 - Support payment method identifier validation in PaymentRequest API. r=baku
This patch implements payment method identifier validation algorithm
according to the spec https://w3c.github.io/payment-method-id/.

The steps to validate a payment method identifier with a string pmi are
given by the following algorithm. It returns true if the pmi is valid.

1. Let url be the result of running the basic URL parser with pmi.
2. If url is failure, validate a standardized payment method identifier with
   pmi and return the result.
3. Otherwise, validate a URL-based payment method identifier passing url and
   return the result.
2017-09-11 09:52:24 +08:00
Eden Chuang 62b089b5ed Bug 1398991 - Mochitest for spec change on PaymentRequest.shippingOption. r=baku
This patch changes the test_construction.html with following modification.
1. Modify the test testWithDuplicateShippingOptionsParameters to expect a
   TypeError when constructing wiht duplicate shippingOption ids.
2. Add test testShippingOtpionAttribute for shippingOption setting checking
   with following conditions
   1. No selected shippingOption and PaymentOptions.requestShipping is false
   2. One selected shippingOption and PaymentOptions.requestShipping is false
   3. One selected shippingOption and PaymentOptions.requestShipping is true
   4. Multiple selected shippingOptions and PaymentOptions.requestShipping is
      true.
2017-09-15 14:20:05 +08:00
Eden Chuang a15d19dc9d Bug 1398991 - Set PaymentRequest.ShippingOption only if options.requestShipping is true. r=baku
This patch implements the following changes according to the spec change.
See https://w3c.github.io/payment-request/#constructor step 8 for more
details.

1. Return TypeError during PaymentRequest construction with duplicate
   shippingOption id.
2. Set PaymentRequest.shippingOption with the selected shippingOption only
   if options.requestShipping is true.
2017-09-15 14:19:52 +08:00
Eden Chuang 066f794bbc Bug 1388661 - Mochitest for PaymentRequest API currency amount validation. r=baku
1. Create a new test test_currency_amount_validation.html to test validation
       with following scenarios
       * test with well formed currency codes.
       * test with invalid currency codes.
       * test with valid lower case currency codes and check is it converted to
         upper case.
       * test with invalid currency codes while calling
         PaymentRequestUpdateEvent::updateWith().
       * test with invalid amount value with calling
         PaymentRequestUpdateEvent::updateWith().
    2. Move tests of test_validate_decimal_value.html to
       test_currency_amount_validation.html
2017-09-06 14:38:33 +08:00
Eden Chuang 2638e37728 Bug 1388661 - Support currency validation in PaymentRequet API. r=baku
This patch implements currency validation algorithm according to the spec
    https://w3c.github.io/payment-request/#validity-checkers.

    1. amount.currencySystem must be "urn:iso:std:iso:4217".
    2. amount.currency is valid with following criteria
       1. The currency length must be 3.
       2. The currency contains any character that must be in the range "A" to
          "Z"(U+0041 to U+005A) or the range "a" to "z"(U+0061 to U+007A).

    According to the spec, converting the currency to upper case and save it in
    nsIPaymentRequest.
2017-09-06 14:36:24 +08:00
Andrew McCreight 78807d8776 Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv
Replace it with NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION, because it
has been the same for a while.

MozReview-Commit-ID: 5agRGFyUry1

--HG--
extra : rebase_source : 5388c56b2f6905c6ef969150f0c5b77bf247624d
2017-08-29 16:02:48 -07:00
Eden Chuang e87f1be933 Bug 1385187 - Mochitest for rejecting PaymentRequest.show() with NotSupportedError DOMException if no supported method. r=baku
Adding a new test testCannotMakePaymentShow() to test the implementation.
2017-08-21 11:35:58 +08:00
Eden Chuang af95d86b7f Bug 1385187 - Reject PaymentRequest.show() with NotSupportedError DOMException if no supported method. r=baku
1. Create a new action response status PAYMENT_NOTSUPPORTED and get rid of
   unnecessary method isAccpeted() from nsIPaymentActionResponse.idl.
2. Create canMakePayment() in PaymentRequestService and run it before
   launching UI. If canMakePayment() returns false, send PAYMENT_NOTSUPPORTED
   back to content process.
3. If chrome process returns PAYMENT_NOTSUPPORTED when calling showPayment(),
   throw NotSupportedError DOMException to merchant side.
2017-08-28 11:55:59 +08:00
Eden Chuang 608ad8a775 Bug 1387385 - Remove all nsIJSON usage in PaymentRequestUtils.cpp. r=baku
Instead of using nsIJSON, directly calling JS_Stringify and JS_ParseJSON for
JSON object serialization/deserialization.
2017-08-09 17:25:02 +08:00
Eden Chuang 283e59c25e Bug 1383293 - Mochitest for testing the new readonly attribute topLevelPrincipal in nsIPaymentRequest. r=baku
1. Adding new checks in ConstructorChromeScript.js to checking the top level
   document's principal information.
2. Adding a new test testCrossOriginTopLevelPrincipal in
   test_constructor.html to testing the topLevelPrincipal attribute under
   cross origin situation.
3. Removing some useless mochitest browser-chrome testcase.
2017-08-23 15:23:18 +08:00
Eden Chuang 34196fb87f Bug 1383293 - Add a new readonly attribute topLevelPrincipal in nsIPaymentRequest for UI support. r=baku
Getting the top level document's principal when constructing PaymentRequest,
then sending it to chrome process and saving it in nsIPaymentRequest.
Creating a new readonly attribute nsIPrincipal topLevelPrincipal in
nsIPaymentRequest for UI to query the top level document's principal
information.
2017-08-23 14:26:51 +08:00
Eden Chuang 97081209f0 Bug 1390737 - Run test_canMakePayment.html in nightly build only because it depends on nightly only UI service. r=btian 2017-08-16 12:53:25 +08:00
Eden Chuang d66800c204 Bug 1390018 - Build and test Payments UI code on Nightly builds only. r=MattN
--HG--
extra : source : 8df491f3dcdfa4430bccac3242ee9cfb9fa3634b
2017-08-16 07:16:25 +08:00
Ryan VanderMeulen 629d98cad7 Backed out changeset 8df491f3dcdf for landing with the wrong bug number in the commit message. 2017-08-15 19:27:16 -04:00
Eden Chuang a86c240986 Bug 1380018 - Build and test Payments UI code on Nightly builds only. r=MattN
--HG--
extra : rebase_source : 50f99532eefea866b67c7455dab4e430a9f09dfa
2017-08-16 07:16:25 +08:00
Masatoshi Kimura dec070e4cf Bug 1389460 - Remove @deprecated nsIDOMEventTarget.DispatchDOMEvent. r=smaug
MozReview-Commit-ID: E88DZK5sfwx

--HG--
extra : rebase_source : 64e1a47c9366a970f20ec459dde9b379a207e802
2017-08-07 02:28:52 +09:00
Sebastian Hengst b3269bec34 Backed out changeset 685802013f43 (bug 1389460) for OS X bustage at widget/cocoa/nsMenuX.mm:364: no member named 'DispatchDOMEvent' in 'nsIContent'. r=backout 2017-08-11 17:46:42 +02:00
Masatoshi Kimura 58d29db70b Bug 1389460 - Remove @deprecated nsIDOMEventTarget.DispatchDOMEvent. r=smaug
MozReview-Commit-ID: E88DZK5sfwx

--HG--
extra : rebase_source : 63300d87c0496394d3f75cb76bc47c75d640d369
2017-08-07 02:28:52 +09:00
Eden Chuang 0e6944b975 Bug 1382092 - Mochitest for supporting default payment UI in DOM code. r=baku
--HG--
extra : rebase_source : 0323538ef3a6e102d7af9f1bdab7f8fea63fd096
2017-07-24 17:18:27 +08:00
Eden Chuang 1bc5cd0145 Bug 1382092 - Support default payment UI service in DOM code part 2. r=baku
--HG--
extra : rebase_source : e0ac34360b83bd5929063ae1dd9616f4071f025e
2017-08-04 17:24:59 +08:00
Eden Chuang fd842f1863 Bug 1375345 - Mochitests for basic card payment implementation. r=baku
--HG--
extra : rebase_source : 7a995f0276950af7b2dda2b3a5ea53e7174831a4
2017-07-24 17:17:03 +08:00
Eden Chuang 4a1f15b449 Bug 1375345 - Basic card payment implementation. r=baku
--HG--
extra : rebase_source : d581a1e117bdfc041940911487187620c5ed35ff
2017-07-26 16:07:07 +08:00
Eden Chuang 3aa4930b7a Bug 1379892 - Reject PaymentRequest.show() with AbortError DOMException if a request is showing. r=baku 2017-07-25 15:39:39 +08:00
Alphan Chen 126b75ecd5 Bug 1318988 - Implement allowPaymentRequest on iframe. r=baku
--HG--
extra : rebase_source : 976b3449ec72d01004323706414e3b26c653aaec
2017-07-18 10:16:28 +08:00
btian c150a6ca01 Bug 1379925 - Part 2: Revise method |updateWith| based on spec change. r=baku
MozReview-Commit-ID: FpTGFlMvl0S
2017-07-14 09:56:33 +08:00
btian 68dea23805 Bug 1379925 - Part 1: Set PaymentRequestUpdateEvent.mRequest only when event target is a PaymentRequest. r=baku
MozReview-Commit-ID: AW9SDdL2uAd
2017-07-14 14:58:27 +08:00
btian b484c82423 Bug 1380552 - Do not override method |IsTrusted| in PaymentRequestUpdateEvent. r=baku
MozReview-Commit-ID: C1DoziVe6F0
2017-07-13 11:48:58 +08:00
btian afe249ca70 Bug 1380211 - Remove {} from generated id of payment request. r=baku
MozReview-Commit-ID: CtGHqxkk8X8
2017-07-12 09:24:07 +08:00
Jocelyn Liu ffb43e0faf Bug 1367694 - Mochitest for resetting details.shippingOptions when there are duplicate option IDs. r=baku 2017-07-05 15:16:47 -07:00
Jocelyn Liu 809522fb3a Bug 1367694 - Set payment request's shippingOption and shippingType attributes when creating it. r=baku
Per spec, given details and options parameters of PaymentRequest constructor,
1) if details.shippingOptions exists and IDs of all shipping options are unique,
   request's shippingOption will be set to the last selected option's ID.
   Otherwise, set request's shippingOption to null.
2) if options.requestShipping is ture, set request's shippingType to
   options.shippingType. Otherwise, set request's shippingType to null.
2017-07-05 15:16:43 -07:00
Eden Chuang c3f02d3246 Bug 1376623 - PaymentMethodData.supportedMethods is now DOMString. r=baku 2017-07-01 01:17:12 +08:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Eden Chuang 0a91438f97 Bug 1318990 - Mochitest for PaymentRequestUpdateEvent and PaymentRequest API show(). r=baku 2017-06-23 17:15:58 +08:00
Eden Chuang 4282643952 Bug 1318990 - PaymentRequestUpdateEvent interface and PaymentRequest API onshippingaddress/optionchange implementation. r=baku 2017-06-23 17:15:51 +08:00
Alphan Chen 7836b08caf Bug 1367669 - [PaymentRequest API] Mochitest for validate a decimal monetary value. r=baku 2017-06-21 15:37:54 +08:00
Alphan Chen b89ef45eed Bug 1367669 - [PaymentRequest API] Revise the way to validate a decimal monetary value. r=baku 2017-06-21 13:23:24 +08:00
Florian Quèze 66f6d259bc Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Eden Chuang 332643e391 Bug 1345365 - Mochitest for PaymentRequest API canMakePayment() and abort(). r=baku
--HG--
extra : rebase_source : 9bac1eb8459104dd398f655d46f4c197d763d9ca
2017-06-13 14:43:18 +08:00