[Apple Pay] Remove the "in-store" button type
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Sep 2018 22:06:02 +0000 (22:06 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Sep 2018 22:06:02 +0000 (22:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190079

Reviewed by Tim Horton.

Source/WebCore:

According to <https://developer.apple.com/design/human-interface-guidelines/apple-pay/buttons-and-marks/buttons/>,
this button is meant only for certain kinds of native apps. It shouldn't be available on the web.

Updated http/tests/ssl/applepay/ApplePayButton.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/ApplePayButton.html:
* platform/mac/http/tests/ssl/applepay/ApplePayButton-expected.png:
* platform/mac/http/tests/ssl/applepay/ApplePayButton-expected.txt:

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

14 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/ssl/applepay/ApplePayButton.html
LayoutTests/platform/mac-highsierra/http/tests/ssl/applepay/ApplePayButton-expected.png
LayoutTests/platform/mac-highsierra/http/tests/ssl/applepay/ApplePayButton-expected.txt
LayoutTests/platform/mac/http/tests/ssl/applepay/ApplePayButton-expected.png
LayoutTests/platform/mac/http/tests/ssl/applepay/ApplePayButton-expected.txt
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 72ca8e4..37c31fb 100644 (file)
@@ -1,3 +1,14 @@
+2018-09-28  Andy Estes  <aestes@apple.com>
+
+        [Apple Pay] Remove the "in-store" button type
+        https://bugs.webkit.org/show_bug.cgi?id=190079
+
+        Reviewed by Tim Horton.
+
+        * http/tests/ssl/applepay/ApplePayButton.html:
+        * platform/mac/http/tests/ssl/applepay/ApplePayButton-expected.png:
+        * platform/mac/http/tests/ssl/applepay/ApplePayButton-expected.txt:
+
 2018-09-28  Dawei Fenton  <realdawei@apple.com>
 
         WebGL conformance: Failures and Timeouts in suite 2.0.0/conformance
index b1ec686..662bcb5 100644 (file)
             -apple-pay-button-type: set-up;
         }
 
-        .in-store {
-            -apple-pay-button-type: in-store;
-        }
-
         .donate {
             -apple-pay-button-type: donate;
         }
@@ -45,7 +41,7 @@
 <body>
     <script>
         for (let style of ["white", "white-outline", "black"]) {
-            for (let type of ["plain", "buy", "set-up", "in-store", "donate"]) {
+            for (let type of ["plain", "buy", "set-up", "donate"]) {
                 var button = document.createElement("button");
                 button.classList.add("apple-pay-button", style, type);
                 document.body.appendChild(button);
index 4438b92..6c9d8d4 100644 (file)
Binary files a/LayoutTests/platform/mac-highsierra/http/tests/ssl/applepay/ApplePayButton-expected.png and b/LayoutTests/platform/mac-highsierra/http/tests/ssl/applepay/ApplePayButton-expected.png differ
index 945c492..6e30e61 100644 (file)
@@ -1,20 +1,17 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
-layer at (0,0) size 800x494
-  RenderBlock {HTML} at (0,0) size 800x494
-    RenderBody {BODY} at (8,8) size 784x478
+layer at (0,0) size 800x398
+  RenderBlock {HTML} at (0,0) size 800x398
+    RenderBody {BODY} at (8,8) size 784x382
       RenderButton {BUTTON} at (2,0) size 100x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
       RenderButton {BUTTON} at (2,32) size 140x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
       RenderButton {BUTTON} at (2,64) size 140x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
       RenderButton {BUTTON} at (2,96) size 140x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
-      RenderButton {BUTTON} at (2,128) size 140x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
-      RenderButton {BUTTON} at (2,160) size 100x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+      RenderButton {BUTTON} at (2,128) size 100x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+      RenderButton {BUTTON} at (2,160) size 140x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
       RenderButton {BUTTON} at (2,192) size 140x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
       RenderButton {BUTTON} at (2,224) size 140x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
-      RenderButton {BUTTON} at (2,256) size 140x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+      RenderButton {BUTTON} at (2,256) size 100x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
       RenderButton {BUTTON} at (2,288) size 140x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
-      RenderButton {BUTTON} at (2,320) size 100x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+      RenderButton {BUTTON} at (2,320) size 140x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
       RenderButton {BUTTON} at (2,352) size 140x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
-      RenderButton {BUTTON} at (2,384) size 140x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
-      RenderButton {BUTTON} at (2,416) size 140x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
-      RenderButton {BUTTON} at (2,448) size 140x30 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
index c9ce9e7..1952339 100644 (file)
Binary files a/LayoutTests/platform/mac/http/tests/ssl/applepay/ApplePayButton-expected.png and b/LayoutTests/platform/mac/http/tests/ssl/applepay/ApplePayButton-expected.png differ
index 293fcff..b51a612 100644 (file)
@@ -1,20 +1,17 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
-layer at (0,0) size 800x494
-  RenderBlock {HTML} at (0,0) size 800x494
-    RenderBody {BODY} at (8,8) size 784x478
+layer at (0,0) size 800x398
+  RenderBlock {HTML} at (0,0) size 800x398
+    RenderBody {BODY} at (8,8) size 784x382
       RenderButton {BUTTON} at (2,0) size 100x30 [color=#000000D8] [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
       RenderButton {BUTTON} at (2,32) size 140x30 [color=#000000D8] [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
       RenderButton {BUTTON} at (2,64) size 140x30 [color=#000000D8] [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
       RenderButton {BUTTON} at (2,96) size 140x30 [color=#000000D8] [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
-      RenderButton {BUTTON} at (2,128) size 140x30 [color=#000000D8] [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
-      RenderButton {BUTTON} at (2,160) size 100x30 [color=#000000D8] [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+      RenderButton {BUTTON} at (2,128) size 100x30 [color=#000000D8] [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+      RenderButton {BUTTON} at (2,160) size 140x30 [color=#000000D8] [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
       RenderButton {BUTTON} at (2,192) size 140x30 [color=#000000D8] [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
       RenderButton {BUTTON} at (2,224) size 140x30 [color=#000000D8] [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
-      RenderButton {BUTTON} at (2,256) size 140x30 [color=#000000D8] [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+      RenderButton {BUTTON} at (2,256) size 100x30 [color=#000000D8] [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
       RenderButton {BUTTON} at (2,288) size 140x30 [color=#000000D8] [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
-      RenderButton {BUTTON} at (2,320) size 100x30 [color=#000000D8] [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+      RenderButton {BUTTON} at (2,320) size 140x30 [color=#000000D8] [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
       RenderButton {BUTTON} at (2,352) size 140x30 [color=#000000D8] [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
-      RenderButton {BUTTON} at (2,384) size 140x30 [color=#000000D8] [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
-      RenderButton {BUTTON} at (2,416) size 140x30 [color=#000000D8] [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
-      RenderButton {BUTTON} at (2,448) size 140x30 [color=#000000D8] [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
index 9f8a3dc..eeb62df 100644 (file)
@@ -1,3 +1,25 @@
+2018-09-28  Andy Estes  <aestes@apple.com>
+
+        [Apple Pay] Remove the "in-store" button type
+        https://bugs.webkit.org/show_bug.cgi?id=190079
+
+        Reviewed by Tim Horton.
+
+        According to <https://developer.apple.com/design/human-interface-guidelines/apple-pay/buttons-and-marks/buttons/>,
+        this button is meant only for certain kinds of native apps. It shouldn't be available on the web.
+
+        Updated http/tests/ssl/applepay/ApplePayButton.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-28  Chris Dumez  <cdumez@apple.com>
 
         document.open() should throw errors for cross-origin calls
index c344e75..7875fda 100644 (file)
@@ -5471,9 +5471,6 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ApplePayButtonType e)
     case ApplePayButtonType::SetUp:
         m_value.valueID = CSSValueSetUp;
         break;
-    case ApplePayButtonType::InStore:
-        m_value.valueID = CSSValueInStore;
-        break;
     case ApplePayButtonType::Donate:
         m_value.valueID = CSSValueDonate;
         break;
@@ -5505,8 +5502,6 @@ template<> inline CSSPrimitiveValue::operator ApplePayButtonType() const
         return ApplePayButtonType::Buy;
     case CSSValueSetUp:
         return ApplePayButtonType::SetUp;
-    case CSSValueInStore:
-        return ApplePayButtonType::InStore;
     case CSSValueDonate:
         return ApplePayButtonType::Donate;
 #if ENABLE(APPLE_PAY_SESSION_V4)
index 7148a99..71d1b5e 100644 (file)
@@ -1334,7 +1334,6 @@ white-outline
 plain
 buy
 set-up
-in-store
 donate
 #if defined(ENABLE_APPLE_PAY_SESSION_V4) && ENABLE_APPLE_PAY_SESSION_V4
 check-out
index 305947b..30351e2 100644 (file)
@@ -769,10 +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 | check-out | book | subscribe
-        if (valueID == CSSValuePlain || valueID == CSSValueBuy || valueID == CSSValueSetUp || valueID == CSSValueInStore || valueID == CSSValueDonate)
+    case CSSPropertyApplePayButtonType: // plain | buy | set-up | donate
+        if (valueID == CSSValuePlain || valueID == CSSValueBuy || valueID == CSSValueSetUp || valueID == CSSValueDonate)
             return true;
 #if ENABLE(APPLE_PAY_SESSION_V4)
+        // check-out | book | subscribe
         return valueID == CSSValueCheckOut || valueID == CSSValueBook || valueID == CSSValueSubscribe;
 #else
         return false;
index 8d6203a..1f88aed 100644 (file)
@@ -114,8 +114,6 @@ static PKPaymentButtonType toPKPaymentButtonType(ApplePayButtonType type)
         return PKPaymentButtonTypeBuy;
     case ApplePayButtonType::SetUp:
         return PKPaymentButtonTypeSetUp;
-    case ApplePayButtonType::InStore:
-        return PKPaymentButtonTypeInStore;
     case ApplePayButtonType::Donate:
         return PKPaymentButtonTypeDonate;
 #if ENABLE(APPLE_PAY_SESSION_V4)
index 40f4af4..3edee09 100644 (file)
@@ -1125,7 +1125,6 @@ enum class ApplePayButtonType : uint8_t {
     Plain,
     Buy,
     SetUp,
-    InStore,
     Donate,
 #if ENABLE(APPLE_PAY_SESSION_V4)
     CheckOut,
index c8a208b..29c5a80 100644 (file)
@@ -1,3 +1,12 @@
+2018-09-28  Andy Estes  <aestes@apple.com>
+
+        [Apple Pay] Remove the "in-store" button type
+        https://bugs.webkit.org/show_bug.cgi?id=190079
+
+        Reviewed by Tim Horton.
+
+        * UserInterface/Models/CSSKeywordCompletions.js:
+
 2018-09-28  Devin Rousso  <drousso@apple.com>
 
         Web Inspector: image resources without content are still shown when the Images folder is selected
index 53536c5..8b65486 100644 (file)
@@ -774,7 +774,7 @@ WI.CSSKeywordCompletions._propertyKeywordMap = {
         "black", "white", "white-outline",
     ],
     "-apple-pay-button-type": [
-        "plain", "buy", "set-up", "in-store", "donate", "checkout", "book", "subscribe",
+        "plain", "buy", "set-up", "donate", "checkout", "book", "subscribe",
     ],
     "-apple-trailing-word": [
         "auto", "-webkit-partially-balanced",