Source/WTF/ChangeLog

 12020-06-07 Andy Estes <aestes@apple.com>
 2
 3 [Apple Pay] Remove ENABLE_APPLE_PAY_SETUP, ENABLE_APPLE_PAY_SESSION_V7, and HAVE_PASSKIT_PAYMENT_SETUP
 4 https://bugs.webkit.org/show_bug.cgi?id=212883
 5 <rdar://problem/64090763>
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 These macros evaluate to true whenever ENABLE(APPLE_PAY) is true on platforms supported by
 10 trunk WebKit, so we can either remove them or replace them with ENABLE(APPLE_PAY).
 11
 12 * wtf/PlatformEnableCocoa.h:
 13 * wtf/PlatformHave.h:
 14
1152020-06-06 David Kilzer <ddkilzer@apple.com>
216
317 Use OptionSet<DragOperation> for mask values

Source/WebCore/ChangeLog

 12020-06-07 Andy Estes <aestes@apple.com>
 2
 3 [Apple Pay] Remove ENABLE_APPLE_PAY_SETUP, ENABLE_APPLE_PAY_SESSION_V7, and HAVE_PASSKIT_PAYMENT_SETUP
 4 https://bugs.webkit.org/show_bug.cgi?id=212883
 5 <rdar://problem/64090763>
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 These macros evaluate to true whenever ENABLE(APPLE_PAY) is true on platforms supported by
 10 trunk WebKit, so we can either remove them or replace them with ENABLE(APPLE_PAY).
 11
 12 * Modules/applepay/ApplePaySetup.cpp:
 13 * Modules/applepay/ApplePaySetup.idl:
 14 * Modules/applepay/ApplePaySetupConfiguration.h:
 15 * Modules/applepay/ApplePaySetupConfiguration.idl:
 16 * Modules/applepay/ApplePaySetupFeature.idl:
 17 * Modules/applepay/ApplePaySetupFeature.mm:
 18 * Modules/applepay/ApplePaySetupFeatureState.h:
 19 * Modules/applepay/ApplePaySetupFeatureState.idl:
 20 * Modules/applepay/ApplePaySetupFeatureType.idl:
 21 * Modules/applepay/ApplePaySetupFeatureTypeWebCore.h:
 22 * Modules/applepay/ApplePaySetupFeatureWebCore.h:
 23 * Modules/applepay/ApplePaySetupWebCore.h:
 24 * Modules/applepay/PaymentCoordinator.cpp:
 25 * Modules/applepay/PaymentCoordinator.h:
 26 * Modules/applepay/PaymentCoordinatorClient.cpp:
 27 (WebCore::PaymentCoordinatorClient::supportsVersion):
 28 * Modules/applepay/PaymentCoordinatorClient.h:
 29 (WebCore::PaymentCoordinatorClient::endApplePaySetup):
 30 * testing/MockApplePaySetupFeature.cpp:
 31 * testing/MockApplePaySetupFeature.h:
 32 * testing/MockPaymentCoordinator.cpp:
 33 * testing/MockPaymentCoordinator.h:
 34 * testing/MockPaymentCoordinator.idl:
 35
1362020-06-06 Yusuke Suzuki <ysuzuki@apple.com>
237
338 Crash when running web-apis data collection

Source/WebCore/PAL/ChangeLog

 12020-06-07 Andy Estes <aestes@apple.com>
 2
 3 [Apple Pay] Remove ENABLE_APPLE_PAY_SETUP, ENABLE_APPLE_PAY_SESSION_V7, and HAVE_PASSKIT_PAYMENT_SETUP
 4 https://bugs.webkit.org/show_bug.cgi?id=212883
 5 <rdar://problem/64090763>
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 These macros evaluate to true whenever ENABLE(APPLE_PAY) is true on platforms supported by
 10 trunk WebKit, so we can either remove them or replace them with ENABLE(APPLE_PAY).
 11
 12 * pal/spi/cocoa/PassKitSPI.h:
 13
1142020-06-05 Ryan Haddad <ryanhaddad@apple.com>
215
316 Unreviewed, reverting r262619, r262625, and r262641.

