Title: [290436] trunk/Source
Revision
290436
Author
drou...@apple.com
Date
2022-02-24 08:46:20 -0800 (Thu, 24 Feb 2022)

Log Message

[Apple Pay] switch from `PassKit/*` to `PassKit[Core,UI]/*`
https://bugs.webkit.org/show_bug.cgi?id=237091
<rdar://problem/81085862>

Reviewed by Tim Horton.

Source/WebCore:

* Modules/applepay/cocoa/PaymentSessionErrorCocoa.mm:
(WebCore::PaymentSessionError::sessionError const):
* rendering/RenderThemeCocoa.mm:
(WebCore::RenderThemeCocoa::adjustApplePayButtonStyle const):

Source/WebCore/PAL:

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

Source/WebKit:

* Platform/cocoa/PaymentAuthorizationPresenter.mm:
(WebKit::toNSError):
* Platform/cocoa/WKPaymentAuthorizationDelegate.mm:
(-[WKPaymentAuthorizationDelegate _willFinishWithError:]):
* Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
(WebKit::WebPaymentCoordinatorProxy::platformOpenPaymentSetup):
(WebKit::toPKContactFields):
* Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
(WebKit::WebPaymentCoordinatorProxy::platformCanMakePayments):
(WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
* WebProcess/ApplePay/cocoa/WebPaymentCoordinatorCocoa.mm:
(WebKit::WebPaymentCoordinator::platformAvailablePaymentNetworks):

Source/WTF:

* wtf/PlatformHave.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (290435 => 290436)


--- trunk/Source/WTF/ChangeLog	2022-02-24 16:42:55 UTC (rev 290435)
+++ trunk/Source/WTF/ChangeLog	2022-02-24 16:46:20 UTC (rev 290436)
@@ -1,3 +1,13 @@
+2022-02-24  Devin Rousso  <drou...@apple.com>
+
+        [Apple Pay] switch from `PassKit/*` to `PassKit[Core,UI]/*`
+        https://bugs.webkit.org/show_bug.cgi?id=237091
+        <rdar://problem/81085862>
+
+        Reviewed by Tim Horton.
+
+        * wtf/PlatformHave.h:
+
 2022-02-24  Carlos Garcia Campos  <cgar...@igalia.com>
 
         Unreviewed. Fix compile warnings when asserts are disabled after r290418

Modified: trunk/Source/WTF/wtf/PlatformHave.h (290435 => 290436)


--- trunk/Source/WTF/wtf/PlatformHave.h	2022-02-24 16:42:55 UTC (rev 290435)
+++ trunk/Source/WTF/wtf/PlatformHave.h	2022-02-24 16:46:20 UTC (rev 290436)
@@ -678,6 +678,10 @@
 #define HAVE_PASSKIT_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_SUMMARY_ITEMS 1
 #endif
 
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 130000) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 160000)
+#define HAVE_PASSKIT_UI 1
+#endif
+
 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 120300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 150400)
 #define HAVE_PASSKIT_DEFAULT_SHIPPING_METHOD 1
 #endif

Modified: trunk/Source/WebCore/ChangeLog (290435 => 290436)


--- trunk/Source/WebCore/ChangeLog	2022-02-24 16:42:55 UTC (rev 290435)
+++ trunk/Source/WebCore/ChangeLog	2022-02-24 16:46:20 UTC (rev 290436)
@@ -1,3 +1,16 @@
+2022-02-24  Devin Rousso  <drou...@apple.com>
+
+        [Apple Pay] switch from `PassKit/*` to `PassKit[Core,UI]/*`
+        https://bugs.webkit.org/show_bug.cgi?id=237091
+        <rdar://problem/81085862>
+
+        Reviewed by Tim Horton.
+
+        * Modules/applepay/cocoa/PaymentSessionErrorCocoa.mm:
+        (WebCore::PaymentSessionError::sessionError const):
+        * rendering/RenderThemeCocoa.mm:
+        (WebCore::RenderThemeCocoa::adjustApplePayButtonStyle const):
+
 2022-02-24  Frédéric Wang  <fw...@igalia.com>
 
         RELEASE_ASSERT(!renderer()); in WebCore::Node::~Node() + 479 (Node.cpp:366)

Modified: trunk/Source/WebCore/Modules/applepay/cocoa/PaymentSessionErrorCocoa.mm (290435 => 290436)


