Diff
Modified: trunk/Source/WebCore/ChangeLog (207361 => 207362)
--- trunk/Source/WebCore/ChangeLog 2016-10-14 23:37:21 UTC (rev 207361)
+++ trunk/Source/WebCore/ChangeLog 2016-10-14 23:56:00 UTC (rev 207362)
@@ -1,3 +1,15 @@
+2016-10-14 Anders Carlsson <[email protected]>
+
+ Pass on networking settings to the PKPaymentRequest
+ https://bugs.webkit.org/show_bug.cgi?id=163462
+ rdar://problem/28567629
+
+ Reviewed by Dan Bernstein.
+
+ Add new SPI.
+
+ * platform/spi/cocoa/PassKitSPI.h:
+
2016-10-14 Dean Jackson <[email protected]>
CSS parsing should use Color not RGBA32
Modified: trunk/Source/WebCore/platform/spi/cocoa/PassKitSPI.h (207361 => 207362)
--- trunk/Source/WebCore/platform/spi/cocoa/PassKitSPI.h 2016-10-14 23:37:21 UTC (rev 207361)
+++ trunk/Source/WebCore/platform/spi/cocoa/PassKitSPI.h 2016-10-14 23:56:00 UTC (rev 207362)
@@ -242,4 +242,10 @@
- (void)openPaymentSetupForMerchantIdentifier:(NSString *)identifier domain:(NSString *)domain completion:(void(^)(BOOL success))completion;
@end
+@interface PKPaymentRequest ()
+@property (nonatomic, strong) NSString *sourceApplicationBundleIdentifier;
+@property (nonatomic, strong) NSString *sourceApplicationSecondaryIdentifier;
+@property (nonatomic, strong) NSString *CTDataConnectionServiceType;
+@end
+
NS_ASSUME_NONNULL_END
Modified: trunk/Source/WebKit2/ChangeLog (207361 => 207362)
--- trunk/Source/WebKit2/ChangeLog 2016-10-14 23:37:21 UTC (rev 207361)
+++ trunk/Source/WebKit2/ChangeLog 2016-10-14 23:56:00 UTC (rev 207362)
@@ -1,5 +1,19 @@
2016-10-14 Anders Carlsson <[email protected]>
+ Pass on networking settings to the PKPaymentRequest
+ https://bugs.webkit.org/show_bug.cgi?id=163462
+ rdar://problem/28567629
+
+ Reviewed by Dan Bernstein.
+
+ * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h:
+ * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
+ (WebKit::toPKPaymentRequest):
+ * UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:
+ (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
+
+2016-10-14 Anders Carlsson <[email protected]>
+
Clean up BackForwardClient
https://bugs.webkit.org/show_bug.cgi?id=163454
Modified: trunk/Source/WebKit2/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h (207361 => 207362)
--- trunk/Source/WebKit2/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h 2016-10-14 23:37:21 UTC (rev 207361)
+++ trunk/Source/WebKit2/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h 2016-10-14 23:56:00 UTC (rev 207362)
@@ -36,9 +36,10 @@
}
namespace WebKit {
+class WebPageProxy;
class WebPaymentCoordinatorProxy;
-RetainPtr<PKPaymentRequest> toPKPaymentRequest(const WebCore::URL& originatingURL, const Vector<WebCore::URL>& linkIconURLs, const WebCore::PaymentRequest&);
+RetainPtr<PKPaymentRequest> toPKPaymentRequest(WebPageProxy&, const WebCore::URL& originatingURL, const Vector<WebCore::URL>& linkIconURLs, const WebCore::PaymentRequest&);
}
Modified: trunk/Source/WebKit2/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm (207361 => 207362)
--- trunk/Source/WebKit2/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm 2016-10-14 23:37:21 UTC (rev 207361)
+++ trunk/Source/WebKit2/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm 2016-10-14 23:56:00 UTC (rev 207362)
@@ -29,6 +29,7 @@
#if ENABLE(APPLE_PAY)
#import "WebPaymentCoordinatorProxy.h"
+#import "WebProcessPool.h"
#import <WebCore/PassKitSPI.h>
#import <WebCore/PaymentAuthorizationStatus.h>
#import <WebCore/PaymentHeaders.h>
@@ -359,7 +360,7 @@
return result;
}
-RetainPtr<PKPaymentRequest> toPKPaymentRequest(const WebCore::URL& originatingURL, const Vector<WebCore::URL>& linkIconURLs, const WebCore::PaymentRequest& paymentRequest)
+RetainPtr<PKPaymentRequest> toPKPaymentRequest(WebPageProxy& webPageProxy, const WebCore::URL& originatingURL, const Vector<WebCore::URL>& linkIconURLs, const WebCore::PaymentRequest& paymentRequest)
{
auto result = adoptNS([allocPKPaymentRequestInstance() init]);
@@ -409,6 +410,20 @@
[result setApplicationData:applicationData.get()];
}
+ // FIXME: Instead of using respondsToSelector, this should use a proper #if version check.
+ auto& configuration = webPageProxy.process().processPool().configuration();
+
+ if (!configuration.sourceApplicationBundleIdentifier().isEmpty() && [result respondsToSelector:@selector(setSourceApplicationBundleIdentifier:)])
+ [result setSourceApplicationBundleIdentifier:configuration.sourceApplicationBundleIdentifier()];
+
+ if (!configuration.sourceApplicationSecondaryIdentifier().isEmpty() && [result respondsToSelector:@selector(setSourceApplicationSecondaryIdentifier:)])
+ [result setSourceApplicationSecondaryIdentifier:configuration.sourceApplicationSecondaryIdentifier()];
+
+#if PLATFORM(IOS)
+ if (!configuration.ctDataConnectionServiceType().isEmpty() && [result respondsToSelector:@selector(setCTDataConnectionServiceType:)])
+ [result setCTDataConnectionServiceType:configuration.ctDataConnectionServiceType()];
+#endif
+
return result;
}
Modified: trunk/Source/WebKit2/UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm (207361 => 207362)
--- trunk/Source/WebKit2/UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm 2016-10-14 23:37:21 UTC (rev 207361)
+++ trunk/Source/WebKit2/UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm 2016-10-14 23:56:00 UTC (rev 207362)
@@ -52,7 +52,7 @@
ASSERT(!m_paymentAuthorizationViewController);
- auto paymentRequest = toPKPaymentRequest(originatingURL, linkIconURLStrings, request);
+ auto paymentRequest = toPKPaymentRequest(m_webPageProxy, originatingURL, linkIconURLStrings, request);
m_paymentAuthorizationViewController = adoptNS([allocPKPaymentAuthorizationViewControllerInstance() initWithPaymentRequest:paymentRequest.get()]);
if (!m_paymentAuthorizationViewController) {