Title: [264110] branches/safari-610.1.21.0-branch/Source/WebCore
Revision
264110
Author
[email protected]
Date
2020-07-08 10:01:35 -0700 (Wed, 08 Jul 2020)

Log Message

Cherry-pick r264058. rdar://problem/65195012

    [Apple Pay] Fix the build on Catalina internal SDKs
    https://bugs.webkit.org/show_bug.cgi?id=214066

    Unreviewed build fix for the 10.15.0 Internal SDK.

    Source/WebCore:

    * Modules/applepay/ApplePaySetupFeature.mm:
    (WebCore::ApplePaySetupFeature::supportsInstallments const):

    Source/WebCore/PAL:

    * pal/spi/cocoa/PassKitInstallmentsSPI.h:
    * pal/spi/cocoa/PassKitSPI.h:

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

Modified Paths

Diff

Modified: branches/safari-610.1.21.0-branch/Source/WebCore/ChangeLog (264109 => 264110)


--- branches/safari-610.1.21.0-branch/Source/WebCore/ChangeLog	2020-07-08 16:55:17 UTC (rev 264109)
+++ branches/safari-610.1.21.0-branch/Source/WebCore/ChangeLog	2020-07-08 17:01:35 UTC (rev 264110)
@@ -1,3 +1,36 @@
+2020-07-08  Alan Coon  <[email protected]>
+
+        Cherry-pick r264058. rdar://problem/65195012
+
+    [Apple Pay] Fix the build on Catalina internal SDKs
+    https://bugs.webkit.org/show_bug.cgi?id=214066
+    
+    Unreviewed build fix for the 10.15.0 Internal SDK.
+    
+    
+    Source/WebCore:
+    
+    * Modules/applepay/ApplePaySetupFeature.mm:
+    (WebCore::ApplePaySetupFeature::supportsInstallments const):
+    
+    Source/WebCore/PAL:
+    
+    * pal/spi/cocoa/PassKitInstallmentsSPI.h:
+    * pal/spi/cocoa/PassKitSPI.h:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-07-07  Andy Estes  <[email protected]>
+
+            [Apple Pay] Fix the build on Catalina internal SDKs
+            https://bugs.webkit.org/show_bug.cgi?id=214066
+
+            Unreviewed build fix for the 10.15.0 Internal SDK.
+
+            * Modules/applepay/ApplePaySetupFeature.mm:
+            (WebCore::ApplePaySetupFeature::supportsInstallments const):
+
 2020-07-06  Carlos Garcia Campos  <[email protected]>
 
         [GTK][WPE] Change the cookies accept policy when ITP is enabled

Modified: branches/safari-610.1.21.0-branch/Source/WebCore/Modules/applepay/ApplePaySetupFeature.mm (264109 => 264110)


--- branches/safari-610.1.21.0-branch/Source/WebCore/Modules/applepay/ApplePaySetupFeature.mm	2020-07-08 16:55:17 UTC (rev 264109)
+++ branches/safari-610.1.21.0-branch/Source/WebCore/Modules/applepay/ApplePaySetupFeature.mm	2020-07-08 17:01:35 UTC (rev 264110)
@@ -66,6 +66,10 @@
 #if ENABLE(APPLE_PAY_INSTALLMENTS)
 bool ApplePaySetupFeature::supportsInstallments() const
 {
+#if PLATFORM(MAC)
+    if (![m_feature respondsToSelector:@selector(supportedOptions)])
+        return false;
+#endif
     return [m_feature supportedOptions] & PKPaymentSetupFeatureSupportedOptionsInstallments;
 }
 #endif

Modified: branches/safari-610.1.21.0-branch/Source/WebCore/PAL/ChangeLog (264109 => 264110)


