Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(537)

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentOptions.idl

Issue 2351533002: PaymentRequest: Add support for shipping type. (in blink side) (Closed)
Patch Set: addressed comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/payments/PaymentOptions.idl
diff --git a/third_party/WebKit/Source/modules/payments/PaymentOptions.idl b/third_party/WebKit/Source/modules/payments/PaymentOptions.idl
index 2dd9b3910935ac8b3d0441e30125b5df453c18dd..3bff7c7315c04e5fddee43e140f7cd0ce84e495e 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentOptions.idl
+++ b/third_party/WebKit/Source/modules/payments/PaymentOptions.idl
@@ -4,10 +4,30 @@
// https://w3c.github.io/browser-payment-api/#paymentoptions-dictionary
+enum PaymentShippingType {
+ "shipping",
+ "delivery",
+ "pickup"
+};
+
[
RuntimeEnabled=PaymentRequest
] dictionary PaymentOptions {
boolean requestPayerEmail = false;
boolean requestPayerPhone = false;
boolean requestShipping = false;
+
+ // According to PaymentRequest constructor algorithm 22[1],
+ // if options.shippingType is not a valid PaymentShippingType value then
+ // set the shippingType attribute on request to 'shipping'.
+ // On the other hand, according to webidl spec[2], it causes a TypeError
+ // if passing a invalid enum value as operation argument. It means that the
+ // constructor can stop due to a exception that occured in binding side.
+ // In other words, the former is conflicting with the latter.
+ // So, use DOMString instead of PaymentShippingType for now until this
+ // spec issue is resolved. Please see: http://crbug.com/648052
+ //
+ // [1] https://w3c.github.io/browser-payment-api/#h-note5
+ // [2] http://heycam.github.io/webidl/#example-363ff014
please use gerrit instead 2016/09/20 08:32:16 These comments are no longer necessary. See https:
zino 2016/09/20 15:56:10 Done.
+ DOMString shippingType = "shipping";
};

Powered by Google App Engine
This is Rietveld 408576698