Title: [208392] trunk/Source/WebCore
Revision
208392
Author
ander...@apple.com
Date
2016-11-04 12:16:31 -0700 (Fri, 04 Nov 2016)

Log Message

Add new 'other' Apple Pay button style
https://bugs.webkit.org/show_bug.cgi?id=164384
rdar://problem/28302528

Reviewed by Dean Jackson.

* DerivedSources.make:
* WebCorePrefix.h:
Add extension points.

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
Add ApplePayButtonType::Other.

(WebCore::CSSPrimitiveValue::operator ApplePayButtonType):
Add CSSValueOther.

* css/CSSValueKeywords.in:
Add other.

* css/parser/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
Add CSSValueOther.

* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
Add CSSValueOther.

* rendering/RenderThemeCocoa.mm:
(WebCore::toPKPaymentButtonType):
Handle ApplePayButtonType::Other.

* rendering/style/RenderStyleConstants.h:
Add ApplePayButtonType::Other.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (208391 => 208392)


--- trunk/Source/WebCore/ChangeLog	2016-11-04 19:16:21 UTC (rev 208391)
+++ trunk/Source/WebCore/ChangeLog	2016-11-04 19:16:31 UTC (rev 208392)
@@ -1,3 +1,40 @@
+2016-11-03  Anders Carlsson  <ander...@apple.com>
+
+        Add new 'other' Apple Pay button style
+        https://bugs.webkit.org/show_bug.cgi?id=164384
+        rdar://problem/28302528
+
+        Reviewed by Dean Jackson.
+
+        * DerivedSources.make:
+        * WebCorePrefix.h:
+        Add extension points.
+
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        Add ApplePayButtonType::Other.
+
+        (WebCore::CSSPrimitiveValue::operator ApplePayButtonType):
+        Add CSSValueOther.
+
+        * css/CSSValueKeywords.in:
+        Add other.
+
+        * css/parser/CSSParser.cpp:
+        (WebCore::isValidKeywordPropertyAndValue):
+        Add CSSValueOther.
+
+        * css/parser/CSSParserFastPaths.cpp:
+        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
+        Add CSSValueOther.
+
+        * rendering/RenderThemeCocoa.mm:
+        (WebCore::toPKPaymentButtonType):
+        Handle ApplePayButtonType::Other.
+
+        * rendering/style/RenderStyleConstants.h:
+        Add ApplePayButtonType::Other.
+
 2016-11-04  Antti Koivisto  <an...@apple.com>
 
         slotted() pseudo does not work with ID selector

Modified: trunk/Source/WebCore/DerivedSources.make (208391 => 208392)


--- trunk/Source/WebCore/DerivedSources.make	2016-11-04 19:16:21 UTC (rev 208391)
+++ trunk/Source/WebCore/DerivedSources.make	2016-11-04 19:16:31 UTC (rev 208392)
@@ -815,6 +815,8 @@
 
 -include WebCoreDerivedSourcesAdditions.make
 
+-include ApplePayWebCoreDerivedSourcesAdditions.make
+
 JS_BINDING_IDLS += $(ADDITIONAL_BINDING_IDLS)
 
 all : $(ADDITIONAL_BINDING_IDLS:%.idl=JS%.h)
@@ -919,6 +921,7 @@
 WEBCORE_CSS_PROPERTY_NAMES := $(WebCore)/css/CSSPropertyNames.in
 WEBCORE_CSS_VALUE_KEYWORDS := $(WebCore)/css/CSSValueKeywords.in
 WEBCORE_CSS_VALUE_KEYWORDS := $(WEBCORE_CSS_VALUE_KEYWORDS) $(WebCore)/css/SVGCSSValueKeywords.in
+WEBCORE_CSS_VALUE_KEYWORDS_DEFINES := $(FEATURE_DEFINES) $(ADDITIONAL_CSS_VALUE_KEYWORDS_DEFINES)
 
 CSSPropertyNames.h CSSPropertyNames.cpp StyleBuilder.cpp StylePropertyShorthandFunctions.h StylePropertyShorthandFunctions.cpp : makeprop.intermediate
 .INTERMEDIATE : makeprop.intermediate
@@ -930,7 +933,7 @@
 .INTERMEDIATE : makevalues.intermediate
 makevalues.intermediate : $(WEBCORE_CSS_VALUE_KEYWORDS) css/makevalues.pl bindings/scripts/preprocessor.pm $(PLATFORM_FEATURE_DEFINES)
 	$(PERL) -pe '' $(WEBCORE_CSS_VALUE_KEYWORDS) > CSSValueKeywords.in
-	$(PERL) "$(WebCore)/css/makevalues.pl" --defines "$(FEATURE_DEFINES)"
+	$(PERL) "$(WebCore)/css/makevalues.pl" --defines "$(WEBCORE_CSS_VALUE_KEYWORDS_DEFINES)"
 
 # --------
 

Modified: trunk/Source/WebCore/WebCorePrefix.h (208391 => 208392)


