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

53 Коммитов

Автор SHA1 Сообщение Дата
Christian Holler cd7a74b452 Bug 1499041 - Remove libFuzzer flags from ipc/chromium/. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D39165

--HG--
extra : moz-landing-system : lando
2019-07-24 14:13:30 +00:00
Sebastian Streich 8ac88db494 Bug 1444503 - Remove the IPC::Principal r=ckerschb,nika
***
Removed IPC References in PCContent
***
Removed IPC References on nsContentPermissionHelper
***
 Remove IPC Principal from PBrowser
***
Remove IPCPrincipal from the PaymentRequest
***
Remove IPCPrincipal from the PPresentation
***
Remove IPC Principal from PNecko

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

--HG--
extra : moz-landing-system : lando
2019-04-25 14:18:11 +00:00
Sylvestre Ledru 03c8e8c2dd Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-05 21:41:42 +00:00
Csoregi Natalia ba58e936bd Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru d1c1878603 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 21:36:16 +00:00
Narcis Beleuzu 24dbe577a5 Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru 399dbd28fe Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Alex Gaynor 0f01791ffc Bug 1512990 - Part 4 - remove declarations of Recv/Answer methods from IPDL protocol base class; r=froydnj
For cases where the class has direct calls (that is, we cast `this` to the
subclass before making the call) no longer declare Recv/Answer methods on the
base class at all. This should ensure that slots for them are not generated in
vtables, and also allow the derived class to choose the method signature (e.g.
whether it wants to take something by reference or by value).

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

--HG--
extra : moz-landing-system : lando
2019-02-06 15:58:43 +00:00
Alex Gaynor 75c7d1fa76 Bug 1512990 - Part 2 - implement direct calls in the IPDL compiler; r=froydnj
When calling a Recv/Alloc/Dealloc method on most types, cast `this` to the
derived class.

There is a heuristic to figure out what the correct derived type is. There is a
blacklist of types which we can't do direct calls on for the moment, as well as
an override for types that do work with direct calls but which don't match the
heuristic.

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

--HG--
extra : moz-landing-system : lando
2019-02-06 15:57:37 +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
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 974f7da95a bug 1501823 - Force to call PaymentUIService.showPayment() when PaymentRequest.show called with a promise parameter. r=baku
1. Adding a new completeStatus 'initial' for nsIPaymentRequest.completeStatus
       to indicate the status of the showing PaymentRequest for Payment UI component.
    2. Removing the PaymentRequest::mDeferredShow and calling
       PaymentRequestManager::showPayment() when PaymentRequest::Show() called
       with a detailsUpdate parameter to inform UI component to support better
       user experience.
2018-11-21 11:03:21 +01: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
Eden Chuang 74e578d048 Bug 1497215 - Refactor the IPC structure for PaymentResponse.details r=baku
In original design, payment method response data is passed between processes
    through a simple nsString. It means a special encoder/decoder is needed for
    special response data, ex. BasicCardResponse, to serialize/deserialize
    into/from the nsString. However, when a token spliter, ':', ';' and '@', is
    used in response data, it makes the encoder/decoder can not work normally.
    It is hard to define a suitable token spliter set for encoder/decoder.
    So instead of using an error-prone encoder/decoder, this patch defining a new
    IPC structure for response data.

--HG--
extra : rebase_source : 4972033516bc861ea3f975a27b7688fc6eb89a94
2018-10-29 13:56:32 +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 f616da00ba Bug 1472026 - Implement PaymentResponse.prototype.onpayerdetailchange. r=edenchuang,baku
Implement PaymentResponse.prototype.onpayerdetailchange, per spec.

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

--HG--
extra : moz-landing-system : lando
2018-09-19 11:23:33 +00:00
shindli 70bf79757d Backed out changeset 376c2bf5bcbf (bug 1472026) for PaymentRequest failures in dom/payments/test/test_block_none10s.html 2018-09-19 12:31:51 +03:00
Marcos Cáceres 9dd1b3aeae Bug 1472026 - Implement PaymentResponse.prototype.onpayerdetailchange. r=edenchuang,baku
Implement PaymentResponse.prototype.onpayerdetailchange, per spec.

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

--HG--
extra : moz-landing-system : lando
2018-09-19 08:41:53 +00: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
Eden Chuang 68bb5bfa3c Bug 1483470 - Handling PaymentRequestService::RespondPayment() to a closed PaymentRequest. r=baku
1. Returning NS_ERROR_FAILURE in PaymentRequestService::RespondPayment() when
       the specified PaymentRequest does not exist in PaymentRequestService.
    2. Renaming "cleanup" to "close" in DOM::WebPayment codes to fit the actual
       behavior.
