[Payment Request] Remove PaymentAddress.languageCode
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Sep 2018 04:25:11 +0000 (04:25 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Sep 2018 04:25:11 +0000 (04:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=189254

Reviewed by Sam Weinig.

Source/WebCore:

PaymentAddress.languageCode is marked as "at risk" in the latest Payment Request Editor's
Draft (30 August 2018). Firefox has already removed it, and Chrome is considering it.

There is some compatibility risk in removing this attribute, but considering we never
populated it with a meaningful value, the risk seems very low. If we learn about
compatibility problems, we can address them by evangelising or even reverting this change.

Updated existing tests.

* Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
(WebCore::convert):
* Modules/paymentrequest/PaymentAddress.cpp:
(WebCore::PaymentAddress::PaymentAddress):
* Modules/paymentrequest/PaymentAddress.h:
* Modules/paymentrequest/PaymentAddress.idl:

LayoutTests:

* http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https.html:
* http/tests/ssl/applepay/ApplePayRequestShippingContact.https-expected.txt:
* http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235607 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https.html
LayoutTests/http/tests/ssl/applepay/ApplePayRequestShippingContact.https-expected.txt
LayoutTests/http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html
Source/WebCore/ChangeLog
Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp
Source/WebCore/Modules/paymentrequest/PaymentAddress.cpp
Source/WebCore/Modules/paymentrequest/PaymentAddress.h
Source/WebCore/Modules/paymentrequest/PaymentAddress.idl

index c7e999d..68e3ad2 100644 (file)
@@ -1,3 +1,14 @@
+2018-09-03  Andy Estes  <aestes@apple.com>
+
+        [Payment Request] Remove PaymentAddress.languageCode
+        https://bugs.webkit.org/show_bug.cgi?id=189254
+
+        Reviewed by Sam Weinig.
+
+        * http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https.html:
+        * http/tests/ssl/applepay/ApplePayRequestShippingContact.https-expected.txt:
+        * http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html:
+
 2018-09-03  Youenn Fablet  <youenn@apple.com>
 
         REGRESSION: Layout Test http/tests/security/bypassing-cors-checks-for-extension-urls.html is Flaky
index 0646caa..6f8293a 100644 (file)
@@ -83,7 +83,6 @@ function runTest(button, expected = {}) {
         dependentLocality: '',
         postalCode: address.postalCode,
         sortingCode: '',
-        languageCode: '',
         organization: '',
         recipient: address.localizedName,
         phone: address.phoneNumber,
index 6d15a44..2e87a3c 100644 (file)
@@ -26,7 +26,6 @@ PASS paymentResponse.shippingAddress.dependentLocality is expectedSubLocality
 PASS paymentResponse.shippingAddress.postalCode is expectedPostalCode
 PASS paymentResponse.shippingAddress.postalCode is expectedPostalCode
 PASS paymentResponse.shippingAddress.sortingCode is ''
-PASS paymentResponse.shippingAddress.languageCode is ''
 PASS paymentResponse.shippingAddress.organization is ''
 PASS paymentResponse.shippingAddress.recipient is expectedName
 PASS paymentResponse.shippingAddress.phone is expectedPhoneNumber
index 8b3fb24..33e2089 100644 (file)
@@ -114,7 +114,6 @@ async function runTests() {
                 shouldBe("paymentResponse.shippingAddress.postalCode", "expectedPostalCode");
                 shouldBe("paymentResponse.shippingAddress.postalCode", "expectedPostalCode");
                 shouldBe("paymentResponse.shippingAddress.sortingCode", "''");
-                shouldBe("paymentResponse.shippingAddress.languageCode", "''");
                 shouldBe("paymentResponse.shippingAddress.organization", "''");
                 shouldBe("paymentResponse.shippingAddress.recipient", "expectedName");
                 shouldBe("paymentResponse.shippingAddress.phone", "expectedPhoneNumber");
index 196d499..3142310 100644 (file)
@@ -1,5 +1,28 @@
 2018-09-03  Andy Estes  <aestes@apple.com>
 
+        [Payment Request] Remove PaymentAddress.languageCode
+        https://bugs.webkit.org/show_bug.cgi?id=189254
+
+        Reviewed by Sam Weinig.
+
+        PaymentAddress.languageCode is marked as "at risk" in the latest Payment Request Editor's
+        Draft (30 August 2018). Firefox has already removed it, and Chrome is considering it.
+
+        There is some compatibility risk in removing this attribute, but considering we never
+        populated it with a meaningful value, the risk seems very low. If we learn about
+        compatibility problems, we can address them by evangelising or even reverting this change.
+
+        Updated existing tests.
+
+        * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
+        (WebCore::convert):
+        * Modules/paymentrequest/PaymentAddress.cpp:
+        (WebCore::PaymentAddress::PaymentAddress):
+        * Modules/paymentrequest/PaymentAddress.h:
+        * Modules/paymentrequest/PaymentAddress.idl:
+
+2018-09-03  Andy Estes  <aestes@apple.com>
+
         [Payment Request] Add a stub for PaymentResponse.retry
         https://bugs.webkit.org/show_bug.cgi?id=189253
 
index 08f404e..98ba847 100644 (file)
@@ -437,7 +437,7 @@ void ApplePayPaymentHandler::validateMerchant(const URL& validationURL)
 
 static Ref<PaymentAddress> convert(const ApplePayPaymentContact& contact)
 {
-    return PaymentAddress::create(contact.countryCode, contact.addressLines.value_or(Vector<String>()), contact.administrativeArea, contact.locality, contact.subLocality, contact.postalCode, String(), String(), String(), contact.localizedName, contact.phoneNumber);
+    return PaymentAddress::create(contact.countryCode, contact.addressLines.value_or(Vector<String>()), contact.administrativeArea, contact.locality, contact.subLocality, contact.postalCode, String(), String(), contact.localizedName, contact.phoneNumber);
 }
 
 void ApplePayPaymentHandler::didAuthorizePayment(const Payment& payment)
index dbe6817..0b5dc8c 100644 (file)
@@ -30,7 +30,7 @@
 
 namespace WebCore {
 
-PaymentAddress::PaymentAddress(const String& country, const Vector<String>& addressLine, const String& region, const String& city, const String& dependentLocality, const String& postalCode, const String& sortingCode, const String& languageCode, const String& organization, const String& recipient, const String& phone)
+PaymentAddress::PaymentAddress(const String& country, const Vector<String>& addressLine, const String& region, const String& city, const String& dependentLocality, const String& postalCode, const String& sortingCode, const String& organization, const String& recipient, const String& phone)
     : m_country { country }
     , m_addressLine { addressLine }
     , m_region { region }
@@ -38,7 +38,6 @@ PaymentAddress::PaymentAddress(const String& country, const Vector<String>& addr
     , m_dependentLocality { dependentLocality }
     , m_postalCode { postalCode }
     , m_sortingCode { sortingCode }
-    , m_languageCode { languageCode }
     , m_organization { organization }
     , m_recipient { recipient }
     , m_phone { phone }
index c13e203..36abd9e 100644 (file)
@@ -47,13 +47,12 @@ public:
     const String& dependentLocality() const { return m_dependentLocality; }
     const String& postalCode() const { return m_postalCode; }
     const String& sortingCode() const { return m_sortingCode; }
-    const String& languageCode() const { return m_languageCode; }
     const String& organization() const { return m_organization; }
     const String& recipient() const { return m_recipient; }
     const String& phone() const { return m_phone; }
 
 private:
-    PaymentAddress(const String& country, const Vector<String>& addressLine, const String& region, const String& city, const String& dependentLocality, const String& postalCode, const String& sortingCode, const String& languageCode, const String& organization, const String& recipient, const String& phone);
+    PaymentAddress(const String& country, const Vector<String>& addressLine, const String& region, const String& city, const String& dependentLocality, const String& postalCode, const String& sortingCode, const String& organization, const String& recipient, const String& phone);
 
     String m_country;
     Vector<String> m_addressLine;
@@ -62,7 +61,6 @@ private:
     String m_dependentLocality;
     String m_postalCode;
     String m_sortingCode;
-    String m_languageCode;
     String m_organization;
     String m_recipient;
     String m_phone;
index e26b757..7dc337f 100644 (file)
@@ -38,7 +38,6 @@
     readonly attribute DOMString dependentLocality;
     readonly attribute DOMString postalCode;
     readonly attribute DOMString sortingCode;
-    readonly attribute DOMString languageCode;
     readonly attribute DOMString organization;
     readonly attribute DOMString recipient;
     readonly attribute DOMString phone;