[Apple Pay] Rename the -apple-pay-button-type value "checkout" to "check-out"
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Sep 2018 20:42:48 +0000 (20:42 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Sep 2018 20:42:48 +0000 (20:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=189366
<rdar://problem/44193218>

Reviewed by Sam Weinig.

Source/WebCore:

The button title is "Check out with Apple Pay", so we should use the verb phrase "check out"
rather than the noun "checkout" for naming this value.

Updated http/tests/ssl/applepay/ApplePayButtonV4.html.

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ApplePayButtonType const):
* css/CSSValueKeywords.in:
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
* rendering/RenderThemeCocoa.mm:
(WebCore::toPKPaymentButtonType):
* rendering/style/RenderStyleConstants.h:

Source/WebInspectorUI:

* UserInterface/Models/CSSKeywordCompletions.js:

LayoutTests:

* http/tests/ssl/applepay/ApplePayButtonV4.html:

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

LayoutTests/ChangeLog
LayoutTests/http/tests/ssl/applepay/ApplePayButtonV4.html
Source/WebCore/ChangeLog
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/css/parser/CSSParserFastPaths.cpp
Source/WebCore/rendering/RenderThemeCocoa.mm
Source/WebCore/rendering/style/RenderStyleConstants.h
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js

index 9bc9d08..92d432e 100644 (file)
@@ -1,3 +1,13 @@
+2018-09-06  Andy Estes  <aestes@apple.com>
+
+        [Apple Pay] Rename the -apple-pay-button-type value "checkout" to "check-out"
+        https://bugs.webkit.org/show_bug.cgi?id=189366
+        <rdar://problem/44193218>
+
+        Reviewed by Sam Weinig.
+
+        * http/tests/ssl/applepay/ApplePayButtonV4.html:
+
 2018-09-06  Zalan Bujtas  <zalan@apple.com>
 
         [LFC][BFC] Add support for min(max)-width
index b0ec2b2..689f6e8 100644 (file)
@@ -21,8 +21,8 @@
             -apple-pay-button-style: black;
         }
 
