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

39 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
shindli 91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Gabriele Svelto ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Dorel Luca a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto bc9290f767 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-04 15:01:19 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Eden Chuang 931859451b Bug 1477117 - Part 2 - Add new IPC method for passing the changing method information. r=baku
1. Add a new method nsIPaymentRequestService::ChangePaymentMethod for UI to
       inform merchant the payment method is changed by user.
    2. Add a new method in PPaymentRequest.ipdl to passing the changing method
       information from chrome process to content process.
    3. Add BasicCardChangeDetails dictionary in BasicCardPayment.webidl
    4. Create ChangeDetails, GeneralDetails and BasicCardDetails for saving the
       the method information in content process.

--HG--
extra : histedit_source : 8426da9c1d070daa35623b3431341c13cb361aed
2018-11-27 14:05:00 +01:00
Eden Chuang 4dff78fca8 Bug 1477117 - Part 1 - Create new XPCOM interface for changing the payment method. r=baku
1. Add a new attribute nsIPaymentOptions.requestBillingAddress.
    2. Add new XPCOM interfaces MethodChangeDetails, GeneralChangeDetails and
       BasicCardMethodChangeDetails for passing the method change details from
       UI code.

--HG--
extra : histedit_source : 680bff71f0d8a9d9333a3699fcc6a4fd9630fe1b
2018-11-27 06:33:13 +01:00
arthur.iakab e36b9a7f34 Backed out 4 changesets (bug 1477117) for causing hazard build bustage on payments/PaymentRequest.cpp:1066 CLOSED TREE
Backed out changeset 3b473ca68a57 (bug 1477117)
Backed out changeset 8ffc94b44c3e (bug 1477117)
Backed out changeset ddaac3335514 (bug 1477117)
Backed out changeset 1809212f5f29 (bug 1477117)
2018-11-28 02:28:36 +02:00
Eden Chuang c9058620cb bug 1477117 - Part 2 - Add new IPC method for passing the changing method information. r=baku
1. Add a new method nsIPaymentRequestService::ChangePaymentMethod for UI to
       inform merchant the payment method is changed by user.
    2. Add a new method in PPaymentRequest.ipdl to passing the changing method
       information from chrome process to content process.
    3. Add BasicCardChangeDetails dictionary in BasicCardPayment.webidl
    4. Create ChangeDetails, GeneralDetails and BasicCardDetails for saving the
       the method information in content process.
2018-11-27 14:05:00 +01:00
Eden Chuang 3c1d7e9139 bug 1477117 - Part 1 - Create new XPCOM interface for changing the payment method. r=baku
1. Add a new attribute nsIPaymentOptions.requestBillingAddress.
    2. Add new XPCOM interfaces MethodChangeDetails, GeneralChangeDetails and
       BasicCardMethodChangeDetails for passing the method change details from
       UI code.
2018-11-27 06:33:13 +01:00
Diego Pino Garcia f1008b35ec Bug 1509147 - Rename payer and paymentMethod on nsIPaymentDetails to payerErrors and paymentMethodErrors respectively r=baku 2018-11-26 03:08:00 +02:00
Eden Chuang 7020e04316 bug 1477409 - Part 1 - Instead of passing tabId, passing outerWindowId to Payment UI component. r=baku
--HG--
extra : histedit_source : 5480494582d1de6bcdac2ff295815d3182909697
2018-11-06 14:42:36 +01:00
Marcos Cáceres 6de37261e9 Bug 1497699 - Drop support for PaymentItem.type. r=edenchuang,baku
Being removed from the spec. Front-end no longer needs this.

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

--HG--
extra : moz-landing-system : lando
2018-10-16 12:53:01 +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
Marcos Cáceres 70744c3261 Bug 1495335 - Rename PayerErrorFields to PayerErrors. r=baku 2018-10-01 03:44:00 -04:00
Eden Chuang fedf18933b Bug 1490698 - Add state checking when interactive with PaymentRequest through PaymentRequestService. r=edenchuang
Add state checking when calling RespondPayment(), ChangeShippingAddress()
    and ChangeShippingOption().
    Calling ChangeShippingXXX is valid when the PaymentRequest state is interactive.
    Calling RespondPayment is valid when following situations
      1. PaymentRequest state is interactive
      2. PaymentRequest state is closed but the response is for CompleteAction.
      3. PaymentRequest state is created but the response is for CanMakeAction.

--HG--
extra : histedit_source : 9ae63e409813154de42cc33024835ac5f0c96893
2018-09-13 15:40:18 +02:00
Eden Chuang c5ec825b8f Bug 1435161 - Part 3 support error fields in PaymentDetailsUpdate. r=baku
To support merchants providing the payment details with errors by
    PaymentRequestUpdateEvent.updateWith() during PaymentResponse.retry(),
    PaymentDetailsUpdate needs to add more two attributes in webidl.
      dictionary PaymentDetailsUpdate {
        ...
        PayerErrorFields payerErrors;
        object           paymentMethodErrors;
      };
    And transfer these error field to UI component