--- trunk/Source/WebCore/Modules/applepay/cocoa/PaymentSessionErrorCocoa.mm	2022-02-24 16:42:55 UTC (rev 290435)
+++ trunk/Source/WebCore/Modules/applepay/cocoa/PaymentSessionErrorCocoa.mm	2022-02-24 16:46:20 UTC (rev 290436)
@@ -60,7 +60,7 @@
 
 ApplePaySessionError PaymentSessionError::sessionError() const
 {
-    ASSERT(!m_platformError || [[m_platformError domain] isEqualToString:PAL::get_PassKit_PKPassKitErrorDomain()]);
+    ASSERT(!m_platformError || [[m_platformError domain] isEqualToString:PAL::get_PassKitCore_PKPassKitErrorDomain()]);
 
     if (auto error = additionalError(m_platformError.get()))
         return *error;

Modified: trunk/Source/WebCore/PAL/ChangeLog (290435 => 290436)


--- trunk/Source/WebCore/PAL/ChangeLog	2022-02-24 16:42:55 UTC (rev 290435)
+++ trunk/Source/WebCore/PAL/ChangeLog	2022-02-24 16:46:20 UTC (rev 290436)
@@ -1,3 +1,16 @@
+2022-02-24  Devin Rousso  <drou...@apple.com>
+
+        [Apple Pay] switch from `PassKit/*` to `PassKit[Core,UI]/*`
+        https://bugs.webkit.org/show_bug.cgi?id=237091
+        <rdar://problem/81085862>
+
+        Reviewed by Tim Horton.
+
+        * pal/spi/cocoa/PassKitSPI.h:
+        * pal/spi/cocoa/PassKitInstallmentsSPI.h:
+        * pal/cocoa/PassKitSoftLink.h:
+        * pal/cocoa/PassKitSoftLink.mm:
+
 2022-02-22  Elliott Williams  <e...@apple.com>
 
         Replace legacy-build-copy-nested-headers.py with an xcodebuild invocation.

Modified: trunk/Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.h (290435 => 290436)


--- trunk/Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.h	2022-02-24 16:42:55 UTC (rev 290435)
+++ trunk/Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.h	2022-02-24 16:46:20 UTC (rev 290436)
@@ -30,7 +30,13 @@
 #import <pal/spi/cocoa/PassKitSPI.h>
 #import <wtf/SoftLinking.h>
 
-SOFT_LINK_FRAMEWORK_FOR_HEADER(PAL, PassKit)
+SOFT_LINK_FRAMEWORK_FOR_HEADER(PAL, PassKitCore)
+#if HAVE(PASSKIT_UI)
+#if PLATFORM(MAC)
+SOFT_LINK_FRAMEWORK_FOR_HEADER(PAL, PassKitMacHelper)
+#endif
+SOFT_LINK_FRAMEWORK_FOR_HEADER(PAL, PassKitUI)
+#endif
 
 SOFT_LINK_CLASS_FOR_HEADER(PAL, PKContact)
 SOFT_LINK_CLASS_FOR_HEADER(PAL, PKPassLibrary)
@@ -76,10 +82,10 @@
 SOFT_LINK_CLASS_FOR_HEADER(PAL, PKPaymentAuthorizationController)
 #endif
 
-SOFT_LINK_FUNCTION_FOR_HEADER(PAL, PassKit, PKCanMakePaymentsWithMerchantIdentifierAndDomain, void, (NSString *identifier, NSString *domain, PKCanMakePaymentsCompletion completion), (identifier, domain, completion))
-#define PKCanMakePaymentsWithMerchantIdentifierAndDomain PAL::softLink_PassKit_PKCanMakePaymentsWithMerchantIdentifierAndDomain
-SOFT_LINK_FUNCTION_FOR_HEADER(PAL, PassKit, PKDrawApplePayButtonWithCornerRadius, void, (CGContextRef context, CGRect drawRect, CGFloat scale, CGFloat cornerRadius, PKPaymentButtonType type, PKPaymentButtonStyle style, NSString *languageCode), (context, drawRect, scale, cornerRadius, type, style, languageCode))
-#define PKDrawApplePayButtonWithCornerRadius PAL::softLink_PassKit_PKDrawApplePayButtonWithCornerRadius
+SOFT_LINK_FUNCTION_FOR_HEADER(PAL, PassKitCore, PKCanMakePaymentsWithMerchantIdentifierAndDomain, void, (NSString *identifier, NSString *domain, PKCanMakePaymentsCompletion completion), (identifier, domain, completion))
+#define PKCanMakePaymentsWithMerchantIdentifierAndDomain PAL::softLink_PassKitCore_PKCanMakePaymentsWithMerchantIdentifierAndDomain
+SOFT_LINK_FUNCTION_FOR_HEADER(PAL, PassKitCore, PKDrawApplePayButtonWithCornerRadius, void, (CGContextRef context, CGRect drawRect, CGFloat scale, CGFloat cornerRadius, PKPaymentButtonType type, PKPaymentButtonStyle style, NSString *languageCode), (context, drawRect, scale, cornerRadius, type, style, languageCode))
+#define PKDrawApplePayButtonWithCornerRadius PAL::softLink_PassKitCore_PKDrawApplePayButtonWithCornerRadius
 
 
 SOFT_LINK_CLASS_FOR_HEADER(PAL, PKPaymentAuthorizationResult)
@@ -87,19 +93,19 @@
 SOFT_LINK_CLASS_FOR_HEADER(PAL, PKPaymentRequestShippingContactUpdate)
 SOFT_LINK_CLASS_FOR_HEADER(PAL, PKPaymentRequestShippingMethodUpdate)
 
-SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKit, PKApplePayButtonDefaultCornerRadius, CGFloat)
-SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKit, PKContactFieldEmailAddress, PKContactField)
-SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKit, PKContactFieldName, PKContactField)
-SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKit, PKContactFieldPhoneNumber, PKContactField)
-SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKit, PKContactFieldPhoneticName, PKContactField)
-SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKit, PKContactFieldPostalAddress, PKContactField)
-SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKit, PKPaymentErrorContactFieldUserInfoKey, PKPaymentErrorKey)
-SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKit, PKPassKitErrorDomain, NSString *)
-SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKit, PKPaymentErrorDomain, NSString *)
-SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKit, PKPaymentErrorPostalAddressUserInfoKey, PKPaymentErrorKey)
+SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKitCore, PKApplePayButtonDefaultCornerRadius, CGFloat)
+SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKitCore, PKContactFieldEmailAddress, PKContactField)
+SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKitCore, PKContactFieldName, PKContactField)
+SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKitCore, PKContactFieldPhoneNumber, PKContactField)
+SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKitCore, PKContactFieldPhoneticName, PKContactField)
+SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKitCore, PKContactFieldPostalAddress, PKContactField)
+SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKitCore, PKPaymentErrorContactFieldUserInfoKey, PKPaymentErrorKey)
+SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKitCore, PKPassKitErrorDomain, NSString *)
+SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKitCore, PKPaymentErrorDomain, NSString *)
+SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKitCore, PKPaymentErrorPostalAddressUserInfoKey, PKPaymentErrorKey)
 