Source/WebKit/ChangeLog

 12020-06-07 Andy Estes <aestes@apple.com>
 2
 3 [Apple Pay] Remove ENABLE_APPLE_PAY_SETUP, ENABLE_APPLE_PAY_SESSION_V7, and HAVE_PASSKIT_PAYMENT_SETUP
 4 https://bugs.webkit.org/show_bug.cgi?id=212883
 5 <rdar://problem/64090763>
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 These macros evaluate to true whenever ENABLE(APPLE_PAY) is true on platforms supported by
 10 trunk WebKit, so we can either remove them or replace them with ENABLE(APPLE_PAY).
 11
 12 * Shared/ApplePay/ApplePayPaymentSetupFeatures.mm:
 13 * Shared/ApplePay/ApplePayPaymentSetupFeaturesWebKit.h:
 14 * Shared/ApplePay/PaymentSetupConfiguration.mm:
 15 * Shared/ApplePay/PaymentSetupConfigurationWebKit.h:
 16 * Shared/ApplePay/WebPaymentCoordinatorProxy.h:
 17 * Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in:
 18 * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
 19 * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
 20 * WebProcess/ApplePay/WebPaymentCoordinator.h:
 21
1222020-06-06 Simon Fraser <simon.fraser@apple.com>
223
324 Clear WebPageProxy event state between tests

Source/WTF/wtf/PlatformEnableCocoa.h

7171#define ENABLE_APPLE_PAY_NEW_BUTTON_TYPES 1
7272#endif
7373
74 #if !defined(ENABLE_APPLE_PAY_SESSION_V7) && HAVE(PASSKIT_PAYMENT_SETUP)
75 #define ENABLE_APPLE_PAY_SESSION_V7 1
76 #endif
77 
7874#if !defined(ENABLE_APPLE_PAY_SESSION_V8) && HAVE(PASSKIT_INSTALLMENTS)
7975#define ENABLE_APPLE_PAY_SESSION_V8 1
8076#endif

8783#define ENABLE_APPLE_PAY_SESSION_V10 1
8884#endif
8985
90 #if !defined(ENABLE_APPLE_PAY_SETUP) && HAVE(PASSKIT_PAYMENT_SETUP)
91 #define ENABLE_APPLE_PAY_SETUP 1
92 #endif
93 
9486#if !defined(ENABLE_APPLE_PAY_REMOTE_UI) && (PLATFORM(IOS_FAMILY) && !PLATFORM(APPLETV) && !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS))
9587#define ENABLE_APPLE_PAY_REMOTE_UI 1
9688#endif

Source/WTF/wtf/PlatformHave.h

622622#define HAVE_PASSKIT_INSTALLMENTS 1
623623#endif
624624
625 #if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400)
626 #define HAVE_PASSKIT_PAYMENT_SETUP 1
627 #endif
628 
629625#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || PLATFORM(IOS) || PLATFORM(MACCATALYST)
630626#define HAVE_QUICKLOOK_THUMBNAILING 1
631627#endif

Source/WebCore/Modules/applepay/ApplePaySetup.cpp

2626#include "config.h"
2727#include "ApplePaySetupWebCore.h"
2828
29 #if ENABLE(APPLE_PAY_SETUP)
 29#if ENABLE(APPLE_PAY)
3030
3131#include "Document.h"
3232#include "JSApplePaySetupFeature.h"

@@void ApplePaySetup::suspend(ReasonForSuspension)
143143
144144} // namespace WebCore
145145
146 #endif // ENABLE(APPLE_PAY_SETUP)
 146#endif // ENABLE(APPLE_PAY)

Source/WebCore/Modules/applepay/ApplePaySetup.idl

