Changeset 232155 in webkit
- Timestamp:
- May 24, 2018 10:09:59 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r232144 r232155 1 2018-05-24 Jinho Bang <zino@chromium.org> 2 3 [PaymentRequest] Remove currencySystem member 4 https://bugs.webkit.org/show_bug.cgi?id=185860 5 6 Reviewed by Andy Estes. 7 8 * http/tests/inspector/paymentrequest/payment-request-internal-properties.https-expected.txt: 9 * http/tests/inspector/paymentrequest/payment-request-internal-properties.https.html: 10 1 11 2018-05-23 Chris Dumez <cdumez@apple.com> 2 12 -
trunk/LayoutTests/http/tests/inspector/paymentrequest/payment-request-internal-properties.https-expected.txt
r224606 r232155 11 11 "amount": { 12 12 "currency": "USD", 13 "value": "99.00", 14 "currencySystem": "<filtered>" 13 "value": "99.00" 15 14 }, 16 15 "pending": false … … 21 20 "amount": { 22 21 "currency": "USD", 23 "value": "90.00", 24 "currencySystem": "<filtered>" 22 "value": "90.00" 25 23 }, 26 24 "pending": false … … 30 28 "amount": { 31 29 "currency": "USD", 32 "value": "90.00", 33 "currencySystem": "<filtered>" 30 "value": "90.00" 34 31 }, 35 32 "pending": true … … 39 36 "amount": { 40 37 "currency": "USD", 41 "value": "9.00", 42 "currencySystem": "<filtered>" 38 "value": "9.00" 43 39 }, 44 40 "pending": false … … 51 47 "amount": { 52 48 "currency": "USD", 53 "value": "5.00", 54 "currencySystem": "<filtered>" 49 "value": "5.00" 55 50 }, 56 51 "selected": false … … 61 56 "amount": { 62 57 "currency": "USD", 63 "value": "10.00", 64 "currencySystem": "<filtered>" 58 "value": "10.00" 65 59 }, 66 60 "selected": true … … 74 68 "amount": { 75 69 "currency": "USD", 76 "value": "99.00", 77 "currencySystem": "<filtered>" 70 "value": "99.00" 78 71 }, 79 72 "pending": false … … 100 93 "amount": { 101 94 "currency": "USD", 102 "value": "9.99", 103 "currencySystem": "<filtered>" 95 "value": "9.99" 104 96 }, 105 97 "pending": false … … 125 117 "amount": { 126 118 "currency": "USD", 127 "value": "9.99", 128 "currencySystem": "<filtered>" 119 "value": "9.99" 129 120 }, 130 121 "pending": false … … 150 141 "amount": { 151 142 "currency": "USD", 152 "value": "9.99", 153 "currencySystem": "<filtered>" 143 "value": "9.99" 154 144 }, 155 145 "pending": false -
trunk/LayoutTests/http/tests/inspector/paymentrequest/payment-request-internal-properties.https.html
r225950 r232155 113 113 if (key === "id") 114 114 return "<filtered>"; 115 if (key === "currencySystem")116 return "<filtered>";117 115 return value; 118 116 }, 2); -
trunk/Source/WebCore/ChangeLog
r232154 r232155 1 2018-05-24 Jinho Bang <zino@chromium.org> 2 3 [PaymentRequest] Remove currencySystem member 4 https://bugs.webkit.org/show_bug.cgi?id=185860 5 6 Reviewed by Andy Estes. 7 8 After a long discussion, Web Payment Working Group decided to remove 9 the `currencySystem` member[1]. The currency code should be well-formed 10 3-letter alphabetic code and is allowed even if that is not part of 11 the official ISO 4217 list. 12 13 [1] https://github.com/w3c/payment-request/pull/694 14 15 Test: http/tests/inspector/paymentrequest/payment-request-internal-properties.https.html 16 17 * Modules/paymentrequest/PaymentCurrencyAmount.h: 18 * Modules/paymentrequest/PaymentCurrencyAmount.idl: 19 * Modules/paymentrequest/PaymentRequest.cpp: 20 (WebCore::checkAndCanonicalizeAmount): 21 (WebCore::checkAndCanonicalizeTotal): 22 * inspector/WebInjectedScriptHost.cpp: 23 (WebCore::objectForPaymentCurrencyAmount): 24 1 25 2018-05-24 Zalan Bujtas <zalan@apple.com> 2 26 -
trunk/Source/WebCore/Modules/paymentrequest/PaymentCurrencyAmount.h
r220955 r232155 35 35 String currency; 36 36 String value; 37 String currencySystem;38 37 }; 39 38 -
trunk/Source/WebCore/Modules/paymentrequest/PaymentCurrencyAmount.idl
r220955 r232155 29 29 required DOMString currency; 30 30 required DOMString value; 31 // Note: currencySystem is "at risk" of being removed!32 DOMString currencySystem = "urn:iso:std:iso:4217";33 31 }; -
trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp
r228331 r232155 139 139 static ExceptionOr<void> checkAndCanonicalizeAmount(PaymentCurrencyAmount& amount) 140 140 { 141 if (amount.currencySystem != "urn:iso:std:iso:4217")142 return { };143 144 141 if (!isWellFormedCurrencyCode(amount.currency)) 145 142 return Exception { RangeError, makeString("\"", amount.currency, "\" is not a valid currency code.") }; … … 156 153 static ExceptionOr<void> checkAndCanonicalizeTotal(PaymentCurrencyAmount& total) 157 154 { 158 if (total.currencySystem != "urn:iso:std:iso:4217")159 return { };160 161 155 auto exception = checkAndCanonicalizeAmount(total); 162 156 if (exception.hasException()) -
trunk/Source/WebCore/inspector/WebInjectedScriptHost.cpp
r229410 r232155 85 85 object->putDirect(vm, Identifier::fromString(exec, "currency"), jsString(exec, paymentCurrencyAmount.currency)); 86 86 object->putDirect(vm, Identifier::fromString(exec, "value"), jsString(exec, paymentCurrencyAmount.value)); 87 object->putDirect(vm, Identifier::fromString(exec, "currencySystem"), jsString(exec, paymentCurrencyAmount.currencySystem));88 87 return object; 89 88 }
Note: See TracChangeset
for help on using the changeset viewer.