-SOFT_LINK_FUNCTION_FOR_HEADER(PAL, PassKit, PKCanMakePaymentsWithMerchantIdentifierDomainAndSourceApplication, void, (NSString *identifier, NSString *domain, NSString *sourceApplicationSecondaryIdentifier, PKCanMakePaymentsCompletion completion), (identifier, domain, sourceApplicationSecondaryIdentifier, completion))
-#define PKCanMakePaymentsWithMerchantIdentifierDomainAndSourceApplication PAL::softLink_PassKit_PKCanMakePaymentsWithMerchantIdentifierDomainAndSourceApplication
+SOFT_LINK_FUNCTION_FOR_HEADER(PAL, PassKitCore, PKCanMakePaymentsWithMerchantIdentifierDomainAndSourceApplication, void, (NSString *identifier, NSString *domain, NSString *sourceApplicationSecondaryIdentifier, PKCanMakePaymentsCompletion completion), (identifier, domain, sourceApplicationSecondaryIdentifier, completion))
+#define PKCanMakePaymentsWithMerchantIdentifierDomainAndSourceApplication PAL::softLink_PassKitCore_PKCanMakePaymentsWithMerchantIdentifierDomainAndSourceApplication
 
 #if USE(APPLE_INTERNAL_SDK)
 #import <WebKitAdditions/PassKitSoftLinkAdditions.h>

Modified: trunk/Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.mm (290435 => 290436)


--- trunk/Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.mm	2022-02-24 16:42:55 UTC (rev 290435)
+++ trunk/Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.mm	2022-02-24 16:46:20 UTC (rev 290436)
@@ -30,86 +30,101 @@
 #import "PassKitSPI.h"
 #import <wtf/SoftLinking.h>
 
+SOFT_LINK_PRIVATE_FRAMEWORK_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PAL_EXPORT)
+
 #if PLATFORM(MAC)
 
-SOFT_LINK_PRIVATE_FRAMEWORK_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT(PAL, PassKitCore, PKPaymentSetupConfiguration, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT(PAL, PassKitCore, PKPaymentSetupFeature, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT(PAL, PassKitCore, PKPaymentSetupRequest, PAL_EXPORT)
 
-SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT(PAL, PassKit, PKPaymentSetupConfiguration, PAL_EXPORT)
-SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT(PAL, PassKit, PKPaymentSetupController, PAL_EXPORT)
-SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT(PAL, PassKit, PKPaymentSetupFeature, PAL_EXPORT)
-SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT(PAL, PassKit, PKPaymentSetupRequest, PAL_EXPORT)
-
 #else // PLATFORM(MAC)
 
-SOFT_LINK_FRAMEWORK_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPaymentSetupConfiguration, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPaymentSetupFeature, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPaymentSetupRequest, PAL_EXPORT)
 
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentSetupConfiguration, PAL_EXPORT)
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentSetupController, PAL_EXPORT)
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentSetupFeature, PAL_EXPORT)
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentSetupRequest, PAL_EXPORT)
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentSetupViewController, PAL_EXPORT)
-
 #endif // PLATFORM(MAC)
 
 #if HAVE(PASSKIT_INSTALLMENTS)
-SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT(PAL, PassKit, PKPaymentInstallmentConfiguration, PAL_EXPORT)
-SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT(PAL, PassKit, PKPaymentInstallmentItem, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT(PAL, PassKitCore, PKPaymentInstallmentConfiguration, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT(PAL, PassKitCore, PKPaymentInstallmentItem, PAL_EXPORT)
 #endif
 
 #if HAVE(PASSKIT_RECURRING_SUMMARY_ITEM)
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKRecurringPaymentSummaryItem, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKRecurringPaymentSummaryItem, PAL_EXPORT)
 #endif
 
 #if HAVE(PASSKIT_DEFERRED_SUMMARY_ITEM)
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKDeferredPaymentSummaryItem, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKDeferredPaymentSummaryItem, PAL_EXPORT)
 #endif
 
 #if HAVE(PASSKIT_DEFAULT_SHIPPING_METHOD)
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKShippingMethods, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKShippingMethods, PAL_EXPORT)
 #endif
 
 #if HAVE(PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE)
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKDateComponentsRange, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKDateComponentsRange, PAL_EXPORT)
 #endif
 
 #if HAVE(PASSKIT_COUPON_CODE)
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentRequestCouponCodeUpdate, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPaymentRequestCouponCodeUpdate, PAL_EXPORT)
 #endif
 
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKContact, PAL_EXPORT)
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPassLibrary, PAL_EXPORT)
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPayment, PAL_EXPORT)
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentAuthorizationViewController, PAL_EXPORT)
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentMerchantSession, PAL_EXPORT)
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentMethod, PAL_EXPORT)
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentRequest, PAL_EXPORT)
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentSummaryItem, PAL_EXPORT)
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKShippingMethod, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKContact, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPassLibrary, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPayment, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPaymentMerchantSession, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPaymentMethod, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPaymentRequest, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPaymentSummaryItem, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKShippingMethod, PAL_EXPORT)
 