2525
2626[
2727 ActiveDOMObject,
28  Conditional=APPLE_PAY_SETUP,
 28 Conditional=APPLE_PAY,
2929 Constructor(ApplePaySetupConfiguration configuration),
3030 ConstructorCallWith=ScriptExecutionContext,
3131 EnabledBySetting=ApplePay,

Source/WebCore/Modules/applepay/ApplePaySetupConfiguration.h

2525
2626#pragma once
2727
28 #if ENABLE(APPLE_PAY_SETUP)
 28#if ENABLE(APPLE_PAY)
2929
3030#include <wtf/Vector.h>
3131#include <wtf/text/WTFString.h>

@@struct ApplePaySetupConfiguration {
4141
4242} // namespace WebCore
4343
44 #endif // ENABLE(APPLE_PAY_SETUP)
 44#endif // ENABLE(APPLE_PAY)

Source/WebCore/Modules/applepay/ApplePaySetupConfiguration.idl

2424 */
2525
2626[
27  Conditional=APPLE_PAY_SETUP,
 27 Conditional=APPLE_PAY,
2828 ExportMacro=WEBCORE_EXPORT,
2929 JSGenerateToJSObject,
3030] dictionary ApplePaySetupConfiguration {

Source/WebCore/Modules/applepay/ApplePaySetupFeature.idl

2424 */
2525
2626[
27  Conditional=APPLE_PAY_SETUP,
 27 Conditional=APPLE_PAY,
2828 EnabledBySetting=ApplePay,
2929 ExportMacro=WEBCORE_EXPORT,
3030 SecureContext,

Source/WebCore/Modules/applepay/ApplePaySetupFeature.mm

2626#import "config.h"
2727#import "ApplePaySetupFeatureWebCore.h"
2828
29 #if ENABLE(APPLE_PAY_SETUP)
 29#if ENABLE(APPLE_PAY)
3030
3131#import "ApplePaySetupFeatureState.h"
3232#import "ApplePaySetupFeatureTypeWebCore.h"

@@ApplePaySetupFeature::ApplePaySetupFeature(PKPaymentSetupFeature *feature)
7777
7878} // namespace WebCore
7979
80 #endif // ENABLE(APPLE_PAY_SETUP)
 80#endif // ENABLE(APPLE_PAY)

Source/WebCore/Modules/applepay/ApplePaySetupFeatureState.h

2525
2626#pragma once
2727
28 #if ENABLE(APPLE_PAY_SETUP)
 28#if ENABLE(APPLE_PAY)
2929
3030namespace WebCore {
3131

@@enum class ApplePaySetupFeatureState : uint8_t {
3838
3939} // namespace WebCore
4040
41 #endif // ENABLE(APPLE_PAY_SETUP)
 41#endif // ENABLE(APPLE_PAY)

Source/WebCore/Modules/applepay/ApplePaySetupFeatureState.idl

2424 */
2525
2626[
27  Conditional=APPLE_PAY_SETUP,
 27 Conditional=APPLE_PAY,
2828 ExportMacro=WEBCORE_EXPORT,
2929] enum ApplePaySetupFeatureState {
3030 "unsupported",

Source/WebCore/Modules/applepay/ApplePaySetupFeatureType.idl

2424 */
2525
2626[
27  Conditional=APPLE_PAY_SETUP,
 27 Conditional=APPLE_PAY,
2828 ExportMacro=WEBCORE_EXPORT,
2929] enum ApplePaySetupFeatureType {
3030 "applePay",

Source/WebCore/Modules/applepay/ApplePaySetupFeatureTypeWebCore.h

2525
2626#pragma once
2727
28 #if ENABLE(APPLE_PAY_SETUP)
 28#if ENABLE(APPLE_PAY)
2929
3030namespace WebCore {
3131

@@enum class ApplePaySetupFeatureType : uint8_t {
3636
3737} // namespace WebCore
3838
39 #endif // ENABLE(APPLE_PAY_SETUP)
 39#endif // ENABLE(APPLE_PAY)

Source/WebCore/Modules/applepay/ApplePaySetupFeatureWebCore.h

2525
2626#pragma once
2727
28 #if ENABLE(APPLE_PAY_SETUP)
 28#if ENABLE(APPLE_PAY)
2929
3030#include <wtf/RefCounted.h>
3131#include <wtf/RetainPtr.h>

@@private:
6666
6767} // namespace WebCore
6868
69 #endif // ENABLE(APPLE_PAY_SETUP)
 69#endif // ENABLE(APPLE_PAY)

Source/WebCore/Modules/applepay/ApplePaySetupWebCore.h

2525
2626#pragma once
2727
28 #if ENABLE(APPLE_PAY_SETUP)
 28#if ENABLE(APPLE_PAY)
2929
3030#include "ApplePaySetupConfiguration.h"
3131#include <WebCore/ActiveDOMObject.h>

@@private:
7070
7171} // namespace WebCore
7272
73 #endif // ENABLE(APPLE_PAY_SETUP)
 73#endif // ENABLE(APPLE_PAY)

Source/WebCore/Modules/applepay/PaymentCoordinator.cpp

@@Expected<void, ExceptionDetails> PaymentCoordinator::shouldAllowUserAgentScripts
299299 return makeUnexpected(ExceptionDetails { m_client.userAgentScriptsBlockedErrorMessage() });
300300}
301301
302 #if ENABLE(APPLE_PAY_SETUP)
303 
304302void PaymentCoordinator::getSetupFeatures(const ApplePaySetupConfiguration& configuration, const URL& url, CompletionHandler<void(Vector<Ref<ApplePaySetupFeature>>&&)>&& completionHandler)
305303{
306304 RELEASE_LOG_IF_ALLOWED("getSetupFeatures()");

@@void PaymentCoordinator::endApplePaySetup()
329327 m_client.endApplePaySetup();
330328}
331329
332 #endif
333 
334330} // namespace WebCore
335331
336332#undef RELEASE_LOG_ERROR_IF_ALLOWED

Source/WebCore/Modules/applepay/PaymentCoordinator.h

@@public:
8787 bool shouldEnableApplePayAPIs(Document&) const;
8888 WEBCORE_EXPORT Expected<void, ExceptionDetails> shouldAllowUserAgentScripts(Document&) const;
8989
90 #if ENABLE(APPLE_PAY_SETUP)
9190 void getSetupFeatures(const ApplePaySetupConfiguration&, const URL&, CompletionHandler<void(Vector<Ref<ApplePaySetupFeature>>&&)>&&);
9291 void beginApplePaySetup(const ApplePaySetupConfiguration&, const URL&, Vector<RefPtr<ApplePaySetupFeature>>&&, CompletionHandler<void(bool)>&&);
9392 void endApplePaySetup();
94 #endif
9593
9694private:
9795 bool setApplePayIsActiveIfAllowed(Document&) const;

Source/WebCore/Modules/applepay/PaymentCoordinatorClient.cpp

@@bool PaymentCoordinatorClient::supportsVersion(unsigned version)
3434{
3535 ASSERT(version > 0);
3636
37 #if !ENABLE(APPLE_PAY_SESSION_V7)
38  static const unsigned currentVersion = 6;
39 #elif !ENABLE(APPLE_PAY_SESSION_V8)
 37#if !ENABLE(APPLE_PAY_SESSION_V8)
4038 static const unsigned currentVersion = 7;
4139#elif !ENABLE(APPLE_PAY_SESSION_V9)
4240 static const unsigned currentVersion = 8;

Source/WebCore/Modules/applepay/PaymentCoordinatorClient.h

@@public:
7070
7171 virtual bool isAlwaysOnLoggingAllowed() const { return false; }
7272
73 #if ENABLE(APPLE_PAY_SETUP)
7473 virtual void getSetupFeatures(const ApplePaySetupConfiguration&, const URL&, CompletionHandler<void(Vector<Ref<ApplePaySetupFeature>>&&)>&& completionHandler) { completionHandler({ }); }
7574 virtual void beginApplePaySetup(const ApplePaySetupConfiguration&, const URL&, Vector<RefPtr<ApplePaySetupFeature>>&&, CompletionHandler<void(bool)>&& completionHandler) { completionHandler(false); }
7675 virtual void endApplePaySetup() { }
77 #endif
7876
7977protected:
8078 virtual ~PaymentCoordinatorClient() = default;

Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h

@@NS_ASSUME_NONNULL_BEGIN
9393- (void)paymentAuthorizationController:(PKPaymentAuthorizationController *)controller didRequestMerchantSession:(void(^)(PKPaymentMerchantSession *, NSError *))sessionBlock;
9494@end
9595
96 #if HAVE(PASSKIT_PAYMENT_SETUP)
97 
9896@class PKPaymentSetupRequest;
9997
10098@interface PKPaymentSetupViewController : UIViewController
10199- (instancetype)initWithPaymentSetupRequest:(PKPaymentSetupRequest *)paymentSetupRequest;
102100@end
103101
104 #endif
105 
106102NS_ASSUME_NONNULL_END
107103
108104#elif PLATFORM(MAC)

@@NS_ASSUME_NONNULL_BEGIN
291287
292288@protocol PKPaymentAuthorizationViewControllerPrivateDelegate;
293289
294 #if HAVE(PASSKIT_PAYMENT_SETUP)
295 
296290@class PKPaymentSetupConfiguration;
297291@class PKPaymentSetupFeature;
298292@class PKPaymentSetupRequest;

@@typedef NS_OPTIONS(NSInteger, PKPaymentSetupFeatureSupportedOptions) {
342336@property (nonatomic, strong) NSArray <PKPaymentSetupFeature *> *paymentSetupFeatures;
343337@end
344338
345 #endif
346 
347339#if HAVE(PASSKIT_INSTALLMENTS)
348340
349341typedef NS_ENUM(NSInteger, PKInstallmentItemType) {

Source/WebCore/testing/MockApplePaySetupFeature.cpp

2626#include "config.h"
2727#include "MockApplePaySetupFeature.h"
2828
29 #if ENABLE(APPLE_PAY_SETUP)
 29#if ENABLE(APPLE_PAY)
3030
3131namespace WebCore {
3232

@@MockApplePaySetupFeature::MockApplePaySetupFeature(ApplePaySetupFeatureState sta
4848
4949} // namespace WebCore
5050
51 #endif // ENABLE(APPLE_PAY_SETUP)
 51#endif // ENABLE(APPLE_PAY)

Source/WebCore/testing/MockApplePaySetupFeature.h

2525
2626#pragma once
2727
28 #if ENABLE(APPLE_PAY_SETUP)
 28#if ENABLE(APPLE_PAY)
2929
3030#include "ApplePaySetupFeatureWebCore.h"
3131

@@private:
5454
5555} // namespace WebCore
5656
57 #endif // ENABLE(APPLE_PAY_SETUP)
 57#endif // ENABLE(APPLE_PAY)

Source/WebCore/testing/MockPaymentCoordinator.cpp

@@void MockPaymentCoordinator::paymentCoordinatorDestroyed()
232232 delete this;
233233}
234234
235 #if ENABLE(APPLE_PAY_SETUP)
236 
237235void MockPaymentCoordinator::addSetupFeature(ApplePaySetupFeatureState state, ApplePaySetupFeatureType type, bool supportsInstallments)
238236{
239237 m_setupFeatures.append(MockApplePaySetupFeature::create(state, type, supportsInstallments));

@@void MockPaymentCoordinator::beginApplePaySetup(const ApplePaySetupConfiguration
252250 completionHandler(true);
253251}
254252
255 #endif
256 
257253} // namespace WebCore
258254
259255#endif // ENABLE(APPLE_PAY)

Source/WebCore/testing/MockPaymentCoordinator.h

@@public:
5454 void changePaymentMethod(ApplePayPaymentMethod&&);
5555 void acceptPayment();
5656 void cancelPayment();
57 
58 #if ENABLE(APPLE_PAY_SETUP)
 57
5958 void addSetupFeature(ApplePaySetupFeatureState, ApplePaySetupFeatureType, bool supportsInstallments);
6059 const ApplePaySetupConfiguration& setupConfiguration() const { return m_setupConfiguration; }
61 #endif
6260
6361 const ApplePayLineItem& total() const { return m_total; }
6462 const Vector<ApplePayLineItem>& lineItems() const { return m_lineItems; }

@@private:
9694
9795 bool isAlwaysOnLoggingAllowed() const final { return true; }
9896
99 #if ENABLE(APPLE_PAY_SETUP)
10097 void getSetupFeatures(const ApplePaySetupConfiguration&, const URL&, CompletionHandler<void(Vector<Ref<ApplePaySetupFeature>>&&)>&&) final;
10198 void beginApplePaySetup(const ApplePaySetupConfiguration&, const URL&, Vector<RefPtr<ApplePaySetupFeature>>&&, CompletionHandler<void(bool)>&&) final;
102 #endif
10399
104100 void updateTotalAndLineItems(const ApplePaySessionPaymentRequest::TotalAndLineItems&);
105101

@@private:
118114#if ENABLE(APPLE_PAY_INSTALLMENTS)
119115 ApplePayInstallmentConfiguration m_installmentConfiguration;
120116#endif
121 #if ENABLE(APPLE_PAY_SETUP)
122117 ApplePaySetupConfiguration m_setupConfiguration;
123118 Vector<Ref<ApplePaySetupFeature>> m_setupFeatures;
124 #endif
125119};
126120
127121} // namespace WebCore

Source/WebCore/testing/MockPaymentCoordinator.idl

3535 void acceptPayment();
3636 void cancelPayment();
3737
38  [Conditional=APPLE_PAY_SETUP] void addSetupFeature(ApplePaySetupFeatureState state, ApplePaySetupFeatureType type, boolean supportsInstallments);
 38 void addSetupFeature(ApplePaySetupFeatureState state, ApplePaySetupFeatureType type, boolean supportsInstallments);
3939
4040 readonly attribute ApplePayLineItem total;
4141 readonly attribute sequence<ApplePayLineItem> lineItems;

4444 readonly attribute MockPaymentContactFields requiredBillingContactFields;
4545 readonly attribute MockPaymentContactFields requiredShippingContactFields;
4646
47  [Conditional=APPLE_PAY_SETUP] readonly attribute ApplePaySetupConfiguration setupConfiguration;
 47 readonly attribute ApplePaySetupConfiguration setupConfiguration;
4848
4949 attribute boolean supportsUnrestrictedApplePay;
5050

Source/WebKit/Shared/ApplePay/ApplePayPaymentSetupFeatures.mm

2626#import "config.h"
2727#import "ApplePayPaymentSetupFeaturesWebKit.h"
2828
29 #if HAVE(PASSKIT_PAYMENT_SETUP)
 29#if HAVE(PASSKIT)
3030
3131#import "ArgumentCodersCocoa.h"
3232#import "Decoder.h"

@@PaymentSetupFeatures::operator Vector<Ref<WebCore::ApplePaySetupFeature>>() cons
9292
9393} // namespace WebKit
9494
95 #endif // HAVE(PASSKIT_PAYMENT_SETUP)
 95#endif // HAVE(PASSKIT)

Source/WebKit/Shared/ApplePay/ApplePayPaymentSetupFeaturesWebKit.h

2525
2626#pragma once
2727
28 #if HAVE(PASSKIT_PAYMENT_SETUP)
 28#if HAVE(PASSKIT)
2929
3030OBJC_CLASS PKPaymentSetupFeature;
3131

@@private:
5757
5858} // namespace WebKit
5959
60 #endif // HAVE(PASSKIT_PAYMENT_SETUP)
 60#endif // HAVE(PASSKIT)

