Chromium Code Reviews| 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 |
| + DOMString shippingType = "shipping"; |
|
please use gerrit instead
2016/09/18 16:54:56
I'm concerned about not using exactly the same wor
zino
2016/09/18 18:57:40
Okay, Thanks.
|
| }; |