-#if PLATFORM(IOS_FAMILY)
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentAuthorizationController, PAL_EXPORT)
-#endif
+SOFT_LINK_FUNCTION_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKCanMakePaymentsWithMerchantIdentifierAndDomain, void, (NSString *identifier, NSString *domain, PKCanMakePaymentsCompletion completion), (identifier, domain, completion), PAL_EXPORT)
+SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, PassKitCore, PKDrawApplePayButtonWithCornerRadius, void, (CGContextRef context, CGRect drawRect, CGFloat scale, CGFloat cornerRadius, PKPaymentButtonType type, PKPaymentButtonStyle style, NSString *languageCode), (context, drawRect, scale, cornerRadius, type, style, languageCode))
 
-SOFT_LINK_FUNCTION_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKCanMakePaymentsWithMerchantIdentifierAndDomain, void, (NSString *identifier, NSString *domain, PKCanMakePaymentsCompletion completion), (identifier, domain, completion), PAL_EXPORT)
-SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, PassKit, PKDrawApplePayButtonWithCornerRadius, void, (CGContextRef context, CGRect drawRect, CGFloat scale, CGFloat cornerRadius, PKPaymentButtonType type, PKPaymentButtonStyle style, NSString *languageCode), (context, drawRect, scale, cornerRadius, type, style, languageCode))
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPaymentAuthorizationResult, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPaymentRequestPaymentMethodUpdate, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPaymentRequestShippingContactUpdate, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPaymentRequestShippingMethodUpdate, PAL_EXPORT)
 
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentAuthorizationResult, PAL_EXPORT)
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentRequestPaymentMethodUpdate, PAL_EXPORT)
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentRequestShippingContactUpdate, PAL_EXPORT)
-SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentRequestShippingMethodUpdate, PAL_EXPORT)
+SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKApplePayButtonDefaultCornerRadius, CGFloat, PAL_EXPORT)
+SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKContactFieldEmailAddress, PKContactField, PAL_EXPORT)
+SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKContactFieldName, PKContactField, PAL_EXPORT)
+SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKContactFieldPhoneNumber, PKContactField, PAL_EXPORT)
+SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKContactFieldPhoneticName, PKContactField, PAL_EXPORT)
+SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKContactFieldPostalAddress, PKContactField, PAL_EXPORT)
+SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPaymentErrorContactFieldUserInfoKey, PKPaymentErrorKey, PAL_EXPORT)
+SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPassKitErrorDomain, NSString *, PAL_EXPORT)
+SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPaymentErrorDomain, NSString *, PAL_EXPORT)
+SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPaymentErrorPostalAddressUserInfoKey, PKPaymentErrorKey, PAL_EXPORT)
 
-SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKApplePayButtonDefaultCornerRadius, CGFloat, PAL_EXPORT)
-SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKContactFieldEmailAddress, PKContactField, PAL_EXPORT)
-SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKContactFieldName, PKContactField, PAL_EXPORT)
-SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKContactFieldPhoneNumber, PKContactField, PAL_EXPORT)
-SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKContactFieldPhoneticName, PKContactField, PAL_EXPORT)
-SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKContactFieldPostalAddress, PKContactField, PAL_EXPORT)
-SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentErrorContactFieldUserInfoKey, PKPaymentErrorKey, PAL_EXPORT)
-SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPassKitErrorDomain, NSString *, PAL_EXPORT)
-SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentErrorDomain, NSString *, PAL_EXPORT)
-SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentErrorPostalAddressUserInfoKey, PKPaymentErrorKey, PAL_EXPORT)
+SOFT_LINK_FUNCTION_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKCanMakePaymentsWithMerchantIdentifierDomainAndSourceApplication, void, (NSString *identifier, NSString *domain, NSString *sourceApplicationSecondaryIdentifier, PKCanMakePaymentsCompletion completion), (identifier, domain, sourceApplicationSecondaryIdentifier, completion), PAL_EXPORT)
 
