Title: [235607] trunk
Revision
235607
Author
[email protected]
Date
2018-09-03 21:25:11 -0700 (Mon, 03 Sep 2018)

Log Message

[Payment Request] Remove PaymentAddress.languageCode
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:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (235606 => 235607)


--- trunk/LayoutTests/ChangeLog	2018-09-04 03:36:22 UTC (rev 235606)
+++ trunk/LayoutTests/ChangeLog	2018-09-04 04:25:11 UTC (rev 235607)
@@ -1,3 +1,14 @@
+2018-09-03  Andy Estes  <[email protected]>
+
+        [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  <[email protected]>
 
         REGRESSION: Layout Test http/tests/security/bypassing-cors-checks-for-extension-urls.html is Flaky

Modified: trunk/LayoutTests/http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https.html (235606 => 235607)


--- trunk/LayoutTests/http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https.html	2018-09-04 03:36:22 UTC (rev 235606)
+++ trunk/LayoutTests/http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https.html	2018-09-04 04:25:11 UTC (rev 235607)
@@ -83,7 +83,6 @@
         dependentLocality: '',
         postalCode: address.postalCode,
         sortingCode: '',
-        languageCode: '',
         organization: '',
         recipient: address.localizedName,
         phone: address.phoneNumber,

Modified: trunk/LayoutTests/http/tests/ssl/applepay/ApplePayRequestShippingContact.https-expected.txt (235606 => 235607)


--- trunk/LayoutTests/http/tests/ssl/applepay/ApplePayRequestShippingContact.https-expected.txt	2018-09-04 03:36:22 UTC (rev 235606)
+++ trunk/LayoutTests/http/tests/ssl/applepay/ApplePayRequestShippingContact.https-expected.txt	2018-09-04 04:25:11 UTC (rev 235607)
@@ -26,7 +26,6 @@
 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

Modified: trunk/LayoutTests/http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html (235606 => 235607)


--- trunk/LayoutTests/http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html	2018-09-04 03:36:22 UTC (rev 235606)
+++ trunk/LayoutTests/http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html	2018-09-04 04:25:11 UTC (rev 235607)
@@ -114,7 +114,6 @@
                 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");

Modified: trunk/Source/WebCore/ChangeLog (235606 => 235607)


--- trunk/Source/WebCore/ChangeLog	2018-09-04 03:36:22 UTC (rev 235606)
+++ trunk/Source/WebCore/ChangeLog	2018-09-04 04:25:11 UTC (rev 235607)
@@ -1,5 +1,28 @@
 2018-09-03  Andy Estes  <[email protected]>
 
+        [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  <[email protected]>
+
         [Payment Request] Add a stub for PaymentResponse.retry
         https://bugs.webkit.org/show_bug.cgi?id=189253
 

Modified: trunk/Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp (235606 => 235607)


--- trunk/Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp	2018-09-04 03:36:22 UTC (rev 235606)
+++ trunk/Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp	2018-09-04 04:25:11 UTC (rev 235607)
@@ -437,7 +437,7 @@
 
 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)

Modified: trunk/Source/WebCore/Modules/paymentrequest/PaymentAddress.cpp (235606 => 235607)


--- trunk/Source/WebCore/Modules/paymentrequest/PaymentAddress.cpp	2018-09-04 03:36:22 UTC (rev 235606)
+++ trunk/Source/WebCore/Modules/paymentrequest/PaymentAddress.cpp	2018-09-04 04:25:11 UTC (rev 235607)
@@ -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 @@
     , m_dependentLocality { dependentLocality }
     , m_postalCode { postalCode }
     , m_sortingCode { sortingCode }
-    , m_languageCode { languageCode }
     , m_organization { organization }
     , m_recipient { recipient }
     , m_phone { phone }

Modified: trunk/Source/WebCore/Modules/paymentrequest/PaymentAddress.h (235606 => 235607)


--- trunk/Source/WebCore/Modules/paymentrequest/PaymentAddress.h	2018-09-04 03:36:22 UTC (rev 235606)
+++ trunk/Source/WebCore/Modules/paymentrequest/PaymentAddress.h	2018-09-04 04:25:11 UTC (rev 235607)
@@ -47,13 +47,12 @@
     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 @@
     String m_dependentLocality;
     String m_postalCode;
     String m_sortingCode;
-    String m_languageCode;
     String m_organization;
     String m_recipient;
     String m_phone;

Modified: trunk/Source/WebCore/Modules/paymentrequest/PaymentAddress.idl (235606 => 235607)


--- trunk/Source/WebCore/Modules/paymentrequest/PaymentAddress.idl	2018-09-04 03:36:22 UTC (rev 235606)
+++ trunk/Source/WebCore/Modules/paymentrequest/PaymentAddress.idl	2018-09-04 04:25:11 UTC (rev 235607)
@@ -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;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to