2018-08-16 14:27:24 +02: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
Eden Chuang b4cd2e70aa Bug 1408234 - Cleanup the PaymentRequests when document close. r=baku
Let PaymentRequest inherit from nsIDocumentActivity interface.
    Calling RegisterActivityObserver() and UnregisterActivityObserver() in
    constructor and destructor to get activity notifications from document.
    When receiving the notification, NotifyOwnerDocumentActivityChanged() will
    check the owner document's activity status. If the status is disabled, calling
    PaymentRequestManager::CleanupPayment() to cleanup the PaymentRequest in
    content process and aslo sending the cleanup information to chrome process.
2018-08-13 11:24:54 +02:00
Blake Kaplan 37c3abfe24 Bug 1470110 - Consistently disable payments off of Nightly. r=MattN
We only build the frontend parts of Web Payments on Nightly, but users could
futz with the prefs and expose the DOM API on Beta. We should be careful about
not allowing that mismatch.

This also adds some additional logging if we run into a bug like this again.

MozReview-Commit-ID: 9qcQTIsIHkg

--HG--
extra : rebase_source : cdaed71d79e6f8cedd1229ffd03cac21e3660367
2018-06-22 12:05:36 -07:00
Blake Kaplan 7616406bb3 Bug 1469433 - Remove an unused function. r=smaug
This was just sitting around.

MozReview-Commit-ID: 282neafD23x

--HG--
extra : rebase_source : 9f7257f9bebc8e063dd2ef2aca9bf0fa9c8300c0
2018-06-19 15:58:37 -07:00
Blake Kaplan 2597785450 Bug 1469433 - Handle shutdown more gracefully. r=smaug
If we end up shutting down the content process while there's a request active
we'll end up "leaking" the request and asserting. This makes sure that we
let go of the PaymentRequest in that edge case. I can cause this by forceably
closing the payment request window on Linux without hitting OK or cancel.

MozReview-Commit-ID: 6XDYIcqNkC6

--HG--
extra : rebase_source : d20d8fae4aa4fc3afcca8491d415c64b8af8bcb4
2018-06-19 15:55:32 -07:00
Blake Kaplan dfb2d7b714 Bug 1442453 - Pass objects around instead of string IDs in the child. r=baku
The existing code only passed strings around to identify PaymentRequest
objects. That meant that we were constantly having to do hashtable lookups to
find the corresponding object. This patch just uses the single map that IPDL
maintains for us and passes objects around, obviating the need for more
hashtable lookups.

MozReview-Commit-ID: 6BBonrc6q4x

--HG--
extra : rebase_source : 041c6ce742d60a2c9e954a58582d09cd9ef7f2b1
2018-05-31 16:20:51 -07:00
Blake Kaplan 49d7053a3e Bug 1442453 - Create a single IPC actor per PaymentRequest. r=baku
There isn't any need to create an actor per call to the parent. This patch
lines up PaymentRequest with PPaymentRequestChild objects and links them
together. It also simplifies the maps and arrays we use to keep track of these
objects.

There's one tricky bit to note in this patch: in the case that a promise is
passed to paymentRequest.show(), we don't notify the parent process until the
promise resolves (when we call either UpdatePayment or AbortUpdate). In that
case, I needed to distinguish between an "update" because of the promise
resolving or a call to updateWith on an shippingaddresschange event in order
to get the bookkeeping right with the mActivePayments hashtable. In that case,
the PaymentRequest is kept alive by mShowingRequest alone. In all other cases,
mActivePayments keeps the PaymentRequest alive until we resolve or reject the
correct promise.

MozReview-Commit-ID: HoHjn8eqC4T

--HG--
extra : rebase_source : 4da1d65d1f791f4a5c18871ab3a3dcf94e833b90
2018-05-31 13:30:29 -07: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
Blake Kaplan 5251fffd6b Bug 1442453 - Fix a typo in this member name. r=baku
MozReview-Commit-ID: Ds7yRFn04NK

--HG--
extra : rebase_source : 76fbce0f2599dec30f6a07bb7044e5446abcbf65
2018-05-30 14:05:42 -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
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 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 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 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 4282643952 Bug 1318990 - PaymentRequestUpdateEvent interface and PaymentRequest API onshippingaddress/optionchange implementation. r=baku 2017-06-23 17:15:51 +08:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Eden Chuang 084d3f703e Bug 1345365 - PaymentRequest API canMakePayment(), abort() and show() implementation. r=baku
--HG--
extra : rebase_source : 09ea762ee2af888f090817617545c7cf7a15f1a9
2017-06-14 15:59:00 +08:00
Wes Kocher 1c6a87f4be Backed out 2 changesets (bug 1345365) for frequent failures in test_data.html a=backout
Backed out changeset 0ea7a5deacf6 (bug 1345365)
Backed out changeset bba1dee06769 (bug 1345365)

MozReview-Commit-ID: KURUgnesr8B
2017-06-15 00:52:04 -07:00
Eden Chuang 5b3b71aae6 Bug 1345365 - PaymentRequest API canMakePayment(), abort() and show() implementation. r=baku
--HG--
extra : rebase_source : 1471c9b98cd919d411b22426c55bc3159d4d2f00
2017-06-14 15:59:00 +08:00