-SOFT_LINK_FUNCTION_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKCanMakePaymentsWithMerchantIdentifierDomainAndSourceApplication, void, (NSString *identifier, NSString *domain, NSString *sourceApplicationSecondaryIdentifier, PKCanMakePaymentsCompletion completion), (identifier, domain, sourceApplicationSecondaryIdentifier, completion), PAL_EXPORT)
+#if HAVE(PASSKIT_UI)
+SOFT_LINK_PRIVATE_FRAMEWORK_FOR_SOURCE_WITH_EXPORT(PAL, PassKitUI, PAL_EXPORT)
+#if PLATFORM(MAC)
+SOFT_LINK_PRIVATE_FRAMEWORK_FOR_SOURCE_WITH_EXPORT(PAL, PassKitMacHelper, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitMacHelper, PKPaymentAuthorizationViewController, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT(PAL, PassKitUI, PKPaymentSetupController, PAL_EXPORT)
+#endif
+#if PLATFORM(IOS_FAMILY)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitUI, PKPaymentAuthorizationController, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitUI, PKPaymentAuthorizationViewController, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitUI, PKPaymentSetupController, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitUI, PKPaymentSetupViewController, PAL_EXPORT)
+#endif
+#else // HAVE(PASSKIT_UI)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPaymentAuthorizationViewController, PAL_EXPORT)
+#if PLATFORM(MAC)
+SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT(PAL, PassKitCore, PKPaymentSetupController, PAL_EXPORT)
+#endif
+#if PLATFORM(IOS_FAMILY)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPaymentAuthorizationController, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPaymentSetupController, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKitCore, PKPaymentSetupViewController, PAL_EXPORT)
+#endif
+#endif // HAVE(PASSKIT_UI)
 
 #if USE(APPLE_INTERNAL_SDK)
 #import <WebKitAdditions/PassKitSoftLinkAdditions.mm>

Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/PassKitInstallmentsSPI.h (290435 => 290436)


--- trunk/Source/WebCore/PAL/pal/spi/cocoa/PassKitInstallmentsSPI.h	2022-02-24 16:42:55 UTC (rev 290435)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/PassKitInstallmentsSPI.h	2022-02-24 16:46:20 UTC (rev 290436)
@@ -29,8 +29,8 @@
 
 #if HAVE(PASSKIT_INSTALLMENTS_IN_SDK)
 
-#import <PassKit/PKPaymentRequest_Private.h>
 #import <PassKitCore/PKPaymentMethod_Private.h>
+#import <PassKitCore/PKPaymentRequest_Private.h>
 #import <PassKitCore/PKPaymentRequestStatus_Private.h>
 #import <PassKitCore/PKPayment_Private.h>
 

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


--- trunk/Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h	2022-02-24 16:42:55 UTC (rev 290435)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h	2022-02-24 16:46:20 UTC (rev 290436)
@@ -23,48 +23,29 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if HAVE(PASSKIT_RECURRING_SUMMARY_ITEM)
-#import <PassKit/PKRecurringPaymentSummaryItem.h>
-#endif
+#if USE(APPLE_INTERNAL_SDK)
 
-#if HAVE(PASSKIT_DEFERRED_SUMMARY_ITEM)
-#import <PassKit/PKDeferredPaymentSummaryItem.h>
-#endif
-
-#if !PLATFORM(MAC) || USE(APPLE_INTERNAL_SDK)
-
 // FIXME: PassKit does not declare its NSString constant symbols with C linkage, so we end up with
 // linkage mismatches in the SOFT_LINK_CONSTANT macros used in PassKitSoftLink.mm unless we wrap
 // these includes in an extern "C" block.
 WTF_EXTERN_C_BEGIN
-#import <PassKit/PKConstants.h>
-#import <PassKit/PKError.h>
+#import <PassKitCore/PKConstants.h>
+#import <PassKitCore/PKError.h>
 WTF_EXTERN_C_END
 
-#endif // !PLATFORM(MAC) || USE(APPLE_INTERNAL_SDK)
-
-#if USE(APPLE_INTERNAL_SDK)
-
-#import <PassKit/PKContact.h>
-#import <PassKit/PKError_Private.h>
-#import <PassKit/PKPassLibrary.h>
-#import <PassKit/PKPayment.h>
-#import <PassKit/PKPaymentAuthorizationViewController_Private.h>
-#import <PassKit/PKPaymentMethod.h>
-#import <PassKit/PKPaymentPass.h>
-#import <PassKit/PKPaymentSetupConfiguration_WebKit.h>
-#import <PassKit/PKPaymentSetupController.h>
-#import <PassKit/PKPaymentSetupRequest.h>
+#import <PassKitCore/PKContact.h>
+#import <PassKitCore/PKError_Private.h>
+#import <PassKitCore/PKPassLibrary.h>
+#import <PassKitCore/PKPayment.h>
+#import <PassKitCore/PKPaymentMethod.h>
+#import <PassKitCore/PKPaymentPass.h>
+#import <PassKitCore/PKPaymentRequest_WebKit.h>
 #import <PassKitCore/PKPaymentRequestStatus.h>
-#import <PassKitCore/PKPaymentRequest_WebKit.h>
+#import <PassKitCore/PKPaymentSetupConfiguration_WebKit.h>
+#import <PassKitCore/PKPaymentSetupRequest.h>
 
-#if PLATFORM(IOS_FAMILY)
-#import <PassKit/PKPaymentAuthorizationController_Private.h>
-#import <PassKit/PKPaymentSetupViewController.h>
-#endif
-
 #if !HAVE(PASSKIT_INSTALLMENTS)
-#import <PassKit/PKPaymentRequest_Private.h>
+#import <PassKitCore/PKPaymentRequest_Private.h>
 #endif
 
 #if HAVE(PASSKIT_RECURRING_SUMMARY_ITEM)
@@ -71,6 +52,10 @@
 #import <PassKitCore/PKRecurringPaymentSummaryItem.h>
 #endif
 
+#if HAVE(PASSKIT_DEFERRED_SUMMARY_ITEM)
+#import <PassKitCore/PKDeferredPaymentSummaryItem.h>
+#endif
+
 #if HAVE(PASSKIT_DEFAULT_SHIPPING_METHOD)
 #import <PassKitCore/PKShippingMethods.h>
 #endif
@@ -79,6 +64,30 @@
 #import <PassKitCore/PKDateComponentsRange.h>
 #endif
 
+#if HAVE(PASSKIT_UI)
+// FIXME: remove this after <rdar://88985220>
+#if __has_include(<PassKitUI/PKPaymentSetupController.h>)
+#import <PassKitUI/PKPaymentSetupController.h>
+#else
+#import <PassKit/PKPaymentSetupController.h>
+#endif
+#if PLATFORM(MAC)
+#import <PassKitMacHelper/PKPaymentAuthorizationViewController_Private.h>
+#endif
+#if PLATFORM(IOS_FAMILY)
+#import <PassKitUI/PKPaymentAuthorizationController_Private.h>
+#import <PassKitUI/PKPaymentAuthorizationViewController_Private.h>
+#import <PassKitUI/PKPaymentSetupViewController.h>
+#endif
+#else // HAVE(PASSKIT_UI)
+#import <PassKitCore/PKPaymentSetupController.h>
+#import <PassKitCore/PKPaymentAuthorizationViewController_Private.h>
+#if PLATFORM(IOS_FAMILY)
+#import <PassKitCore/PKPaymentAuthorizationController_Private.h>
+#import <PassKitCore/PKPaymentSetupViewController.h>
+#endif
+#endif // HAVE(PASSKIT_UI)
+
 #import <WebKitAdditions/PassKitSPIAdditions.h>
 
 #else // USE(APPLE_INTERNAL_SDK)

Modified: trunk/Source/WebCore/rendering/RenderThemeCocoa.mm (290435 => 290436)


--- trunk/Source/WebCore/rendering/RenderThemeCocoa.mm	2022-02-24 16:42:55 UTC (rev 290435)
+++ trunk/Source/WebCore/rendering/RenderThemeCocoa.mm	2022-02-24 16:46:20 UTC (rev 290436)
@@ -95,7 +95,7 @@
     style.setMinHeight(Length(applePayButtonMinimumHeight, LengthType::Fixed));
 
     if (!style.hasExplicitlySetBorderRadius()) {
-        auto cornerRadius = PAL::get_PassKit_PKApplePayButtonDefaultCornerRadius();
+        auto cornerRadius = PAL::get_PassKitCore_PKApplePayButtonDefaultCornerRadius();
         style.setBorderRadius({ { cornerRadius, LengthType::Fixed }, { cornerRadius, LengthType::Fixed } });
     }
 }

