Changeset 242795 in webkit
- Timestamp:
- Mar 12, 2019, 8:07:13 AM (7 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm (modified) (4 diffs)
-
Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r242794 r242795 1 2019-03-11 Andy Estes <aestes@apple.com> 2 3 [Mac] Ensure Apple Pay is unavailable when PassKit.framework is missing 4 https://bugs.webkit.org/show_bug.cgi?id=195583 5 <rdar://problem/48420224> 6 7 Reviewed by Daniel Bates. 8 9 PassKit.framework is optionally soft-linked on Mac because it is missing from the Recovery 10 Partition. We need to check if the framework is available before calling into it. 11 12 * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: 13 (WebKit::WebPaymentCoordinatorProxy::platformCanMakePayments): 14 (WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard): 15 (WebKit::WebPaymentCoordinatorProxy::platformOpenPaymentSetup): 16 (WebKit::WebPaymentCoordinatorProxy::platformAvailablePaymentNetworks): 17 * Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm: 18 (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI): 19 1 20 2019-03-12 Antti Koivisto <antti@apple.com> 2 21 -
trunk/Source/WebKit/Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm
r242748 r242795 55 55 bool WebPaymentCoordinatorProxy::platformCanMakePayments() 56 56 { 57 #if PLATFORM(MAC) 58 if (!PAL::isPassKitFrameworkAvailable()) 59 return false; 60 #endif 61 57 62 return [PAL::getPKPaymentAuthorizationViewControllerClass() canMakePayments]; 58 63 } … … 60 65 void WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard(const String& merchantIdentifier, const String& domainName, PAL::SessionID sessionID, WTF::Function<void(bool)>&& completionHandler) 61 66 { 67 #if PLATFORM(MAC) 68 if (!PAL::isPassKitFrameworkAvailable()) 69 return completionHandler(false); 70 #endif 71 62 72 #if HAVE(PASSKIT_GRANULAR_ERRORS) 63 73 PKCanMakePaymentsWithMerchantIdentifierDomainAndSourceApplication(merchantIdentifier, domainName, m_client.paymentCoordinatorSourceApplicationSecondaryIdentifier(*this, sessionID), makeBlockPtr([completionHandler = WTFMove(completionHandler)](BOOL canMakePayments, NSError *error) mutable { … … 83 93 void WebPaymentCoordinatorProxy::platformOpenPaymentSetup(const String& merchantIdentifier, const String& domainName, WTF::Function<void(bool)>&& completionHandler) 84 94 { 95 #if PLATFORM(MAC) 96 if (!PAL::isPassKitFrameworkAvailable()) 97 return completionHandler(false); 98 #endif 99 85 100 auto passLibrary = adoptNS([PAL::allocPKPassLibraryInstance() init]); 86 101 [passLibrary openPaymentSetupForMerchantIdentifier:merchantIdentifier domain:domainName completion:makeBlockPtr([completionHandler = WTFMove(completionHandler)](BOOL result) mutable { … … 345 360 Vector<String> WebPaymentCoordinatorProxy::platformAvailablePaymentNetworks() 346 361 { 362 #if PLATFORM(MAC) 363 if (!PAL::isPassKitFrameworkAvailable()) 364 return { }; 365 #endif 366 347 367 NSArray<PKPaymentNetwork> *availableNetworks = [PAL::getPKPaymentRequestClass() availableNetworks]; 348 368 Vector<String> result; -
trunk/Source/WebKit/Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm
r242748 r242795 38 38 void WebPaymentCoordinatorProxy::platformShowPaymentUI(const URL& originatingURL, const Vector<URL>& linkIconURLStrings, PAL::SessionID sessionID, const WebCore::ApplePaySessionPaymentRequest& request, CompletionHandler<void(bool)>&& completionHandler) 39 39 { 40 if (!PAL::isPassKitFrameworkAvailable()) 41 return completionHandler(false); 42 40 43 auto paymentRequest = platformPaymentRequest(originatingURL, linkIconURLStrings, sessionID, request); 41 44
Note:
See TracChangeset
for help on using the changeset viewer.