-        .checkout {
-            -apple-pay-button-type: checkout;
+        .check-out {
+            -apple-pay-button-type: check-out;
         }
 
         .book {
@@ -37,7 +37,7 @@
 <body>
     <script>
         for (let style of ["white", "white-outline", "black"]) {
-            for (let type of ["checkout", "book", "subscribe"]) {
+            for (let type of ["check-out", "book", "subscribe"]) {
                 var button = document.createElement("button");
                 button.classList.add("apple-pay-button", style, type);
                 document.body.appendChild(button);
index 3881993..9bc98be 100644 (file)
@@ -1,3 +1,26 @@
+2018-09-06  Andy Estes  <aestes@apple.com>
+
+        [Apple Pay] Rename the -apple-pay-button-type value "checkout" to "check-out"
+        https://bugs.webkit.org/show_bug.cgi?id=189366
+        <rdar://problem/44193218>
+
+        Reviewed by Sam Weinig.
+
+        The button title is "Check out with Apple Pay", so we should use the verb phrase "check out"
+        rather than the noun "checkout" for naming this value.
+
+        Updated http/tests/ssl/applepay/ApplePayButtonV4.html.
+
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        (WebCore::CSSPrimitiveValue::operator ApplePayButtonType const):
+        * css/CSSValueKeywords.in:
+        * css/parser/CSSParserFastPaths.cpp:
+        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
+        * rendering/RenderThemeCocoa.mm:
+        (WebCore::toPKPaymentButtonType):
+        * rendering/style/RenderStyleConstants.h:
+
 2018-09-06  Jer Noble  <jer.noble@apple.com>
 
         Don't pause playback when locking screen if video is being displayed on second screen.
index 95b3f95..5ee6f63 100644 (file)
@@ -5482,8 +5482,8 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ApplePayButtonType e)
         m_value.valueID = CSSValueDonate;
         break;
 #if ENABLE(APPLE_PAY_SESSION_V4)
-    case ApplePayButtonType::Checkout:
-        m_value.valueID = CSSValueCheckout;
+    case ApplePayButtonType::CheckOut:
+        m_value.valueID = CSSValueCheckOut;
         break;
     case ApplePayButtonType::Book:
         m_value.valueID = CSSValueBook;
@@ -5514,8 +5514,8 @@ template<> inline CSSPrimitiveValue::operator ApplePayButtonType() const
     case CSSValueDonate:
         return ApplePayButtonType::Donate;
 #if ENABLE(APPLE_PAY_SESSION_V4)
-    case CSSValueCheckout:
-        return ApplePayButtonType::Checkout;
+    case CSSValueCheckOut:
+        return ApplePayButtonType::CheckOut;
     case CSSValueBook:
         return ApplePayButtonType::Book;
     case CSSValueSubscribe:
index 74c450d..c71c74f 100644 (file)
@@ -1337,7 +1337,7 @@ set-up
 in-store
 donate
 #if defined(ENABLE_APPLE_PAY_SESSION_V4) && ENABLE_APPLE_PAY_SESSION_V4
-checkout
+check-out
 book
 subscribe
 #endif
index 87bc573..54595d8 100644 (file)
@@ -769,11 +769,11 @@ bool CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyID propertyId
 #if ENABLE(APPLE_PAY)
     case CSSPropertyApplePayButtonStyle: // white | white-outline | black
         return valueID == CSSValueWhite || valueID == CSSValueWhiteOutline || valueID == CSSValueBlack;
-    case CSSPropertyApplePayButtonType: // plain | buy | set-up | in-store | donate | checkout | book | subscribe
+    case CSSPropertyApplePayButtonType: // plain | buy | set-up | in-store | donate | check-out | book | subscribe
         if (valueID == CSSValuePlain || valueID == CSSValueBuy || valueID == CSSValueSetUp || valueID == CSSValueInStore || valueID == CSSValueDonate)
             return true;
 #if ENABLE(APPLE_PAY_SESSION_V4)
-        return valueID == CSSValueCheckout || valueID == CSSValueBook || valueID == CSSValueSubscribe;
+        return valueID == CSSValueCheckOut || valueID == CSSValueBook || valueID == CSSValueSubscribe;
 #else
         return false;
 #endif
index 5cada85..8d6203a 100644 (file)
@@ -119,7 +119,7 @@ static PKPaymentButtonType toPKPaymentButtonType(ApplePayButtonType type)
     case ApplePayButtonType::Donate:
         return PKPaymentButtonTypeDonate;
 #if ENABLE(APPLE_PAY_SESSION_V4)
-    case ApplePayButtonType::Checkout:
+    case ApplePayButtonType::CheckOut:
         return PKPaymentButtonTypeCheckout;
     case ApplePayButtonType::Book:
         return PKPaymentButtonTypeBook;
index 943c62c..283df64 100644 (file)
@@ -1129,7 +1129,7 @@ enum class ApplePayButtonType : uint8_t {
     InStore,
     Donate,
 #if ENABLE(APPLE_PAY_SESSION_V4)
-    Checkout,
+    CheckOut,
     Book,
     Subscribe,
 #endif
index 890cbd7..122f754 100644 (file)
@@ -1,3 +1,13 @@
+2018-09-06  Andy Estes  <aestes@apple.com>
+
+        [Apple Pay] Rename the -apple-pay-button-type value "checkout" to "check-out"
+        https://bugs.webkit.org/show_bug.cgi?id=189366
+        <rdar://problem/44193218>
+
+        Reviewed by Sam Weinig.
+
+        * UserInterface/Models/CSSKeywordCompletions.js:
+
 2018-08-31  Jamal Nasser  <xnasser@outlook.com>
 
         Added a CSS rule to DarkMode.css to fix color on sidebar toggle.
index a099c69..043bb71 100644 (file)
@@ -1063,6 +1063,6 @@ WI.CSSKeywordCompletions._propertyKeywordMap = {
         "black", "white", "white-outline"
     ],
     "-apple-pay-button-type": [
-        "book", "buy", "checkout", "donate", "in-store", "plain", "set-up", "subscribe"
+        "book", "buy", "check-out", "donate", "in-store", "plain", "set-up", "subscribe"
     ]
 };