--- branches/safari-610.1.21.0-branch/Source/WebCore/PAL/ChangeLog	2020-07-08 16:55:17 UTC (rev 264109)
+++ branches/safari-610.1.21.0-branch/Source/WebCore/PAL/ChangeLog	2020-07-08 17:01:35 UTC (rev 264110)
@@ -1,3 +1,36 @@
+2020-07-08  Alan Coon  <[email protected]>
+
+        Cherry-pick r264058. rdar://problem/65195012
+
+    [Apple Pay] Fix the build on Catalina internal SDKs
+    https://bugs.webkit.org/show_bug.cgi?id=214066
+    
+    Unreviewed build fix for the 10.15.0 Internal SDK.
+    
+    
+    Source/WebCore:
+    
+    * Modules/applepay/ApplePaySetupFeature.mm:
+    (WebCore::ApplePaySetupFeature::supportsInstallments const):
+    
+    Source/WebCore/PAL:
+    
+    * pal/spi/cocoa/PassKitInstallmentsSPI.h:
+    * pal/spi/cocoa/PassKitSPI.h:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-07-07  Andy Estes  <[email protected]>
+
+            [Apple Pay] Fix the build on Catalina internal SDKs
+            https://bugs.webkit.org/show_bug.cgi?id=214066
+
+            Unreviewed build fix for the 10.15.0 Internal SDK.
+
+            * pal/spi/cocoa/PassKitInstallmentsSPI.h:
+            * pal/spi/cocoa/PassKitSPI.h:
+
 2020-07-05  Commit Queue  <[email protected]>
 
         Unreviewed, reverting r263960.

Modified: branches/safari-610.1.21.0-branch/Source/WebCore/PAL/pal/spi/cocoa/PassKitInstallmentsSPI.h (264109 => 264110)


--- branches/safari-610.1.21.0-branch/Source/WebCore/PAL/pal/spi/cocoa/PassKitInstallmentsSPI.h	2020-07-08 16:55:17 UTC (rev 264109)
+++ branches/safari-610.1.21.0-branch/Source/WebCore/PAL/pal/spi/cocoa/PassKitInstallmentsSPI.h	2020-07-08 17:01:35 UTC (rev 264110)
@@ -102,4 +102,23 @@
 @property (nonatomic, copy) NSString *installmentGroupIdentifier;
 @end
 
+// FIXME: The SPIs above can be declared by WebKit without causing redeclaration errors on Catalina
+// internal SDKs because we can avoid including the SPIs' private headers from PassKit, but we can't
+// avoid importing PKPaymentSetupFeature.h due to how many other private headers include it. To avoid
+// redeclaration errors while continuing to support all Catalina SDKs, declare -supportedOptions
+// only when building against an internal SDK without PKPaymentInstallmentConfiguration.h (so that we
+// can implement a -respondsToSelector: check). The __has_include portion of this check can be
+// removed once the minimum supported Catalina internal SDK is known to contain this private header.
+#if !USE(APPLE_INTERNAL_SDK) || !__has_include(<PassKitCore/PKPaymentInstallmentConfiguration.h>)
+
+typedef NS_OPTIONS(NSInteger, PKPaymentSetupFeatureSupportedOptions) {
+    PKPaymentSetupFeatureSupportedOptionsInstallments = 1 << 0,
+};
+
+@interface PKPaymentSetupFeature ()
+@property (nonatomic, assign, readonly) PKPaymentSetupFeatureSupportedOptions supportedOptions;
+@end
+
+#endif
+
 #endif // HAVE(PASSKIT_INSTALLMENTS)

Modified: branches/safari-610.1.21.0-branch/Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h (264109 => 264110)


--- branches/safari-610.1.21.0-branch/Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h	2020-07-08 16:55:17 UTC (rev 264109)
+++ branches/safari-610.1.21.0-branch/Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h	2020-07-08 17:01:35 UTC (rev 264110)
@@ -301,11 +301,6 @@
     PKPaymentSetupFeatureTypeApplePay_X API_DEPRECATED_WITH_REPLACEMENT("PKPaymentSetupFeatureTypeAppleCard", ios(12.3, 12.3), macos(10.14.5, 10.14.5)) = PKPaymentSetupFeatureTypeAppleCard,
 };
 
-typedef NS_OPTIONS(NSInteger, PKPaymentSetupFeatureSupportedOptions) {
-    PKPaymentSetupFeatureSupportedOptionsNone = 0,
-    PKPaymentSetupFeatureSupportedOptionsInstallments = 1 << 0,
-};
-
 @interface PKPaymentSetupConfiguration : NSObject <NSSecureCoding>
 @property (nonatomic, copy) NSString *referrerIdentifier;
 @end
@@ -325,7 +320,6 @@
 @interface PKPaymentSetupFeature : NSObject <NSSecureCoding, NSCopying>
 @property (nonatomic, assign, readonly) PKPaymentSetupFeatureType type;
 @property (nonatomic, assign, readonly) PKPaymentSetupFeatureState state;
-@property (nonatomic, assign, readonly) PKPaymentSetupFeatureSupportedOptions supportedOptions;
 @end
 
 @interface PKPaymentSetupRequest : NSObject <NSSecureCoding>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to