[Apple Pay] Move WebPaymentCoordinatorProxy from Source/WebKit/UIProcess to Source...
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Mar 2019 16:47:58 +0000 (16:47 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Mar 2019 16:47:58 +0000 (16:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=195080
<rdar://problem/48421558>

Reviewed by Antti Koivisto.

Source/WebKit:

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources.make:
* Shared/ApplePay/WebPaymentCoordinatorProxy.cpp: Renamed from Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp.
* Shared/ApplePay/WebPaymentCoordinatorProxy.h: Renamed from Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.h.
* Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in: Renamed from Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in.
* Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h: Renamed from Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h.
* Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: Renamed from Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm.
* Shared/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm: Renamed from Source/WebKit/UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm.
* Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm: Renamed from Source/WebKit/UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm.
* Shared/mac/WebHitTestResultData.mm:
* SourcesCocoa.txt:
* UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.h:
* UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:
* UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
* UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
* WebKit.xcodeproj/project.pbxproj:

Source/WTF:

* wtf/FeatureDefines.h:

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

20 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/FeatureDefines.h
Source/WebKit/CMakeLists.txt
Source/WebKit/ChangeLog
Source/WebKit/DerivedSources-input.xcfilelist
Source/WebKit/DerivedSources.make
Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.cpp [moved from Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp with 100% similarity]
Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.h [moved from Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.h with 97% similarity]
Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in [moved from Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in with 100% similarity]
Source/WebKit/Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h [moved from Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h with 69% similarity]
Source/WebKit/Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm [moved from Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm with 92% similarity]
Source/WebKit/Shared/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm [moved from Source/WebKit/UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm with 100% similarity]
Source/WebKit/Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm [moved from Source/WebKit/UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm with 100% similarity]
Source/WebKit/Shared/mac/WebHitTestResultData.mm
Source/WebKit/SourcesCocoa.txt
Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.h
Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm
Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h
Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm
Source/WebKit/WebKit.xcodeproj/project.pbxproj

index 33fda98..a8bbbc0 100644 (file)
@@ -1,3 +1,13 @@
+2019-03-04  Andy Estes  <aestes@apple.com>
+
+        [Apple Pay] Move WebPaymentCoordinatorProxy from Source/WebKit/UIProcess to Source/WebKit/Shared
+        https://bugs.webkit.org/show_bug.cgi?id=195080
+        <rdar://problem/48421558>
+
+        Reviewed by Antti Koivisto.
+
+        * wtf/FeatureDefines.h:
+
 2019-03-04  Michael Catanzaro  <mcatanzaro@igalia.com>
 
         URLHelpers should use unorm2_quickCheck before converting to NFC
index cf92c5b..719be60 100644 (file)
@@ -179,6 +179,10 @@ the public iOS SDK. See <https://webkit.org/b/179167>. */
 #define ENABLE_MEDIA_SOURCE 0
 #endif
 
+#if !defined(HAVE_PASSKIT_GRANULAR_ERRORS)
+#define HAVE_PASSKIT_GRANULAR_ERRORS 1
+#endif
+
 #endif /* PLATFORM(IOS_FAMILY) */
 
 /* --------- Apple WATCHOS port --------- */
@@ -265,6 +269,10 @@ the public iOS SDK. See <https://webkit.org/b/179167>. */
 #define ENABLE_MEDIA_SOURCE 1
 #endif
 
+#if !defined(HAVE_PASSKIT_GRANULAR_ERRORS)
+#define HAVE_PASSKIT_GRANULAR_ERRORS __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
+#endif
+
 #endif /* PLATFORM(MAC) */
 
 #if PLATFORM(COCOA)
index bcb8764..e1d9639 100644 (file)
@@ -21,6 +21,7 @@ set(WebKit_INCLUDE_DIRECTORIES
     "${WEBKIT_DIR}/Shared"
     "${WEBKIT_DIR}/Shared/API"
     "${WEBKIT_DIR}/Shared/API/c"
+    "${WEBKIT_DIR}/Shared/ApplePay"
     "${WEBKIT_DIR}/Shared/Authentication"
     "${WEBKIT_DIR}/Shared/CoreIPCSupport"
     "${WEBKIT_DIR}/Shared/Databases"
@@ -36,7 +37,6 @@ set(WebKit_INCLUDE_DIRECTORIES
     "${WEBKIT_DIR}/UIProcess/API"
     "${WEBKIT_DIR}/UIProcess/API/C"
     "${WEBKIT_DIR}/UIProcess/API/cpp"
-    "${WEBKIT_DIR}/UIProcess/ApplePay"
     "${WEBKIT_DIR}/UIProcess/Authentication"
     "${WEBKIT_DIR}/UIProcess/Automation"
     "${WEBKIT_DIR}/UIProcess/Downloads"
index 86d72f5..c4c8e6e 100644 (file)
@@ -1,3 +1,29 @@
+2019-03-04  Andy Estes  <aestes@apple.com>
+
+        [Apple Pay] Move WebPaymentCoordinatorProxy from Source/WebKit/UIProcess to Source/WebKit/Shared
+        https://bugs.webkit.org/show_bug.cgi?id=195080
+        <rdar://problem/48421558>
+
+        Reviewed by Antti Koivisto.
+
+        * CMakeLists.txt:
+        * DerivedSources-input.xcfilelist:
+        * DerivedSources.make:
+        * Shared/ApplePay/WebPaymentCoordinatorProxy.cpp: Renamed from Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp.
+        * Shared/ApplePay/WebPaymentCoordinatorProxy.h: Renamed from Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.h.
+        * Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in: Renamed from Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in.
+        * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h: Renamed from Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h.
+        * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: Renamed from Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm.
+        * Shared/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm: Renamed from Source/WebKit/UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm.
+        * Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm: Renamed from Source/WebKit/UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm.
+        * Shared/mac/WebHitTestResultData.mm:
+        * SourcesCocoa.txt:
+        * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.h:
+        * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:
+        * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
+        * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
+        * WebKit.xcodeproj/project.pbxproj:
+
 2019-03-04  Jer Noble  <jer.noble@apple.com>
 
         [iOS] Fullscreen "stay in page" option breaks video playback
index 3d63e78..6f0218f 100644 (file)
@@ -52,13 +52,13 @@ $(PROJECT_DIR)/Scripts/webkit/messages.py
 $(PROJECT_DIR)/Scripts/webkit/model.py
 $(PROJECT_DIR)/Scripts/webkit/parser.py
 $(PROJECT_DIR)/Shared/API/Cocoa/RemoteObjectRegistry.messages.in
+$(PROJECT_DIR)/Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in
 $(PROJECT_DIR)/Shared/Authentication/AuthenticationManager.messages.in
 $(PROJECT_DIR)/Shared/AuxiliaryProcess.messages.in
 $(PROJECT_DIR)/Shared/HTTPSUpgrade/HTTPSUpgradeList.txt
 $(PROJECT_DIR)/Shared/Plugins/NPObjectMessageReceiver.messages.in
 $(PROJECT_DIR)/Shared/WebConnection.messages.in
 $(PROJECT_DIR)/Shared/WebPreferences.yaml
-$(PROJECT_DIR)/UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in
 $(PROJECT_DIR)/UIProcess/Automation/Automation.json
 $(PROJECT_DIR)/UIProcess/Automation/WebAutomationSession.messages.in
 $(PROJECT_DIR)/UIProcess/Cocoa/PlaybackSessionManagerProxy.messages.in
index c394675..6e82552 100644 (file)
@@ -35,6 +35,7 @@ VPATH = \
     $(WebKit2)/Shared/Plugins \
     $(WebKit2)/Shared \
     $(WebKit2)/Shared/API/Cocoa \
+    $(WebKit2)/Shared/ApplePay \
     $(WebKit2)/Shared/Authentication \
     $(WebKit2)/Shared/mac \
     $(WebKit2)/WebProcess/ApplePay \
@@ -64,7 +65,6 @@ VPATH = \
     $(WebKit2)/WebProcess/ios \
     $(WebKit2)/WebProcess \
     $(WebKit2)/UIProcess \
-    $(WebKit2)/UIProcess/ApplePay \
     $(WebKit2)/UIProcess/Automation \
     $(WebKit2)/UIProcess/Cocoa \
     $(WebKit2)/UIProcess/Databases \
@@ -125,8 +125,8 @@ private:
 
     Vector<String> platformAvailablePaymentNetworks();
     bool platformCanMakePayments();
-    void platformCanMakePaymentsWithActiveCard(const String& merchantIdentifier, const String& domainName, WTF::Function<void (bool)>&& completionHandler);
-    void platformOpenPaymentSetup(const String& merchantIdentifier, const String& domainName, WTF::Function<void (bool)>&& completionHandler);
+    void platformCanMakePaymentsWithActiveCard(const String& merchantIdentifier, const String& domainName, WTF::Function<void(bool)>&& completionHandler);
+    void platformOpenPaymentSetup(const String& merchantIdentifier, const String& domainName, WTF::Function<void(bool)>&& completionHandler);
     void platformShowPaymentUI(const URL& originatingURL, const Vector<URL>& linkIconURLs, const WebCore::ApplePaySessionPaymentRequest&, CompletionHandler<void(bool)>&&);
     void platformCompleteMerchantValidation(const WebCore::PaymentMerchantSession&);
     void platformCompleteShippingMethodSelection(const Optional<WebCore::ShippingMethodUpdate>&);
@@ -27,6 +27,7 @@
 
 #if ENABLE(APPLE_PAY)
 
+#import "WebPaymentCoordinatorProxy.h"
 #import <WebCore/PaymentHeaders.h>
 #import <pal/spi/cocoa/PassKitSPI.h>
 #import <wtf/BlockPtr.h>
     RetainPtr<NSArray> _paymentSummaryItems;
     RetainPtr<NSArray> _shippingMethods;
 
-    BlockPtr<void (PKPaymentMerchantSession *, NSError *)> _sessionBlock;
+    BlockPtr<void(PKPaymentMerchantSession *, NSError *)> _sessionBlock;
 
     BOOL _didReachFinalState;
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
-    BlockPtr<void (PKPaymentAuthorizationResult *)> _paymentAuthorizedCompletion;
-    BlockPtr<void (PKPaymentRequestPaymentMethodUpdate *)> _didSelectPaymentMethodCompletion;
-    BlockPtr<void (PKPaymentRequestShippingMethodUpdate *)> _didSelectShippingMethodCompletion;
-    BlockPtr<void (PKPaymentRequestShippingContactUpdate *)> _didSelectShippingContactCompletion;
+#if HAVE(PASSKIT_GRANULAR_ERRORS)
+    BlockPtr<void(PKPaymentAuthorizationResult *)> _paymentAuthorizedCompletion;
+    BlockPtr<void(PKPaymentRequestPaymentMethodUpdate *)> _didSelectPaymentMethodCompletion;
+    BlockPtr<void(PKPaymentRequestShippingMethodUpdate *)> _didSelectShippingMethodCompletion;
+    BlockPtr<void(PKPaymentRequestShippingContactUpdate *)> _didSelectShippingContactCompletion;
 #else
-    BlockPtr<void (PKPaymentAuthorizationStatus)> _paymentAuthorizedCompletion;
-    BlockPtr<void (NSArray *)> _didSelectPaymentMethodCompletion;
-    BlockPtr<void (PKPaymentAuthorizationStatus, NSArray *)> _didSelectShippingMethodCompletion;
-    BlockPtr<void (PKPaymentAuthorizationStatus, NSArray *, NSArray *)> _didSelectShippingContactCompletion;
+    BlockPtr<void(PKPaymentAuthorizationStatus)> _paymentAuthorizedCompletion;
+    BlockPtr<void(NSArray *)> _didSelectPaymentMethodCompletion;
+    BlockPtr<void(PKPaymentAuthorizationStatus, NSArray *)> _didSelectShippingMethodCompletion;
+    BlockPtr<void(PKPaymentAuthorizationStatus, NSArray *, NSArray *)> _didSelectShippingContactCompletion;
 #endif
 }
 
@@ -37,7 +37,7 @@
 #import <wtf/RunLoop.h>
 #import <wtf/URL.h>
 
-#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101300)
+#if HAVE(PASSKIT_GRANULAR_ERRORS)
 SOFT_LINK_FRAMEWORK(Contacts)
 SOFT_LINK_CONSTANT(Contacts, CNPostalAddressStreetKey, NSString *);
 SOFT_LINK_CONSTANT(Contacts, CNPostalAddressSubLocalityKey, NSString *);
@@ -66,7 +66,7 @@ SOFT_LINK_CONSTANT(PAL::PassKit, PKPaymentErrorDomain, NSString *);
 {
     _webPaymentCoordinatorProxy = nullptr;
     if (_paymentAuthorizedCompletion) {
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
+#if HAVE(PASSKIT_GRANULAR_ERRORS)
         _paymentAuthorizedCompletion(adoptNS([PAL::allocPKPaymentAuthorizationResultInstance() initWithStatus:PKPaymentAuthorizationStatusFailure errors:@[ ]]).get());
 #else
         _paymentAuthorizedCompletion(PKPaymentAuthorizationStatusFailure);
@@ -114,11 +114,10 @@ static WebCore::ApplePaySessionPaymentRequest::ShippingMethod toShippingMethod(P
     return result;
 }
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101300) || PLATFORM(IOS_FAMILY)
+#if HAVE(PASSKIT_GRANULAR_ERRORS)
 
 - (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller didAuthorizePayment:(PKPayment *)payment handler:(void (^)(PKPaymentAuthorizationResult *result))completion
 {
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
     if (!_webPaymentCoordinatorProxy) {
         completion(adoptNS([PAL::allocPKPaymentAuthorizationResultInstance() initWithStatus:PKPaymentAuthorizationStatusFailure errors:@[ ]]).get());
         return;
@@ -128,12 +127,10 @@ static WebCore::ApplePaySessionPaymentRequest::ShippingMethod toShippingMethod(P
     _paymentAuthorizedCompletion = completion;
 
     _webPaymentCoordinatorProxy->didAuthorizePayment(WebCore::Payment(payment));
-#endif
 }
 
 - (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller didSelectPaymentMethod:(PKPaymentMethod *)paymentMethod handler:(void (^)(PKPaymentRequestPaymentMethodUpdate *update))completion
 {
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
     if (!_webPaymentCoordinatorProxy) {
         completion(adoptNS([PAL::allocPKPaymentRequestPaymentMethodUpdateInstance() initWithPaymentSummaryItems:@[ ]]).get());
         return;
@@ -142,11 +139,9 @@ static WebCore::ApplePaySessionPaymentRequest::ShippingMethod toShippingMethod(P
     ASSERT(!_didSelectPaymentMethodCompletion);
     _didSelectPaymentMethodCompletion = completion;
     _webPaymentCoordinatorProxy->didSelectPaymentMethod(WebCore::PaymentMethod(paymentMethod));
-#endif
 }
 
 - (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller didSelectShippingMethod:(PKShippingMethod *)shippingMethod handler:(void (^)(PKPaymentRequestShippingMethodUpdate *update))completion {
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
     if (!_webPaymentCoordinatorProxy) {
         completion(adoptNS([PAL::allocPKPaymentRequestShippingMethodUpdateInstance() initWithPaymentSummaryItems:@[ ]]).get());
         return;
@@ -155,12 +150,10 @@ static WebCore::ApplePaySessionPaymentRequest::ShippingMethod toShippingMethod(P
     ASSERT(!_didSelectShippingMethodCompletion);
     _didSelectShippingMethodCompletion = completion;
     _webPaymentCoordinatorProxy->didSelectShippingMethod(toShippingMethod(shippingMethod));
-#endif
 }
 
 - (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller didSelectShippingContact:(PKContact *)contact handler:(void (^)(PKPaymentRequestShippingContactUpdate *update))completion
 {
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
     if (!_webPaymentCoordinatorProxy) {
         completion(adoptNS([PAL::allocPKPaymentRequestShippingContactUpdateInstance() initWithErrors:@[ ] paymentSummaryItems:@[ ] shippingMethods:@[ ]]).get());
         return;
@@ -169,12 +162,11 @@ static WebCore::ApplePaySessionPaymentRequest::ShippingMethod toShippingMethod(P
     ASSERT(!_didSelectShippingContactCompletion);
     _didSelectShippingContactCompletion = completion;
     _webPaymentCoordinatorProxy->didSelectShippingContact(WebCore::PaymentContact(contact));
-#endif
 }
 
 #endif
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED < 110000)
+#if !HAVE(PASSKIT_GRANULAR_ERRORS)
 
 - (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller didAuthorizePayment:(PKPayment *)payment completion:(void (^)(PKPaymentAuthorizationStatus))completion
 {
@@ -261,9 +253,9 @@ bool WebPaymentCoordinatorProxy::platformCanMakePayments()
     return [PAL::getPKPaymentAuthorizationViewControllerClass() canMakePayments];
 }
 
-void WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard(const String& merchantIdentifier, const String& domainName, WTF::Function<void (bool)>&& completionHandler)
+void WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard(const String& merchantIdentifier, const String& domainName, WTF::Function<void(bool)>&& completionHandler)
 {
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
+#if HAVE(PASSKIT_GRANULAR_ERRORS)
     PKCanMakePaymentsWithMerchantIdentifierDomainAndSourceApplication(merchantIdentifier, domainName, m_client.paymentCoordinatorSourceApplicationSecondaryIdentifier(*this), makeBlockPtr([completionHandler = WTFMove(completionHandler)](BOOL canMakePayments, NSError *error) mutable {
         if (error)
             LOG_ERROR("PKCanMakePaymentsWithMerchantIdentifierAndDomain error %@", error);
@@ -284,7 +276,7 @@ void WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard(const Str
 #endif
 }
 
-void WebPaymentCoordinatorProxy::platformOpenPaymentSetup(const String& merchantIdentifier, const String& domainName, WTF::Function<void (bool)>&& completionHandler)
+void WebPaymentCoordinatorProxy::platformOpenPaymentSetup(const String& merchantIdentifier, const String& domainName, WTF::Function<void(bool)>&& completionHandler)
 {
     auto passLibrary = adoptNS([PAL::allocPKPassLibraryInstance() init]);
     [passLibrary openPaymentSetupForMerchantIdentifier:merchantIdentifier domain:domainName completion:makeBlockPtr([completionHandler = WTFMove(completionHandler)](BOOL result) mutable {
@@ -294,7 +286,7 @@ void WebPaymentCoordinatorProxy::platformOpenPaymentSetup(const String& merchant
     }).get()];
 }
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
+#if HAVE(PASSKIT_GRANULAR_ERRORS)
 static RetainPtr<NSSet> toPKContactFields(const WebCore::ApplePaySessionPaymentRequest::ContactFields& contactFields)
 {
     Vector<NSString *> result;
@@ -416,7 +408,7 @@ static RetainPtr<PKShippingMethod> toPKShippingMethod(const WebCore::ApplePaySes
     return result;
 }
     
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
+#if HAVE(PASSKIT_GRANULAR_ERRORS)
 static RetainPtr<NSSet> toNSSet(const Vector<String>& strings)
 {
     if (strings.isEmpty())
@@ -428,9 +420,7 @@ static RetainPtr<NSSet> toNSSet(const Vector<String>& strings)
 
     return WTFMove(mutableSet);
 }
-#endif
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101304) || PLATFORM(IOS_FAMILY)
 static PKPaymentRequestAPIType toAPIType(WebCore::ApplePaySessionPaymentRequest::Requester requester)
 {
     switch (requester) {
@@ -457,7 +447,7 @@ RetainPtr<PKPaymentRequest> WebPaymentCoordinatorProxy::platformPaymentRequest(c
     } else if (!linkIconURLs.isEmpty())
         [result setThumbnailURL:linkIconURLs[0]];
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101304) || PLATFORM(IOS_FAMILY)
+#if HAVE(PASSKIT_GRANULAR_ERRORS)
     [result setAPIType:toAPIType(paymentRequest.requester())];
 #endif
 
@@ -465,7 +455,7 @@ RetainPtr<PKPaymentRequest> WebPaymentCoordinatorProxy::platformPaymentRequest(c
     [result setCurrencyCode:paymentRequest.currencyCode()];
     [result setBillingContact:paymentRequest.billingContact().pkContact()];
     [result setShippingContact:paymentRequest.shippingContact().pkContact()];
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
+#if HAVE(PASSKIT_GRANULAR_ERRORS)
     [result setRequiredBillingContactFields:toPKContactFields(paymentRequest.requiredBillingContactFields()).get()];
     [result setRequiredShippingContactFields:toPKContactFields(paymentRequest.requiredShippingContactFields()).get()];
 #else
@@ -501,7 +491,7 @@ RetainPtr<PKPaymentRequest> WebPaymentCoordinatorProxy::platformPaymentRequest(c
         [result setApplicationData:applicationData.get()];
     }
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
+#if HAVE(PASSKIT_GRANULAR_ERRORS)
     [result setSupportedCountries:toNSSet(paymentRequest.supportedCountries()).get()];
 #endif
 
@@ -523,7 +513,7 @@ RetainPtr<PKPaymentRequest> WebPaymentCoordinatorProxy::platformPaymentRequest(c
     return result;
 }
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
+#if HAVE(PASSKIT_GRANULAR_ERRORS)
 static PKPaymentAuthorizationStatus toPKPaymentAuthorizationStatus(WebCore::PaymentAuthorizationStatus status)
 {
     switch (status) {
@@ -692,7 +682,7 @@ void WebPaymentCoordinatorProxy::platformCompletePaymentSession(const Optional<W
 
     m_paymentAuthorizationViewControllerDelegate->_didReachFinalState = WebCore::isFinalStateResult(result);
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
+#if HAVE(PASSKIT_GRANULAR_ERRORS)
     auto status = result ? result->status : WebCore::PaymentAuthorizationStatus::Success;
     auto pkPaymentAuthorizationResult = adoptNS([PAL::allocPKPaymentAuthorizationResultInstance() initWithStatus:toPKPaymentAuthorizationStatus(status) errors:result ? toNSErrors(result->errors).get() : @[ ]]);
     m_paymentAuthorizationViewControllerDelegate->_paymentAuthorizedCompletion(pkPaymentAuthorizationResult.get());
@@ -719,7 +709,7 @@ void WebPaymentCoordinatorProxy::platformCompleteShippingMethodSelection(const O
     if (update)
         m_paymentAuthorizationViewControllerDelegate->_paymentSummaryItems = toPKPaymentSummaryItems(update->newTotalAndLineItems);
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
+#if HAVE(PASSKIT_GRANULAR_ERRORS)
     auto pkShippingMethodUpdate = adoptNS([PAL::allocPKPaymentRequestShippingMethodUpdateInstance() initWithPaymentSummaryItems:m_paymentAuthorizationViewControllerDelegate->_paymentSummaryItems.get()]);
     m_paymentAuthorizationViewControllerDelegate->_didSelectShippingMethodCompletion(pkShippingMethodUpdate.get());
 #else
@@ -728,7 +718,7 @@ void WebPaymentCoordinatorProxy::platformCompleteShippingMethodSelection(const O
     m_paymentAuthorizationViewControllerDelegate->_didSelectShippingMethodCompletion = nullptr;
 }
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED < 110000)
+#if !HAVE(PASSKIT_GRANULAR_ERRORS)
 static PKPaymentAuthorizationStatus toPKPaymentAuthorizationStatus(const Optional<WebCore::ShippingContactUpdate>& update)
 {
     if (!update || update->errors.isEmpty())
@@ -771,7 +761,7 @@ void WebPaymentCoordinatorProxy::platformCompleteShippingContactSelection(const
         m_paymentAuthorizationViewControllerDelegate->_shippingMethods = WTFMove(shippingMethods);
     }
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
+#if HAVE(PASSKIT_GRANULAR_ERRORS)
     auto pkShippingContactUpdate = adoptNS([PAL::allocPKPaymentRequestShippingContactUpdateInstance() initWithErrors:update ? toNSErrors(update->errors).get() : @[ ] paymentSummaryItems:m_paymentAuthorizationViewControllerDelegate->_paymentSummaryItems.get() shippingMethods:m_paymentAuthorizationViewControllerDelegate->_shippingMethods.get()]);
     m_paymentAuthorizationViewControllerDelegate->_didSelectShippingContactCompletion(pkShippingContactUpdate.get());
 #else
@@ -788,7 +778,7 @@ void WebPaymentCoordinatorProxy::platformCompletePaymentMethodSelection(const Op
     if (update)
         m_paymentAuthorizationViewControllerDelegate->_paymentSummaryItems = toPKPaymentSummaryItems(update->newTotalAndLineItems);
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
+#if HAVE(PASSKIT_GRANULAR_ERRORS)
     auto pkPaymentMethodUpdate = adoptNS([PAL::allocPKPaymentRequestPaymentMethodUpdateInstance() initWithPaymentSummaryItems:m_paymentAuthorizationViewControllerDelegate->_paymentSummaryItems.get()]);
     m_paymentAuthorizationViewControllerDelegate->_didSelectPaymentMethodCompletion(pkPaymentMethodUpdate.get());
 #else
index 6ea9b6b..7ded9f5 100644 (file)
@@ -29,6 +29,7 @@
 #if PLATFORM(MAC)
 
 #import "ArgumentCodersCF.h"
+#import "ArgumentCodersCocoa.h"
 #import "Decoder.h"
 #import "Encoder.h"
 #import "WebCoreArgumentCoders.h"
index c43e4e5..996fb0c 100644 (file)
@@ -113,6 +113,11 @@ Shared/API/Cocoa/WKMain.mm
 Shared/API/Cocoa/WKRemoteObject.mm
 Shared/API/Cocoa/WKRemoteObjectCoder.mm
 
+Shared/ApplePay/WebPaymentCoordinatorProxy.cpp
+Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm
+Shared/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm
+Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm
+
 Shared/APIWebArchive.mm
 Shared/APIWebArchiveResource.mm
 Shared/FocusedElementInformation.cpp
@@ -214,8 +219,6 @@ UIProcess/WebMemoryPressureHandler.cpp
 UIProcess/WKImagePreviewViewController.mm
 UIProcess/WKInspectorHighlightView.mm
 
-UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp
-
 UIProcess/API/APIWebsiteDataRecord.cpp
 
 UIProcess/API/C/WKContextMenuListener.cpp
@@ -302,12 +305,6 @@ UIProcess/API/Cocoa/WKWindowFeatures.mm
 
 UIProcess/API/mac/WKView.mm
 
-UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm
-
-UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm
-
-UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm
-
 UIProcess/Authentication/cocoa/AuthenticationChallengeProxyCocoa.mm
 UIProcess/Authentication/cocoa/SecKeyProxyStore.mm
 
index d3a02b7..55c0aa4 100644 (file)
@@ -44,8 +44,8 @@ private:
     void commitStateBeforeChildren(const WebCore::ScrollingStateNode&) override;
     void commitStateAfterChildren(const WebCore::ScrollingStateNode&) override;
 
-    FloatPoint minimumScrollPosition() const override;
-    FloatPoint maximumScrollPosition() const override;
+    WebCore::FloatPoint minimumScrollPosition() const override;
+    WebCore::FloatPoint maximumScrollPosition() const override;
 
     void repositionScrollingLayers() override;
     void repositionRelatedLayers() override;
index 1bb66d5..c626c15 100644 (file)
@@ -29,7 +29,9 @@
 #if PLATFORM(IOS_FAMILY) && ENABLE(ASYNC_SCROLLING)
 
 #import "ScrollingTreeScrollingNodeDelegateIOS.h"
+#import <WebCore/ScrollingStateFrameScrollingNode.h>
 #import <WebCore/ScrollingStateScrollingNode.h>
+#import <WebCore/ScrollingTree.h>
 
 namespace WebKit {
 using namespace WebCore;
index a87310c..f508f16 100644 (file)
@@ -66,7 +66,7 @@ public:
     void repositionScrollingLayers();
 
 #if ENABLE(POINTER_EVENTS)
-    Optional<TouchActionData> touchActionData() const;
+    Optional<WebCore::TouchActionData> touchActionData() const;
     void cancelPointersForGestureRecognizer(UIGestureRecognizer*);
 #endif
 
index 488e9da..eeefc50 100644 (file)
 
 #if PLATFORM(IOS_FAMILY) && ENABLE(ASYNC_SCROLLING)
 
+#import "RemoteScrollingCoordinatorProxy.h"
+#import "RemoteScrollingTree.h"
+#import "UIKitSPI.h"
+#import "WebPageProxy.h"
 #import <QuartzCore/QuartzCore.h>
 #import <UIKit/UIPanGestureRecognizer.h>
 #import <UIKit/UIScrollView.h>
index edb0593..53b81d8 100644 (file)
                        isa = PBXGroup;
                        children = (
                                BCDDB314124EBCEF0048D13C /* API */,
+                               1AB1F7761D1B30A9007C9BD1 /* ApplePay */,
                                518E8EF116B208F000E91429 /* Authentication */,
                                1AAF0C4712B16328008E49E2 /* cf */,
                                C01A25FF12662F2100C9ED55 /* cg */,
                        isa = PBXGroup;
                        children = (
                                BC032DC410F4387C0058C15A /* API */,
-                               1AB1F7761D1B30A9007C9BD1 /* ApplePay */,
                                512F588D12A8836F00629530 /* Authentication */,
                                9955A6E81C79809000EB6A93 /* Automation */,
                                1ABC3DF21899E415004F0626 /* Cocoa */,