Modified: trunk/Source/WebKit/ChangeLog (290435 => 290436)


--- trunk/Source/WebKit/ChangeLog	2022-02-24 16:42:55 UTC (rev 290435)
+++ trunk/Source/WebKit/ChangeLog	2022-02-24 16:46:20 UTC (rev 290436)
@@ -1,3 +1,25 @@
+2022-02-24  Devin Rousso  <drou...@apple.com>
+
+        [Apple Pay] switch from `PassKit/*` to `PassKit[Core,UI]/*`
+        https://bugs.webkit.org/show_bug.cgi?id=237091
+        <rdar://problem/81085862>
+
+        Reviewed by Tim Horton.
+
+        * Platform/cocoa/PaymentAuthorizationPresenter.mm:
+        (WebKit::toNSError):
+        * Platform/cocoa/WKPaymentAuthorizationDelegate.mm:
+        (-[WKPaymentAuthorizationDelegate _willFinishWithError:]):
+        * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
+        (WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
+        (WebKit::WebPaymentCoordinatorProxy::platformOpenPaymentSetup):
+        (WebKit::toPKContactFields):
+        * Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
+        (WebKit::WebPaymentCoordinatorProxy::platformCanMakePayments):
+        (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
+        * WebProcess/ApplePay/cocoa/WebPaymentCoordinatorCocoa.mm:
+        (WebKit::WebPaymentCoordinator::platformAvailablePaymentNetworks):
+
 2022-02-24  Kimmo Kinnunen  <kkinnu...@apple.com>
 
         LibWebRTCCodecs, -Proxy create and communicate the RemoteVideoFrameProxy incorrectly

Modified: trunk/Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm (290435 => 290436)


--- trunk/Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm	2022-02-24 16:42:55 UTC (rev 290435)
+++ trunk/Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm	2022-02-24 16:46:20 UTC (rev 290436)
@@ -128,72 +128,72 @@
 
         switch (*contactField) {
         case WebCore::ApplePayErrorContactField::PhoneNumber:
-            pkContactField = PAL::get_PassKit_PKContactFieldPhoneNumber();
+            pkContactField = PAL::get_PassKitCore_PKContactFieldPhoneNumber();
             break;
             
         case WebCore::ApplePayErrorContactField::EmailAddress:
-            pkContactField = PAL::get_PassKit_PKContactFieldEmailAddress();
+            pkContactField = PAL::get_PassKitCore_PKContactFieldEmailAddress();
             break;
             
         case WebCore::ApplePayErrorContactField::Name:
-            pkContactField = PAL::get_PassKit_PKContactFieldName();
+            pkContactField = PAL::get_PassKitCore_PKContactFieldName();
             break;
             
         case WebCore::ApplePayErrorContactField::PhoneticName:
-            pkContactField = PAL::get_PassKit_PKContactFieldPhoneticName();
+            pkContactField = PAL::get_PassKitCore_PKContactFieldPhoneticName();
             break;
             
         case WebCore::ApplePayErrorContactField::PostalAddress:
-            pkContactField = PAL::get_PassKit_PKContactFieldPostalAddress();
+            pkContactField = PAL::get_PassKitCore_PKContactFieldPostalAddress();
             break;
             
         case WebCore::ApplePayErrorContactField::AddressLines:
-            pkContactField = PAL::get_PassKit_PKContactFieldPostalAddress();
+            pkContactField = PAL::get_PassKitCore_PKContactFieldPostalAddress();
             postalAddressKey = getCNPostalAddressStreetKey();
             break;
             
         case WebCore::ApplePayErrorContactField::SubLocality:
-            pkContactField = PAL::get_PassKit_PKContactFieldPostalAddress();
+            pkContactField = PAL::get_PassKitCore_PKContactFieldPostalAddress();
             postalAddressKey = getCNPostalAddressSubLocalityKey();
             break;
             
         case WebCore::ApplePayErrorContactField::Locality:
-            pkContactField = PAL::get_PassKit_PKContactFieldPostalAddress();
+            pkContactField = PAL::get_PassKitCore_PKContactFieldPostalAddress();
             postalAddressKey = getCNPostalAddressCityKey();
             break;
             
         case WebCore::ApplePayErrorContactField::PostalCode:
-            pkContactField = PAL::get_PassKit_PKContactFieldPostalAddress();
+            pkContactField = PAL::get_PassKitCore_PKContactFieldPostalAddress();
             postalAddressKey = getCNPostalAddressPostalCodeKey();
             break;
             
         case WebCore::ApplePayErrorContactField::SubAdministrativeArea:
-            pkContactField = PAL::get_PassKit_PKContactFieldPostalAddress();
+            pkContactField = PAL::get_PassKitCore_PKContactFieldPostalAddress();
             postalAddressKey = getCNPostalAddressSubAdministrativeAreaKey();
             break;
             
         case WebCore::ApplePayErrorContactField::AdministrativeArea:
-            pkContactField = PAL::get_PassKit_PKContactFieldPostalAddress();
+            pkContactField = PAL::get_PassKitCore_PKContactFieldPostalAddress();
             postalAddressKey = getCNPostalAddressStateKey();
             break;
             
         case WebCore::ApplePayErrorContactField::Country:
-            pkContactField = PAL::get_PassKit_PKContactFieldPostalAddress();
+            pkContactField = PAL::get_PassKitCore_PKContactFieldPostalAddress();
             postalAddressKey = getCNPostalAddressCountryKey();
             break;
             
         case WebCore::ApplePayErrorContactField::CountryCode:
-            pkContactField = PAL::get_PassKit_PKContactFieldPostalAddress();
+            pkContactField = PAL::get_PassKitCore_PKContactFieldPostalAddress();
             postalAddressKey = getCNPostalAddressISOCountryCodeKey();
             break;
         }
 
-        [userInfo setObject:pkContactField forKey:PAL::get_PassKit_PKPaymentErrorContactFieldUserInfoKey()];
+        [userInfo setObject:pkContactField forKey:PAL::get_PassKitCore_PKPaymentErrorContactFieldUserInfoKey()];
         if (postalAddressKey)
-            [userInfo setObject:postalAddressKey forKey:PAL::get_PassKit_PKPaymentErrorPostalAddressUserInfoKey()];
+            [userInfo setObject:postalAddressKey forKey:PAL::get_PassKitCore_PKPaymentErrorPostalAddressUserInfoKey()];
     }
 
-    return [NSError errorWithDomain:PAL::get_PassKit_PKPaymentErrorDomain() code:toPKPaymentErrorCode(error.code()) userInfo:userInfo.get()];
+    return [NSError errorWithDomain:PAL::get_PassKitCore_PKPaymentErrorDomain() code:toPKPaymentErrorCode(error.code()) userInfo:userInfo.get()];
 }
 
 static RetainPtr<NSArray> toNSErrors(const Vector<RefPtr<WebCore::ApplePayError>>& errors)

