Title: [221569] trunk/Source/WebCore/PAL
Revision
221569
Author
[email protected]
Date
2017-09-03 21:08:46 -0700 (Sun, 03 Sep 2017)

Log Message

[Cocoa] Tidy up PassKitSPI.h
https://bugs.webkit.org/show_bug.cgi?id=176323

Reviewed by Darin Adler.

* pal/spi/cocoa/PassKitSPI.h: Moved the declarations of requiredShippingContactFields and
  requiredBillingContactFields to where other PKPaymentRequest properties are declared, and
  changed the guard to relate to the SDK version. Replaced use of __has_include with checking for
  the version of the Apple internal SDK in which the typedefs first appeared.

Modified Paths

Diff

Modified: trunk/Source/WebCore/PAL/ChangeLog (221568 => 221569)


--- trunk/Source/WebCore/PAL/ChangeLog	2017-09-04 03:33:50 UTC (rev 221568)
+++ trunk/Source/WebCore/PAL/ChangeLog	2017-09-04 04:08:46 UTC (rev 221569)
@@ -1,5 +1,17 @@
 2017-09-03  Dan Bernstein  <[email protected]>
 
+        [Cocoa] Tidy up PassKitSPI.h
+        https://bugs.webkit.org/show_bug.cgi?id=176323
+
+        Reviewed by Darin Adler.
+
+        * pal/spi/cocoa/PassKitSPI.h: Moved the declarations of requiredShippingContactFields and
+          requiredBillingContactFields to where other PKPaymentRequest properties are declared, and
+          changed the guard to relate to the SDK version. Replaced use of __has_include with checking for
+          the version of the Apple internal SDK in which the typedefs first appeared.
+
+2017-09-03  Dan Bernstein  <[email protected]>
+
         [Cocoa] Remove use of __has_include in CoreAudioSPI.h
         https://bugs.webkit.org/show_bug.cgi?id=176320
 

Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h (221568 => 221569)


--- trunk/Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h	2017-09-04 03:33:50 UTC (rev 221568)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h	2017-09-04 04:08:46 UTC (rev 221569)
@@ -51,6 +51,8 @@
 @class PKPaymentRequestShippingMethodUpdate;
 @class PKPaymentRequestShippingContactUpdate;
 
+typedef NSString *PKContactField;
+
 extern NSString * const PKPaymentErrorDomain;
 typedef NS_ERROR_ENUM(PKPaymentErrorDomain, PKPaymentErrorCode) {
     PKPaymentUnknownError = -1,
@@ -186,8 +188,10 @@
 @property (nonatomic, copy, nullable) NSArray<PKShippingMethod *> *shippingMethods;
 @property (nonatomic, assign) PKShippingType shippingType;
 @property (nonatomic, copy, nullable) NSData *applicationData;
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
+#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101300
 @property (nonatomic, copy, nullable) NSSet<NSString *> *supportedCountries;
+@property (nonatomic, strong) NSSet<PKContactField> *requiredShippingContactFields;
+@property (nonatomic, strong) NSSet<PKContactField> *requiredBillingContactFields;
 #endif
 @end
 
@@ -245,7 +249,7 @@
 
 #endif
 
-#if PLATFORM(MAC) && (!USE(APPLE_INTERNAL_SDK) || !__has_include(<PassKitCore/PKApplePayButton.h>))
+#if PLATFORM(MAC) && (!USE(APPLE_INTERNAL_SDK) || __MAC_OS_X_VERSION_MAX_ALLOWED < 101204)
 typedef NS_ENUM(NSInteger, PKPaymentButtonStyle) {
     PKPaymentButtonStyleWhite = 0,
     PKPaymentButtonStyleWhiteOutline,
@@ -298,12 +302,6 @@
 @property (nonatomic, strong) NSString *sourceApplicationBundleIdentifier;
 @property (nonatomic, strong) NSString *sourceApplicationSecondaryIdentifier;
 @property (nonatomic, strong) NSString *CTDataConnectionServiceType;
-
-#if (PLATFORM(MAC) && !USE(APPLE_INTERNAL_SDK)) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED < 110000)
-- (void)setRequiredShippingContactFields:(nonnull NSSet *)contactInformation;
-- (void)setRequiredBillingContactFields:(nonnull NSSet *)contactInformation;
-#endif
-
 @end
 
 NS_ASSUME_NONNULL_END
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to