Source/WebKit/Shared/ApplePay/PaymentSetupConfiguration.mm

2626#import "config.h"
2727#import "PaymentSetupConfigurationWebKit.h"
2828
29 #if HAVE(PASSKIT_PAYMENT_SETUP)
 29#if HAVE(PASSKIT)
3030
3131#import "ArgumentCodersCocoa.h"
3232#import "Decoder.h"

@@Optional<PaymentSetupConfiguration> PaymentSetupConfiguration::decode(IPC::Decod
102102
103103} // namespace WebKitAdditions
104104
105 #endif // HAVE(PASSKIT_PAYMENT_SETUP)
 105#endif // HAVE(PASSKIT)

Source/WebKit/Shared/ApplePay/PaymentSetupConfigurationWebKit.h

2525
2626#pragma once
2727
28 #if HAVE(PASSKIT_PAYMENT_SETUP)
 28#if HAVE(PASSKIT)
2929
3030#include <wtf/Forward.h>
3131#include <wtf/RetainPtr.h>

@@private:
6161
6262} // namespace WebKit
6363
64 #endif // HAVE(PASSKIT_PAYMENT_SETUP)
 64#endif // HAVE(PASSKIT)
6565

Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.h

3838#include <wtf/WeakPtr.h>
3939#include <wtf/WorkQueue.h>
4040
41 #if HAVE(PASSKIT_PAYMENT_SETUP)
4241OBJC_CLASS PKPaymentSetupViewController;
4342OBJC_CLASS UIViewController;
44 #endif
4543
4644namespace IPC {
4745class Connection;

@@private:
132130 void abortPaymentSession();
133131 void cancelPaymentSession();
134132
135 #if HAVE(PASSKIT_PAYMENT_SETUP)
136133 void getSetupFeatures(const PaymentSetupConfiguration&, CompletionHandler<void(const PaymentSetupFeatures&)>&&);
137134 void beginApplePaySetup(const PaymentSetupConfiguration&, const PaymentSetupFeatures&, CompletionHandler<void(bool)>&&);
138135 void endApplePaySetup();
139136 void platformBeginApplePaySetup(const PaymentSetupConfiguration&, const PaymentSetupFeatures&, CompletionHandler<void(bool)>&&);
140137 void platformEndApplePaySetup();
141 #endif
142138
143139 bool canBegin() const;
144140 bool canCancel() const;

Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in

@@messages -> WebPaymentCoordinatorProxy NotRefCounted {
3838 CompletePaymentSession(Optional<WebCore::PaymentAuthorizationResult> result)
3939 AbortPaymentSession()
4040 CancelPaymentSession()
41 #if HAVE(PASSKIT_PAYMENT_SETUP)
 41
4242 GetSetupFeatures(WebKit::PaymentSetupConfiguration configuration) -> (WebKit::PaymentSetupFeatures features) Async
4343 BeginApplePaySetup(WebKit::PaymentSetupConfiguration configuration, WebKit::PaymentSetupFeatures features) -> (bool result) Async
4444 EndApplePaySetup()
45 #endif
4645}
4746
4847#endif

Source/WebKit/Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm

2828
2929#if ENABLE(APPLE_PAY)
3030
 31#import "APIUIClient.h"
 32#import "ApplePayPaymentSetupFeaturesWebKit.h"
 33#import "PaymentSetupConfigurationWebKit.h"
3134#import "WKPaymentAuthorizationDelegate.h"
 35#import "WebPageProxy.h"
3236#import "WebPaymentCoordinatorProxy.h"
3337#import "WebPaymentCoordinatorProxyMessages.h"
 38#import "WebProcessProxy.h"
3439#import <WebCore/PaymentAuthorizationStatus.h>
3540#import <WebCore/PaymentHeaders.h>
3641#import <wtf/BlockPtr.h>

3843#import <wtf/URL.h>
3944#import <wtf/cocoa/VectorCocoa.h>
4045
41 #if HAVE(PASSKIT_PAYMENT_SETUP)
42 #import "APIUIClient.h"
43 #import "ApplePayPaymentSetupFeaturesWebKit.h"
44 #import "PaymentSetupConfigurationWebKit.h"
45 #import "WebPageProxy.h"
46 #import "WebProcessProxy.h"
47 #endif
48 
4946#import <pal/cocoa/PassKitSoftLink.h>
5047
5148// FIXME: We don't support any platforms without -setThumbnailURLs:, so this can be removed.

@@void WebPaymentCoordinatorProxy::platformCompletePaymentMethodSelection(const Op
301298 m_authorizationPresenter->completePaymentMethodSelection(update);
302299}
303300
304 #if HAVE(PASSKIT_PAYMENT_SETUP)
305 
306301void WebPaymentCoordinatorProxy::getSetupFeatures(const PaymentSetupConfiguration& configuration, Messages::WebPaymentCoordinatorProxy::GetSetupFeatures::AsyncReply&& reply)
307302{
308303#if PLATFORM(MAC)

@@void WebPaymentCoordinatorProxy::platformEndApplePaySetup()
402397
403398#endif // PLATFORM(MAC)
404399
405 #endif // HAVE(PASSKIT_PAYMENT_SETUP)
406 
407400} // namespace WebKit
408401
409402#endif // ENABLE(APPLE_PAY)

Source/WebKit/WebProcess/ApplePay/WebPaymentCoordinator.cpp

@@bool WebPaymentCoordinator::remoteUIEnabled() const
222222}
223223#endif
224224
225 #if ENABLE(APPLE_PAY_SETUP)
226 
227225void WebPaymentCoordinator::getSetupFeatures(const WebCore::ApplePaySetupConfiguration& configuration, const URL& url, CompletionHandler<void(Vector<Ref<WebCore::ApplePaySetupFeature>>&&)>&& completionHandler)
228226{
229227 m_webPage.sendWithAsyncReply(Messages::WebPaymentCoordinatorProxy::GetSetupFeatures(PaymentSetupConfiguration { configuration, url }), WTFMove(completionHandler));

@@void WebPaymentCoordinator::endApplePaySetup()
239237 m_webPage.send(Messages::WebPaymentCoordinatorProxy::EndApplePaySetup());
240238}
241239
242 #endif // ENABLE(APPLE_PAY_SETUP)
243 
244240}
245241
246242#endif

Source/WebKit/WebProcess/ApplePay/WebPaymentCoordinator.h

@@private:
8585
8686 String userAgentScriptsBlockedErrorMessage() const final;
8787
88 #if ENABLE(APPLE_PAY_SETUP)
8988 void getSetupFeatures(const WebCore::ApplePaySetupConfiguration&, const URL&, CompletionHandler<void(Vector<Ref<WebCore::ApplePaySetupFeature>>&&)>&&) final;
9089 void beginApplePaySetup(const WebCore::ApplePaySetupConfiguration&, const URL&, Vector<RefPtr<WebCore::ApplePaySetupFeature>>&&, CompletionHandler<void(bool)>&&) final;
9190 void endApplePaySetup() final;
92 #endif
9391
9492 // IPC::MessageReceiver.
9593 void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;