2018-09-04 16:00:33 +02:00
Eden Chuang 7058aae68b Bug 1435161 - Part 2 supporting PaymentResponse.retry(). r=baku
1. Add PaymentValidationErrors and PayerErrorFields in PaymentRequest.webidl
       and PaymentResponse.retry() in PaymentResponse.webidl
    2. Implement PaymentRequest.retryPayment() and
       PaymentRequestManager.retryPayment() in content process.
    3. Add IPCPaymentRetryActionRequest in PPaymentRequest.ipdl to transfer the
       error fields to chrome process.
    4. Implement PaymentResponse.retry() by reusing the code of show() and
       updateWith() of PaymentRequestService in chrome process.
2018-09-04 12:28:40 +02:00
Eden Chuang 92d58a1b87 Bug 1435161 - Part 1 Removing unnecessary XPCOM components for PaymentRequest API. r=baku
Remove the unnecessary XPCOM component nsIPaymentActionRequest and
    nsIPaymentActionCallback. These two components are only used in C++ and they
    need not to expose to the front end.
2018-08-30 14:13:33 +02: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
Marcos Cáceres 8f0ff24be1 Bug 1480872 - paymentDetails attributes should default to an empty arrays. r=edenchuang 2018-08-19 19:11:00 +03:00
Blake Kaplan 40ee64ba85 Bug 1442453 - Fix nits and get rid of needless QIs. r=baku
This removes some hard tabs that crept in and combines two if branches into a
single statement in order to avoid a bit of duplication.

The existing code here seems to treat any sort of upcast as needing a QI. That
is needlessly wasteful and causes a bunch of unneeded virtual calls.

MozReview-Commit-ID: 7WshYm9C4Xb

--HG--
extra : rebase_source : bc7b1b5157324158f627efd8dff54f078488f4fc
2018-05-30 14:13:07 -07:00
Eden Chuang 029423a6e2 Bug 1435157 - Support AddressErrors in WebPayment. r=baku.
1. Add AddressErrors in PaymentRequest.webidl.
    2. IPC for passing AddressErrors.
    3. Getters for AddressErrors in nsIPaymentDetails.

--HG--
extra : rebase_source : 64c57003d57e064b5284cc64447c0c0740f16121
2018-05-17 19:59:16 +08:00
Eden Chuang b206167b93 Bug 1440041 - Add a new readonly attribute nsIPaymentRequest.shippingOption. r=baku. 2018-04-13 18:47:20 -07:00
Eden Chuang 1ec4751b5b Bug 1443914 - Force updating PaymentDetails when requestShipping is true. r=baku
Update the implementation according to the spec update.
Force updating the saved PaymentDetails when requestShipping is true, even
the data(shippingOptions) doesn't present in the DetailsUpdate.

--HG--
extra : histedit_source : b0a1c0b9cc7efe045ce330432b60bb6f86eb1878
2018-03-29 23:09:52 +08:00
Jared Wein 3fa24ba667 Bug 1441683 - response.complete() should make the completeStatus available to the payment UI service. r=baku
MozReview-Commit-ID: TnszpuqAa

--HG--
extra : rebase_source : 81c53e6db13c49f85c1716598107c06129ec8d21
2018-03-13 10:30:08 -04:00
Henri Sivonen 44e4383f36 Bug 1432079 - Implement PaymentItemType. r=baku
MozReview-Commit-ID: Jpj9arQ9MaE

--HG--
extra : rebase_source : 75dff1a752b2f85b162e6cfbc67fd563cee12993
2018-02-28 15:00:05 +02: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
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 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
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 4a1f15b449 Bug 1375345 - Basic card payment implementation. r=baku
--HG--
extra : rebase_source : d581a1e117bdfc041940911487187620c5ed35ff
2017-07-26 16:07:07 +08:00
Eden Chuang c3f02d3246 Bug 1376623 - PaymentMethodData.supportedMethods is now DOMString. r=baku 2017-07-01 01:17:12 +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
Eden Chuang 68cf4559f8 Bug 1345361 - PaymentRequest constructor implementation. r=baku 2017-05-26 01:50:32 +08:00
Ryan VanderMeulen df9dd3967c Backed out changeset 437d6df1859c (bug 1345361) for ESLint failures. 2017-05-25 18:05:15 -04:00
Eden Chuang 80717194b1 Bug 1345361 - PaymentRequest constructor implementation. r=baku 2017-05-26 01:50:32 +08:00