WebKit Bugzilla
Attachment 340964 Details for
Bug 185860
: Remove currencySystem member in PaymentRequest API
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185860-20180522180912.patch (text/plain), 9.10 KB, created by
zino
on 2018-05-22 02:12:59 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zino
Created:
2018-05-22 02:12:59 PDT
Size:
9.10 KB
patch
obsolete
>Subversion Revision: 232014 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index ca4f7c9cfc33bf72693533396321bdba9fd137af..39ce7e9dacb728623537e4938de53c2320796694 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,27 @@ >+2018-05-22 Jinho Bang <zino@chromium.org> >+ >+ [PaymentRequest] Remove currencySystem member >+ https://bugs.webkit.org/show_bug.cgi?id=185860 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ After a long discussion, Web Payment Working Group decided to remove >+ the `currencySystem` member[1]. The currency code should be well-formed >+ 3-letter alphabetic code and is allowed even if that is not part of >+ the official ISO 4217 list. >+ >+ [1] https://github.com/w3c/payment-request/pull/694 >+ >+ Test: http/tests/inspector/paymentrequest/payment-request-internal-properties.https.html >+ >+ * Modules/paymentrequest/PaymentCurrencyAmount.h: >+ * Modules/paymentrequest/PaymentCurrencyAmount.idl: >+ * Modules/paymentrequest/PaymentRequest.cpp: >+ (WebCore::checkAndCanonicalizeAmount): >+ (WebCore::checkAndCanonicalizeTotal): >+ * inspector/WebInjectedScriptHost.cpp: >+ (WebCore::objectForPaymentCurrencyAmount): >+ > 2018-05-21 Alicia Boya GarcÃa <aboya@igalia.com> > > [MSE][GStreamer] Force segment.start = 0 after matroskademux >diff --git a/Source/WebCore/Modules/paymentrequest/PaymentCurrencyAmount.h b/Source/WebCore/Modules/paymentrequest/PaymentCurrencyAmount.h >index 4b5fb2c781f042a1b22af7a4c16721d082ec9455..63676e8f8b26085d014f6e29b0c51428d582c073 100644 >--- a/Source/WebCore/Modules/paymentrequest/PaymentCurrencyAmount.h >+++ b/Source/WebCore/Modules/paymentrequest/PaymentCurrencyAmount.h >@@ -34,7 +34,6 @@ namespace WebCore { > struct PaymentCurrencyAmount { > String currency; > String value; >- String currencySystem; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/Modules/paymentrequest/PaymentCurrencyAmount.idl b/Source/WebCore/Modules/paymentrequest/PaymentCurrencyAmount.idl >index 2e8eed18b5db76b28ed323a797058e61e9d6fce8..524e98313c21d1be058fdc5c888583ca540d463d 100644 >--- a/Source/WebCore/Modules/paymentrequest/PaymentCurrencyAmount.idl >+++ b/Source/WebCore/Modules/paymentrequest/PaymentCurrencyAmount.idl >@@ -28,6 +28,4 @@ > ] dictionary PaymentCurrencyAmount { > required DOMString currency; > required DOMString value; >- // Note: currencySystem is "at risk" of being removed! >- DOMString currencySystem = "urn:iso:std:iso:4217"; > }; >diff --git a/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp b/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp >index f11178f5dbcbc1f17c34c91a86eec81a949c0a63..b92cb2ea98c17f6d720e6cffde234b8144c9d969 100644 >--- a/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp >+++ b/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp >@@ -138,9 +138,6 @@ static bool isValidDecimalMonetaryValue(StringView value) > // https://www.w3.org/TR/payment-request/#dfn-check-and-canonicalize-amount > static ExceptionOr<void> checkAndCanonicalizeAmount(PaymentCurrencyAmount& amount) > { >- if (amount.currencySystem != "urn:iso:std:iso:4217") >- return { }; >- > if (!isWellFormedCurrencyCode(amount.currency)) > return Exception { RangeError, makeString("\"", amount.currency, "\" is not a valid currency code.") }; > >@@ -155,9 +152,6 @@ static ExceptionOr<void> checkAndCanonicalizeAmount(PaymentCurrencyAmount& amoun > // https://www.w3.org/TR/payment-request/#dfn-check-and-canonicalize-total > static ExceptionOr<void> checkAndCanonicalizeTotal(PaymentCurrencyAmount& total) > { >- if (total.currencySystem != "urn:iso:std:iso:4217") >- return { }; >- > auto exception = checkAndCanonicalizeAmount(total); > if (exception.hasException()) > return exception; >diff --git a/Source/WebCore/inspector/WebInjectedScriptHost.cpp b/Source/WebCore/inspector/WebInjectedScriptHost.cpp >index 9064b24a8b56e3a3c95dd92459e0b3cac5aa608c..2997d7d94c24e84678c1b56cc4028dd0d7b31759 100644 >--- a/Source/WebCore/inspector/WebInjectedScriptHost.cpp >+++ b/Source/WebCore/inspector/WebInjectedScriptHost.cpp >@@ -84,7 +84,6 @@ static JSObject* objectForPaymentCurrencyAmount(VM& vm, ExecState* exec, const P > auto* object = constructEmptyObject(exec); > object->putDirect(vm, Identifier::fromString(exec, "currency"), jsString(exec, paymentCurrencyAmount.currency)); > object->putDirect(vm, Identifier::fromString(exec, "value"), jsString(exec, paymentCurrencyAmount.value)); >- object->putDirect(vm, Identifier::fromString(exec, "currencySystem"), jsString(exec, paymentCurrencyAmount.currencySystem)); > return object; > } > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index e4bc3f0d7f9e685c0ff3a1ed81789cadf22daa6b..c1d4c39ca2d409210f6ea36d379d71a1b2431725 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2018-05-22 Jinho Bang <zino@chromium.org> >+ >+ [PaymentRequest] Remove currencySystem member >+ https://bugs.webkit.org/show_bug.cgi?id=185860 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * http/tests/inspector/paymentrequest/payment-request-internal-properties.https-expected.txt: >+ * http/tests/inspector/paymentrequest/payment-request-internal-properties.https.html: >+ > 2018-05-20 Emilio Cobos Ãlvarez <emilio@crisal.io> > > Update CSSOM WPT tests. >diff --git a/LayoutTests/http/tests/inspector/paymentrequest/payment-request-internal-properties.https-expected.txt b/LayoutTests/http/tests/inspector/paymentrequest/payment-request-internal-properties.https-expected.txt >index 7bd401caa8885eb454fcb43668cefd0267b2881d..e2c72c43a764567c9a7d1217b28c0c57b74495ee 100644 >--- a/LayoutTests/http/tests/inspector/paymentrequest/payment-request-internal-properties.https-expected.txt >+++ b/LayoutTests/http/tests/inspector/paymentrequest/payment-request-internal-properties.https-expected.txt >@@ -10,8 +10,7 @@ INTERNAL PROPERTY: details: { > "label": "Total", > "amount": { > "currency": "USD", >- "value": "99.00", >- "currencySystem": "<filtered>" >+ "value": "99.00" > }, > "pending": false > }, >@@ -20,8 +19,7 @@ INTERNAL PROPERTY: details: { > "label": "Item 1", > "amount": { > "currency": "USD", >- "value": "90.00", >- "currencySystem": "<filtered>" >+ "value": "90.00" > }, > "pending": false > }, >@@ -29,8 +27,7 @@ INTERNAL PROPERTY: details: { > "label": "Item 2", > "amount": { > "currency": "USD", >- "value": "90.00", >- "currencySystem": "<filtered>" >+ "value": "90.00" > }, > "pending": true > }, >@@ -38,8 +35,7 @@ INTERNAL PROPERTY: details: { > "label": "Item 3", > "amount": { > "currency": "USD", >- "value": "9.00", >- "currencySystem": "<filtered>" >+ "value": "9.00" > }, > "pending": false > } >@@ -50,8 +46,7 @@ INTERNAL PROPERTY: details: { > "label": "Shipping Label 1", > "amount": { > "currency": "USD", >- "value": "5.00", >- "currencySystem": "<filtered>" >+ "value": "5.00" > }, > "selected": false > }, >@@ -60,8 +55,7 @@ INTERNAL PROPERTY: details: { > "label": "Shipping Label 2", > "amount": { > "currency": "USD", >- "value": "10.00", >- "currencySystem": "<filtered>" >+ "value": "10.00" > }, > "selected": true > } >@@ -73,8 +67,7 @@ INTERNAL PROPERTY: details: { > "label": "Total", > "amount": { > "currency": "USD", >- "value": "99.00", >- "currencySystem": "<filtered>" >+ "value": "99.00" > }, > "pending": false > }, >@@ -99,8 +92,7 @@ INTERNAL PROPERTY: details: { > "label": "Total", > "amount": { > "currency": "USD", >- "value": "9.99", >- "currencySystem": "<filtered>" >+ "value": "9.99" > }, > "pending": false > }, >@@ -124,8 +116,7 @@ INTERNAL PROPERTY: details: { > "label": "Total", > "amount": { > "currency": "USD", >- "value": "9.99", >- "currencySystem": "<filtered>" >+ "value": "9.99" > }, > "pending": false > }, >@@ -149,8 +140,7 @@ INTERNAL PROPERTY: details: { > "label": "Total", > "amount": { > "currency": "USD", >- "value": "9.99", >- "currencySystem": "<filtered>" >+ "value": "9.99" > }, > "pending": false > }, >diff --git a/LayoutTests/http/tests/inspector/paymentrequest/payment-request-internal-properties.https.html b/LayoutTests/http/tests/inspector/paymentrequest/payment-request-internal-properties.https.html >index 35d86b9335f494aa1df2d3635bc821989a18c130..b7059717f95579e406716ec593b3198970f00d07 100644 >--- a/LayoutTests/http/tests/inspector/paymentrequest/payment-request-internal-properties.https.html >+++ b/LayoutTests/http/tests/inspector/paymentrequest/payment-request-internal-properties.https.html >@@ -112,8 +112,6 @@ function test() > return JSON.stringify(this, (key, value) => { > if (key === "id") > return "<filtered>"; >- if (key === "currencySystem") >- return "<filtered>"; > return value; > }, 2); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185860
: 340964