--- trunk/Source/WebCore/WebCorePrefix.h	2016-11-04 19:16:21 UTC (rev 208391)
+++ trunk/Source/WebCore/WebCorePrefix.h	2016-11-04 19:16:31 UTC (rev 208392)
@@ -172,6 +172,10 @@
 #define delete ("if you use new/delete make sure to include config.h at the top of the file"()) 
 #endif
 
+#if USE(APPLE_INTERNAL_SDK)
+#include <WebKitAdditions/ApplePayWebCorePrefixAdditions.h>
+#endif
+
 /* When C++ exceptions are disabled, the C++ library defines |try| and |catch|
  * to allow C++ code that expects exceptions to build. These definitions
  * interfere with Objective-C++ uses of Objective-C exception handlers, which

Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (208391 => 208392)


--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h	2016-11-04 19:16:21 UTC (rev 208391)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h	2016-11-04 19:16:31 UTC (rev 208392)
@@ -5488,6 +5488,10 @@
     case ApplePayButtonType::SetUp:
         m_value.valueID = CSSValueSetUp;
         break;
+    case ApplePayButtonType::Other:
+        m_value.valueID = CSSValueOther;
+        break;
+
     default:
         ASSERT_NOT_REACHED();
         break;
@@ -5504,6 +5508,8 @@
         return ApplePayButtonType::Buy;
     case CSSValueSetUp:
         return ApplePayButtonType::SetUp;
+    case CSSValueOther:
+        return ApplePayButtonType::Other;
     default:
         break;
     }

Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (208391 => 208392)


--- trunk/Source/WebCore/css/CSSValueKeywords.in	2016-11-04 19:16:21 UTC (rev 208391)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in	2016-11-04 19:16:31 UTC (rev 208392)
@@ -1288,6 +1288,7 @@
 plain
 buy
 set-up
+other
 #endif
 
 // font-synthesis

Modified: trunk/Source/WebCore/css/parser/CSSParser.cpp (208391 => 208392)


--- trunk/Source/WebCore/css/parser/CSSParser.cpp	2016-11-04 19:16:21 UTC (rev 208391)
+++ trunk/Source/WebCore/css/parser/CSSParser.cpp	2016-11-04 19:16:31 UTC (rev 208392)
@@ -1038,8 +1038,8 @@
         if (valueID == CSSValueWhite || valueID == CSSValueWhiteOutline || valueID == CSSValueBlack)
             return true;
         break;
-    case CSSPropertyApplePayButtonType: // plain | buy | set-up
-        if (valueID == CSSValuePlain || valueID == CSSValueBuy || valueID == CSSValueSetUp)
+    case CSSPropertyApplePayButtonType: // plain | buy | set-up | other
+        if (valueID == CSSValuePlain || valueID == CSSValueBuy || valueID == CSSValueSetUp || valueID == CSSValueOther)
             return true;
         break;
 #endif

Modified: trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp (208391 => 208392)


--- trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp	2016-11-04 19:16:21 UTC (rev 208391)
+++ trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp	2016-11-04 19:16:31 UTC (rev 208392)
@@ -777,8 +777,8 @@
 #if ENABLE(APPLE_PAY)
     case CSSPropertyApplePayButtonStyle: // white | white-outline | black
         return valueID == CSSValueWhite || valueID == CSSValueWhiteOutline || valueID == CSSValueBlack;
-    case CSSPropertyApplePayButtonType: // plain | buy | set-up
-        return valueID == CSSValuePlain || valueID == CSSValueBuy || valueID == CSSValueSetUp;
+    case CSSPropertyApplePayButtonType: // plain | buy | set-up | other
+        return valueID == CSSValuePlain || valueID == CSSValueBuy || valueID == CSSValueSetUp || valueID == CSSValueOther;
 #endif
     case CSSPropertyWebkitNbspMode: // normal | space
         return valueID == CSSValueNormal || valueID == CSSValueSpace;

Modified: trunk/Source/WebCore/rendering/RenderThemeCocoa.mm (208391 => 208392)


--- trunk/Source/WebCore/rendering/RenderThemeCocoa.mm	2016-11-04 19:16:21 UTC (rev 208391)
+++ trunk/Source/WebCore/rendering/RenderThemeCocoa.mm	2016-11-04 19:16:31 UTC (rev 208392)
@@ -78,6 +78,9 @@
         return PKPaymentButtonTypeBuy;
     case ApplePayButtonType::SetUp:
         return PKPaymentButtonTypeSetUp;
+    case ApplePayButtonType::Other:
+        // FIXME: Use a named constant here.
+        return (PKPaymentButtonType)4;
     }
 }
 

Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (208391 => 208392)


--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h	2016-11-04 19:16:21 UTC (rev 208391)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h	2016-11-04 19:16:31 UTC (rev 208392)
@@ -707,6 +707,7 @@
     Plain,
     Buy,
     SetUp,
+    Other,
 };
 #endif
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to