Changeset 246235 in webkit
- Timestamp:
- Jun 8, 2019 4:45:28 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r246146 r246235 1 2019-06-08 Andy Estes <aestes@apple.com> 2 3 [Apple Pay] If we have a bound interface identifier, set it on new PKPaymentRequests 4 https://bugs.webkit.org/show_bug.cgi?id=198690 5 <rdar://problem/48041803> 6 7 Reviewed by Tim Horton. 8 9 * wtf/FeatureDefines.h: Defined HAVE_PASSKIT_BOUND_INTERFACE_IDENTIFIER, and cleaned up some 10 other PassKit HAVEs. 11 1 12 2019-06-06 Caio Lima <ticaiolima@gmail.com> 2 13 -
trunk/Source/WTF/wtf/FeatureDefines.h
r245898 r246235 206 206 #endif 207 207 208 #if !defined(HAVE_PASSKIT_BOUND_INTERFACE_IDENTIFIER) 209 #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000 210 #define HAVE_PASSKIT_BOUND_INTERFACE_IDENTIFIER 1 211 #endif 212 #endif 213 208 214 #endif /* PLATFORM(IOS_FAMILY) */ 209 215 … … 287 293 288 294 #if !defined(HAVE_PASSKIT_GRANULAR_ERRORS) 289 #define HAVE_PASSKIT_GRANULAR_ERRORS __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 295 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 296 #define HAVE_PASSKIT_GRANULAR_ERRORS 1 297 #endif 290 298 #endif 291 299 292 300 #if !defined(HAVE_PASSKIT_API_TYPE) 293 #define HAVE_PASSKIT_API_TYPE __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101304 301 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101304 302 #define HAVE_PASSKIT_API_TYPE 1 303 #endif 304 #endif 305 306 #if !defined(HAVE_PASSKIT_BOUND_INTERFACE_IDENTIFIER) 307 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 308 #define HAVE_PASSKIT_BOUND_INTERFACE_IDENTIFIER 1 309 #endif 294 310 #endif 295 311 -
trunk/Source/WebCore/PAL/ChangeLog
r246126 r246235 1 2019-06-08 Andy Estes <aestes@apple.com> 2 3 [Apple Pay] If we have a bound interface identifier, set it on new PKPaymentRequests 4 https://bugs.webkit.org/show_bug.cgi?id=198690 5 <rdar://problem/48041803> 6 7 Reviewed by Tim Horton. 8 9 * pal/spi/cocoa/PassKitSPI.h: Included PKPaymentRequest_WebKit.h to declare some 10 WebKit-specific PKPaymentRequest SPIs for internal SDKs, and re-declared these SPIs - now 11 including the boundInterfaceIdentifier property - for public SDKs. 12 1 13 2019-06-05 Alex Christensen <achristensen@webkit.org> 2 14 -
trunk/Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h
r243412 r246235 43 43 #import <PassKit/PKPaymentAuthorizationViewController_Private.h> 44 44 #import <PassKit/PKPaymentRequest_Private.h> 45 #import <PassKitCore/PKPaymentRequest_WebKit.h> 45 46 46 47 #if PLATFORM(IOS_FAMILY) … … 297 298 @end 298 299 300 @interface PKPaymentRequest () 301 @property (nonatomic, strong) NSArray *thumbnailURLs; 302 @property (nonatomic, retain) NSURL *originatingURL; 303 @property (nonatomic, assign) BOOL expectsMerchantSession; 304 @property (nonatomic, strong) NSString *sourceApplicationBundleIdentifier; 305 @property (nonatomic, strong) NSString *sourceApplicationSecondaryIdentifier; 306 @property (nonatomic, strong) NSString *CTDataConnectionServiceType; 307 @end 308 299 309 #if HAVE(PASSKIT_API_TYPE) 300 310 @interface PKPaymentRequest () 301 311 @property (nonatomic, assign) PKPaymentRequestAPIType APIType; 312 @end 313 #endif 314 315 #if HAVE(PASSKIT_BOUND_INTERFACE_IDENTIFIER) 316 @interface PKPaymentRequest () 317 @property (nonatomic, copy) NSString *boundInterfaceIdentifier; 302 318 @end 303 319 #endif … … 371 387 @end 372 388 373 @interface PKPaymentRequest ()374 @property (nonatomic, strong) NSString *sourceApplicationBundleIdentifier;375 @property (nonatomic, strong) NSString *sourceApplicationSecondaryIdentifier;376 @property (nonatomic, strong) NSString *CTDataConnectionServiceType;377 @end378 379 389 typedef void(^PKCanMakePaymentsCompletion)(BOOL isValid, NSError *); 380 390 -
trunk/Source/WebKit/ChangeLog
r246230 r246235 1 2019-06-08 Andy Estes <aestes@apple.com> 2 3 [Apple Pay] If we have a bound interface identifier, set it on new PKPaymentRequests 4 https://bugs.webkit.org/show_bug.cgi?id=198690 5 <rdar://problem/48041803> 6 7 Reviewed by Tim Horton. 8 9 * NetworkProcess/cocoa/NetworkSessionCocoa.h: 10 * NetworkProcess/cocoa/NetworkSessionCocoa.mm: 11 (WebKit::NetworkSessionCocoa::boundInterfaceIdentifier const): Implemented a public getter 12 for m_boundInterfaceIdentifier. 13 14 * NetworkProcess/NetworkConnectionToWebProcess.h: 15 * NetworkProcess/ios/NetworkConnectionToWebProcessIOS.mm: 16 (WebKit::NetworkConnectionToWebProcess::paymentCoordinatorBoundInterfaceIdentifier): 17 Implemented an override for paymentCoordinatorBoundInterfaceIdentifier. 18 19 * Shared/ApplePay/WebPaymentCoordinatorProxy.h: Declared 20 paymentCoordinatorBoundInterfaceIdentifier for clients to override. 21 22 * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: 23 (WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): If the client has a non-empty 24 bound interface identifier, set it on the new PKPaymentRequest. 25 26 * UIProcess/WebPageProxy.h: 27 * UIProcess/Cocoa/WebPageProxyCocoa.mm: 28 (WebKit::WebPageProxy::paymentCoordinatorBoundInterfaceIdentifier): Implemented an override 29 for paymentCoordinatorBoundInterfaceIdentifier. 30 1 31 2019-06-07 Antti Koivisto <antti@apple.com> 2 32 -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
r245796 r246235 272 272 IPC::Connection* paymentCoordinatorConnection(const WebPaymentCoordinatorProxy&) final; 273 273 UIViewController *paymentCoordinatorPresentingViewController(const WebPaymentCoordinatorProxy&) final; 274 const String& paymentCoordinatorBoundInterfaceIdentifier(const WebPaymentCoordinatorProxy&, PAL::SessionID) final; 274 275 const String& paymentCoordinatorCTDataConnectionServiceType(const WebPaymentCoordinatorProxy&, PAL::SessionID) final; 275 276 const String& paymentCoordinatorSourceApplicationBundleIdentifier(const WebPaymentCoordinatorProxy&, PAL::SessionID) final; -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h
r245979 r246235 51 51 void initializeEphemeralStatelessCookielessSession(); 52 52 53 const String& boundInterfaceIdentifier() const; 53 54 const String& sourceApplicationBundleIdentifier() const; 54 55 const String& sourceApplicationSecondaryIdentifier() const; -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
r245979 r246235 829 829 } 830 830 831 const String& NetworkSessionCocoa::boundInterfaceIdentifier() const 832 { 833 return m_boundInterfaceIdentifier; 834 } 835 831 836 const String& NetworkSessionCocoa::sourceApplicationBundleIdentifier() const 832 837 { -
trunk/Source/WebKit/NetworkProcess/ios/NetworkConnectionToWebProcessIOS.mm
r242748 r246235 53 53 } 54 54 55 const String& NetworkConnectionToWebProcess::paymentCoordinatorBoundInterfaceIdentifier(const WebPaymentCoordinatorProxy&, PAL::SessionID sessionID) 56 { 57 if (auto session = static_cast<NetworkSessionCocoa*>(m_networkProcess->networkSession(sessionID))) 58 return session->boundInterfaceIdentifier(); 59 return emptyString(); 60 } 61 55 62 const String& NetworkConnectionToWebProcess::paymentCoordinatorCTDataConnectionServiceType(const WebPaymentCoordinatorProxy&, PAL::SessionID sessionID) 56 63 { -
trunk/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.h
r245796 r246235 78 78 79 79 virtual IPC::Connection* paymentCoordinatorConnection(const WebPaymentCoordinatorProxy&) = 0; 80 virtual const String& paymentCoordinatorBoundInterfaceIdentifier(const WebPaymentCoordinatorProxy&, PAL::SessionID) = 0; 80 81 virtual const String& paymentCoordinatorSourceApplicationBundleIdentifier(const WebPaymentCoordinatorProxy&, PAL::SessionID) = 0; 81 82 virtual const String& paymentCoordinatorSourceApplicationSecondaryIdentifier(const WebPaymentCoordinatorProxy&, PAL::SessionID) = 0; -
trunk/Source/WebKit/Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm
r243443 r246235 38 38 #import <wtf/URL.h> 39 39 40 // FIXME: Once rdar://problem/24420024 has been fixed, import PKPaymentRequest_Private.h instead.40 // FIXME: We don't support any platforms without -setThumbnailURLs:, so this can be removed. 41 41 @interface PKPaymentRequest () 42 @property (nonatomic, retain) NSURL *originatingURL;42 @property (nonatomic, strong) NSURL *thumbnailURL; 43 43 @end 44 44 45 @interface PKPaymentRequest () 46 // FIXME: Remove this once it's in an SDK. 47 @property (nonatomic, strong) NSArray *thumbnailURLs; 48 @property (nonatomic, strong) NSURL *thumbnailURL; 49 50 @property (nonatomic, assign) BOOL expectsMerchantSession; 45 #if HAVE(PASSKIT_BOUND_INTERFACE_IDENTIFIER) 46 // FIXME: Remove once rdar://problem/48041516 is widely available in SDKs. 47 @interface PKPaymentRequest (Staging) 48 @property (nonatomic, copy) NSString *boundInterfaceIdentifier; 51 49 @end 50 #endif 52 51 53 52 namespace WebKit { … … 250 249 [result setOriginatingURL:originatingURL]; 251 250 251 // FIXME: We don't support any platforms without -setThumbnailURLs:, so this can be simplified. 252 252 if ([result respondsToSelector:@selector(setThumbnailURLs:)]) { 253 253 auto thumbnailURLs = adoptNS([[NSMutableArray alloc] init]); … … 307 307 #endif 308 308 309 #if HAVE(PASSKIT_BOUND_INTERFACE_IDENTIFIER) 310 // FIXME: Remove -respondsToSelector: check once rdar://problem/48041516 is widely available in SDKs. 311 auto& boundInterfaceIdentifier = m_client.paymentCoordinatorBoundInterfaceIdentifier(*this, sessionID); 312 if (!boundInterfaceIdentifier.isEmpty() && [result respondsToSelector:@selector(setBoundInterfaceIdentifier:)]) 313 [result setBoundInterfaceIdentifier:boundInterfaceIdentifier]; 314 #endif 315 309 316 // FIXME: Instead of using respondsToSelector, this should use a proper #if version check. 310 317 auto& bundleIdentifier = m_client.paymentCoordinatorSourceApplicationBundleIdentifier(*this, sessionID); -
trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
r246201 r246235 226 226 } 227 227 228 const String& WebPageProxy::paymentCoordinatorBoundInterfaceIdentifier(const WebPaymentCoordinatorProxy&, PAL::SessionID sessionID) 229 { 230 ASSERT_UNUSED(sessionID, sessionID == websiteDataStore().sessionID()); 231 return websiteDataStore().boundInterfaceIdentifier(); 232 } 233 228 234 const String& WebPageProxy::paymentCoordinatorSourceApplicationBundleIdentifier(const WebPaymentCoordinatorProxy&, PAL::SessionID sessionID) 229 235 { -
trunk/Source/WebKit/UIProcess/WebPageProxy.h
r246213 r246235 2066 2066 #if ENABLE(APPLE_PAY) 2067 2067 IPC::Connection* paymentCoordinatorConnection(const WebPaymentCoordinatorProxy&) final; 2068 const String& paymentCoordinatorBoundInterfaceIdentifier(const WebPaymentCoordinatorProxy&, PAL::SessionID) final; 2068 2069 const String& paymentCoordinatorSourceApplicationBundleIdentifier(const WebPaymentCoordinatorProxy&, PAL::SessionID) final; 2069 2070 const String& paymentCoordinatorSourceApplicationSecondaryIdentifier(const WebPaymentCoordinatorProxy&, PAL::SessionID) final;
Note: See TracChangeset
for help on using the changeset viewer.