- Revision
- 215431
- Author
- ander...@apple.com
- Date
- 2017-04-17 14:34:20 -0700 (Mon, 17 Apr 2017)
Log Message
Stop using deprecated APIs, part 1
https://bugs.webkit.org/show_bug.cgi?id=170915
rdar://problem/31589635
Reviewed by Tim Horton.
Source/WebCore:
Get rid of the status parameter from ApplePayPaymentMethodUpdate.
* Modules/applepay/ApplePayPaymentMethodUpdate.h:
* Modules/applepay/ApplePayPaymentMethodUpdate.idl:
* Modules/applepay/ApplePaySession.cpp:
(WebCore::convertAndValidate):
(WebCore::ApplePaySession::completePaymentMethodSelection):
* Modules/applepay/PaymentRequest.h:
Source/WebKit2:
Stop using the PKPaymentRequestPaymentMethodUpdate initializer that takes a status, it's been deprecated
and we always passed PKPaymentAuthorizationStatusSuccess anyway.
* Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::ArgumentCoder<WebCore::PaymentMethodUpdate>::encode):
(IPC::ArgumentCoder<WebCore::PaymentMethodUpdate>::decode):
* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentMethodSelection):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (215430 => 215431)
--- trunk/Source/WebCore/ChangeLog 2017-04-17 21:29:35 UTC (rev 215430)
+++ trunk/Source/WebCore/ChangeLog 2017-04-17 21:34:20 UTC (rev 215431)
@@ -1,3 +1,20 @@
+2017-04-17 Anders Carlsson <ander...@apple.com>
+
+ Stop using deprecated APIs, part 1
+ https://bugs.webkit.org/show_bug.cgi?id=170915
+ rdar://problem/31589635
+
+ Reviewed by Tim Horton.
+
+ Get rid of the status parameter from ApplePayPaymentMethodUpdate.
+
+ * Modules/applepay/ApplePayPaymentMethodUpdate.h:
+ * Modules/applepay/ApplePayPaymentMethodUpdate.idl:
+ * Modules/applepay/ApplePaySession.cpp:
+ (WebCore::convertAndValidate):
+ (WebCore::ApplePaySession::completePaymentMethodSelection):
+ * Modules/applepay/PaymentRequest.h:
+
2017-04-17 Youenn Fablet <you...@apple.com>
Disable outdated WritableStream API
Modified: trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethodUpdate.h (215430 => 215431)
--- trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethodUpdate.h 2017-04-17 21:29:35 UTC (rev 215430)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethodUpdate.h 2017-04-17 21:34:20 UTC (rev 215431)
@@ -32,8 +32,6 @@
namespace WebCore {
struct ApplePayPaymentMethodUpdate {
- unsigned short status;
-
ApplePayLineItem newTotal;
Vector<ApplePayLineItem> newLineItems;
};
Modified: trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethodUpdate.idl (215430 => 215431)
--- trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethodUpdate.idl 2017-04-17 21:29:35 UTC (rev 215430)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethodUpdate.idl 2017-04-17 21:34:20 UTC (rev 215431)
@@ -26,8 +26,6 @@
[
Conditional=APPLE_PAY_DELEGATE,
] dictionary ApplePayPaymentMethodUpdate {
- required unsigned short status;
-
required ApplePayLineItem newTotal;
sequence<ApplePayLineItem> newLineItems;
};
Modified: trunk/Source/WebCore/Modules/applepay/ApplePaySession.cpp (215430 => 215431)
--- trunk/Source/WebCore/Modules/applepay/ApplePaySession.cpp 2017-04-17 21:29:35 UTC (rev 215430)
+++ trunk/Source/WebCore/Modules/applepay/ApplePaySession.cpp 2017-04-17 21:34:20 UTC (rev 215431)
@@ -444,11 +444,6 @@
{
PaymentMethodUpdate convertedUpdate;
- auto authorizationStatus = toPaymentAuthorizationStatus(update.status);
- if (!authorizationStatus)
- return Exception { INVALID_ACCESS_ERR };
- convertedUpdate.status = *authorizationStatus;
-
auto convertedNewTotal = convertAndValidateTotal(WTFMove(update.newTotal));
if (convertedNewTotal.hasException())
return convertedNewTotal.releaseException();
@@ -846,7 +841,6 @@
{
ApplePayPaymentMethodUpdate update;
- update.status = STATUS_SUCCESS;
update.newTotal = WTFMove(newTotal);
update.newLineItems = WTFMove(newLineItems);
Modified: trunk/Source/WebCore/Modules/applepay/PaymentRequest.h (215430 => 215431)
--- trunk/Source/WebCore/Modules/applepay/PaymentRequest.h 2017-04-17 21:29:35 UTC (rev 215430)
+++ trunk/Source/WebCore/Modules/applepay/PaymentRequest.h 2017-04-17 21:34:20 UTC (rev 215431)
@@ -181,7 +181,6 @@
};
struct PaymentMethodUpdate {
- PaymentAuthorizationStatus status;
PaymentRequest::TotalAndLineItems newTotalAndLineItems;
};
Modified: trunk/Source/WebKit2/ChangeLog (215430 => 215431)
--- trunk/Source/WebKit2/ChangeLog 2017-04-17 21:29:35 UTC (rev 215430)
+++ trunk/Source/WebKit2/ChangeLog 2017-04-17 21:34:20 UTC (rev 215431)
@@ -1,3 +1,20 @@
+2017-04-17 Anders Carlsson <ander...@apple.com>
+
+ Stop using deprecated APIs, part 1
+ https://bugs.webkit.org/show_bug.cgi?id=170915
+ rdar://problem/31589635
+
+ Reviewed by Tim Horton.
+
+ Stop using the PKPaymentRequestPaymentMethodUpdate initializer that takes a status, it's been deprecated
+ and we always passed PKPaymentAuthorizationStatusSuccess anyway.
+
+ * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
+ (IPC::ArgumentCoder<WebCore::PaymentMethodUpdate>::encode):
+ (IPC::ArgumentCoder<WebCore::PaymentMethodUpdate>::decode):
+ * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
+ (WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentMethodSelection):
+
2017-04-17 Youenn Fablet <you...@apple.com>
Disable outdated WritableStream API
Modified: trunk/Source/WebKit2/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm (215430 => 215431)
--- trunk/Source/WebKit2/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm 2017-04-17 21:29:35 UTC (rev 215430)
+++ trunk/Source/WebKit2/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm 2017-04-17 21:34:20 UTC (rev 215431)
@@ -222,14 +222,11 @@
void ArgumentCoder<WebCore::PaymentMethodUpdate>::encode(Encoder& encoder, const WebCore::PaymentMethodUpdate& update)
{
- encoder << update.status;
encoder << update.newTotalAndLineItems;
}
bool ArgumentCoder<WebCore::PaymentMethodUpdate>::decode(Decoder& decoder, WebCore::PaymentMethodUpdate& update)
{
- if (!decoder.decode(update.status))
- return false;
if (!decoder.decode(update.newTotalAndLineItems))
return false;
Modified: trunk/Source/WebKit2/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm (215430 => 215431)
--- trunk/Source/WebKit2/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm 2017-04-17 21:29:35 UTC (rev 215430)
+++ trunk/Source/WebKit2/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm 2017-04-17 21:34:20 UTC (rev 215431)
@@ -762,11 +762,7 @@
m_paymentAuthorizationViewControllerDelegate->_paymentSummaryItems = toPKPaymentSummaryItems(update->newTotalAndLineItems);
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
- auto status = update ? update->status : WebCore::PaymentAuthorizationStatus::Success;
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- auto pkPaymentMethodUpdate = adoptNS([allocPKPaymentRequestPaymentMethodUpdateInstance() initWithStatus:toPKPaymentAuthorizationStatus(status) paymentSummaryItems:m_paymentAuthorizationViewControllerDelegate->_paymentSummaryItems.get()]);
-#pragma clang diagnostic pop
+ auto pkPaymentMethodUpdate = adoptNS([allocPKPaymentRequestPaymentMethodUpdateInstance() initWithPaymentSummaryItems:m_paymentAuthorizationViewControllerDelegate->_paymentSummaryItems.get()]);
m_paymentAuthorizationViewControllerDelegate->_didSelectPaymentMethodCompletion(pkPaymentMethodUpdate.get());
#else
m_paymentAuthorizationViewControllerDelegate->_didSelectPaymentMethodCompletion(m_paymentAuthorizationViewControllerDelegate->_paymentSummaryItems.get());