Modified: trunk/Source/WebKit/Platform/cocoa/WKPaymentAuthorizationDelegate.mm (290435 => 290436)


--- trunk/Source/WebKit/Platform/cocoa/WKPaymentAuthorizationDelegate.mm	2022-02-24 16:42:55 UTC (rev 290435)
+++ trunk/Source/WebKit/Platform/cocoa/WKPaymentAuthorizationDelegate.mm	2022-02-24 16:46:20 UTC (rev 290436)
@@ -336,7 +336,7 @@
 
 - (void)_willFinishWithError:(NSError *)error
 {
-    if (![error.domain isEqualToString:PAL::get_PassKit_PKPassKitErrorDomain()])
+    if (![error.domain isEqualToString:PAL::get_PassKitCore_PKPassKitErrorDomain()])
         return;
 
     _sessionError = error;

Modified: trunk/Source/WebKit/Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm (290435 => 290436)


--- trunk/Source/WebKit/Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm	2022-02-24 16:42:55 UTC (rev 290435)
+++ trunk/Source/WebKit/Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm	2022-02-24 16:46:20 UTC (rev 290436)
@@ -78,7 +78,7 @@
 void WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard(const String& merchantIdentifier, const String& domainName, WTF::Function<void(bool)>&& completionHandler)
 {
 #if PLATFORM(MAC)
-    if (!PAL::isPassKitFrameworkAvailable())
+    if (!PAL::isPassKitCoreFrameworkAvailable())
         return completionHandler(false);
 #endif
 
@@ -95,7 +95,7 @@
 void WebPaymentCoordinatorProxy::platformOpenPaymentSetup(const String& merchantIdentifier, const String& domainName, WTF::Function<void(bool)>&& completionHandler)
 {
 #if PLATFORM(MAC)
-    if (!PAL::isPassKitFrameworkAvailable())
+    if (!PAL::isPassKitCoreFrameworkAvailable())
         return completionHandler(false);
 #endif
 
@@ -112,15 +112,15 @@
     Vector<NSString *> result;
 
     if (contactFields.postalAddress)
-        result.append(PAL::get_PassKit_PKContactFieldPostalAddress());
+        result.append(PAL::get_PassKitCore_PKContactFieldPostalAddress());
     if (contactFields.phone)
-        result.append(PAL::get_PassKit_PKContactFieldPhoneNumber());
+        result.append(PAL::get_PassKitCore_PKContactFieldPhoneNumber());
     if (contactFields.email)
-        result.append(PAL::get_PassKit_PKContactFieldEmailAddress());
+        result.append(PAL::get_PassKitCore_PKContactFieldEmailAddress());
     if (contactFields.name)
-        result.append(PAL::get_PassKit_PKContactFieldName());
+        result.append(PAL::get_PassKitCore_PKContactFieldName());
     if (contactFields.phoneticName)
-        result.append(PAL::get_PassKit_PKContactFieldPhoneticName());
+        result.append(PAL::get_PassKitCore_PKContactFieldPhoneticName());
 
     return adoptNS([[NSSet alloc] initWithObjects:result.data() count:result.size()]);
 }

Modified: trunk/Source/WebKit/Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm (290435 => 290436)


--- trunk/Source/WebKit/Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm	2022-02-24 16:42:55 UTC (rev 290435)
+++ trunk/Source/WebKit/Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm	2022-02-24 16:46:20 UTC (rev 290436)
@@ -37,7 +37,11 @@
 
 void WebPaymentCoordinatorProxy::platformCanMakePayments(CompletionHandler<void(bool)>&& completionHandler)
 {
-    if (!PAL::isPassKitFrameworkAvailable())
+#if HAVE(PASSKIT_UI)
+    if (!PAL::isPassKitMacHelperFrameworkAvailable())
+#else
+    if (!PAL::isPassKitCoreFrameworkAvailable())
+#endif
         return completionHandler(false);
 
     m_canMakePaymentsQueue->dispatch([theClass = retainPtr(PAL::getPKPaymentAuthorizationViewControllerClass()), completionHandler = WTFMove(completionHandler)]() mutable {
@@ -49,7 +53,11 @@
 
 void WebPaymentCoordinatorProxy::platformShowPaymentUI(WebPageProxyIdentifier, const URL& originatingURL, const Vector<URL>& linkIconURLStrings, const WebCore::ApplePaySessionPaymentRequest& request, CompletionHandler<void(bool)>&& completionHandler)
 {
-    if (!PAL::isPassKitFrameworkAvailable())
+#if HAVE(PASSKIT_UI)
+    if (!PAL::isPassKitMacHelperFrameworkAvailable())
+#else
+    if (!PAL::isPassKitCoreFrameworkAvailable())
+#endif
         return completionHandler(false);
 
     auto paymentRequest = platformPaymentRequest(originatingURL, linkIconURLStrings, request);

Modified: trunk/Source/WebKit/WebProcess/ApplePay/cocoa/WebPaymentCoordinatorCocoa.mm (290435 => 290436)


--- trunk/Source/WebKit/WebProcess/ApplePay/cocoa/WebPaymentCoordinatorCocoa.mm	2022-02-24 16:42:55 UTC (rev 290435)
+++ trunk/Source/WebKit/WebProcess/ApplePay/cocoa/WebPaymentCoordinatorCocoa.mm	2022-02-24 16:46:20 UTC (rev 290436)
@@ -35,7 +35,7 @@
 WebPaymentCoordinator::AvailablePaymentNetworksSet WebPaymentCoordinator::platformAvailablePaymentNetworks()
 {
 #if PLATFORM(MAC)
-    if (!PAL::isPassKitFrameworkAvailable())
+    if (!PAL::isPassKitCoreFrameworkAvailable())
         return { };
 #endif
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to