Changeset 280459 in webkit
- Timestamp:
- Jul 29, 2021 5:28:45 PM (12 months ago)
- Location:
- trunk
- Files:
-
- 3 added
- 18 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/http/tests/paymentrequest/ApplePayModifier-paymentMethodType.https-expected.txt (added)
-
LayoutTests/http/tests/paymentrequest/ApplePayModifier-paymentMethodType.https.html (added)
-
LayoutTests/platform/ios-14-wk2/TestExpectations (modified) (1 diff)
-
LayoutTests/platform/mac-bigsur-wk2/TestExpectations (added)
-
Source/WTF/ChangeLog (modified) (1 diff)
-
Source/WTF/wtf/PlatformEnableCocoa.h (modified) (1 diff)
-
Source/WTF/wtf/PlatformHave.h (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Modules/applepay/ApplePayPaymentMethodUpdate.h (modified) (4 diffs)
-
Source/WebCore/Modules/applepay/ApplePayPaymentMethodUpdate.idl (modified) (1 diff)
-
Source/WebCore/Modules/applepay/ApplePayShippingMethodUpdate.h (modified) (3 diffs)
-
Source/WebCore/Modules/applepay/ApplePayShippingMethodUpdate.idl (modified) (1 diff)
-
Source/WebCore/Modules/applepay/paymentrequest/ApplePayModifier.h (modified) (1 diff)
-
Source/WebCore/Modules/applepay/paymentrequest/ApplePayModifier.idl (modified) (1 diff)
-
Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp (modified) (5 diffs)
-
Source/WebCore/PAL/ChangeLog (modified) (1 diff)
-
Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h (modified) (1 diff)
-
Source/WebCore/testing/MockPaymentCoordinator.cpp (modified) (4 diffs)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r280458 r280459 1 2021-07-29 Devin Rousso <drousso@apple.com> 2 3 [Payment Request] `additionalShippingMethods` are not used if a `paymentMethodType` is provided 4 https://bugs.webkit.org/show_bug.cgi?id=228599 5 <rdar://problem/81190366> 6 7 Reviewed by Andy Estes. 8 9 * http/tests/paymentrequest/ApplePayModifier-paymentMethodType.https.html: Added. 10 * http/tests/paymentrequest/ApplePayModifier-paymentMethodType.https-expected.txt: Added. 11 12 * platform/ios-14-wk2/TestExpectations: 13 * platform/mac-bigsur-wk2/TestExpectations: Added. 14 Skip on older macOS/iOS since they don't support modifying shipping methods with any update. 15 1 16 2021-07-29 Eric Hutchison <ehutchison@apple.com> 2 17 -
trunk/LayoutTests/platform/ios-14-wk2/TestExpectations
r280246 r280459 9 9 # Accessibility text recognition support tests. 10 10 accessibility/ios-simulator/image-overlay-elements.html [ Skip ] 11 12 http/tests/paymentrequest/ApplePayModifier-paymentMethodType.https.html [ Skip ] -
trunk/Source/WTF/ChangeLog
r280452 r280459 1 2021-07-29 Devin Rousso <drousso@apple.com> 2 3 [Payment Request] `additionalShippingMethods` are not used if a `paymentMethodType` is provided 4 https://bugs.webkit.org/show_bug.cgi?id=228599 5 <rdar://problem/81190366> 6 7 Reviewed by Andy Estes. 8 9 r275169 made it so that `paymentMethodType` is no longer `required` so that `additionalShippingMethods` 10 can be specified without having to limit it to a specific payment method type. While this 11 works in theory, WebKit doesn't know about the user's selected payment method type until the 12 user actually selects a payment method, meaning that until then the `additionalShippingMethods` 13 are not used. Unfortunately (until now) `PKPaymentRequestPaymentMethodUpdate` did not 14 support providing a `NSArray<PKShippingMethod *> *`, so there was no way to update the list 15 of shipping methods when the user changed their selected payment method, meaning that WebKit 16 would have to wait/rely on the user to change their shipping address _after_ selecting a 17 payment method in order for `additionalShippingMethods` to take effect. 18 19 This also fixes an issue with WebKit's implementation of the W3C Payment Request API by 20 allowing any generic (i.e. things not specific to Apple Pay) `shippingOptions` provided in 21 `PaymentDetailsUpdate` to actually be used and update the Apple Pay sheet accordingly. 22 23 * wtf/PlatformHave.h: 24 * wtf/PlatformEnableCocoa.h: 25 Add new compile flags for PassKit supporting modifying shipping methods with any update. 26 1 27 2021-07-28 Yusuke Suzuki <ysuzuki@apple.com> 2 28 -
trunk/Source/WTF/wtf/PlatformEnableCocoa.h
r279184 r280459 96 96 #endif 97 97 98 #if !defined(ENABLE_APPLE_PAY_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_LINE_ITEMS) && HAVE(PASSKIT_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_SUMMARY_ITEMS) 99 #define ENABLE_APPLE_PAY_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_LINE_ITEMS 1 100 #endif 101 98 102 #if !defined(ENABLE_APPLICATION_MANIFEST) 99 103 #define ENABLE_APPLICATION_MANIFEST 1 -
trunk/Source/WTF/wtf/PlatformHave.h
r280445 r280459 726 726 #define HAVE_PASSKIT_COUPON_CODE 1 727 727 #define HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE 1 728 #define HAVE_PASSKIT_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_SUMMARY_ITEMS 1 728 729 #endif 729 730 -
trunk/Source/WebCore/ChangeLog
r280454 r280459 1 2021-07-29 Devin Rousso <drousso@apple.com> 2 3 [Payment Request] `additionalShippingMethods` are not used if a `paymentMethodType` is provided 4 https://bugs.webkit.org/show_bug.cgi?id=228599 5 <rdar://problem/81190366> 6 7 Reviewed by Andy Estes. 8 9 r275169 made it so that `paymentMethodType` is no longer `required` so that `additionalShippingMethods` 10 can be specified without having to limit it to a specific payment method type. While this 11 works in theory, WebKit doesn't know about the user's selected payment method type until the 12 user actually selects a payment method, meaning that until then the `additionalShippingMethods` 13 are not used. Unfortunately (until now) `PKPaymentRequestPaymentMethodUpdate` did not 14 support providing a `NSArray<PKShippingMethod *> *`, so there was no way to update the list 15 of shipping methods when the user changed their selected payment method, meaning that WebKit 16 would have to wait/rely on the user to change their shipping address _after_ selecting a 17 payment method in order for `additionalShippingMethods` to take effect. 18 19 This also fixes an issue with WebKit's implementation of the W3C Payment Request API by 20 allowing any generic (i.e. things not specific to Apple Pay) `shippingOptions` provided in 21 `PaymentDetailsUpdate` to actually be used and update the Apple Pay sheet accordingly. 22 23 Test: http/tests/paymentrequest/ApplePayModifier-paymentMethodType.https.html 24 25 * Modules/applepay/ApplePayModifier.idl: 26 * Modules/applepay/ApplePayModifier.h: 27 * Modules/applepay/ApplePayPaymentMethodUpdate.idl: 28 * Modules/applepay/ApplePayPaymentMethodUpdate.h: 29 (WebCore::ApplePayPaymentMethodUpdate::encode const): 30 (WebCore::ApplePayPaymentMethodUpdate::decode): 31 * Modules/applepay/ApplePayShippingMethodUpdate.idl: 32 * Modules/applepay/ApplePayShippingMethodUpdate.h: 33 (WebCore::ApplePayShippingMethodUpdate::encode const): 34 (WebCore::ApplePayShippingMethodUpdate::decode): 35 Add (or wrap existing) `additionalShippingMethods`/`newShippingMethods` properties. 36 37 * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp: 38 (WebCore::ApplePayPaymentHandler::computeShippingMethods): 39 (WebCore::ApplePayPaymentHandler::detailsUpdated): 40 (WebCore::ApplePayPaymentHandler::shippingOptionUpdated): 41 (WebCore::ApplePayPaymentHandler::paymentMethodUpdated): 42 Also call `computeShippingMethods()` and add the result to the update. 43 44 * testing/MockPaymentCoordinator.cpp: 45 (WebCore::MockPaymentCoordinator::completeShippingMethodSelection): 46 (WebCore::MockPaymentCoordinator::completeShippingContactSelection): 47 (WebCore::MockPaymentCoordinator::completePaymentMethodSelection): 48 (WebCore::MockPaymentCoordinator::completeCouponCodeChange): 49 Support for testing. 50 1 51 2021-07-29 Alex Christensen <achristensen@webkit.org> 2 52 -
trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethodUpdate.h
r278340 r280459 29 29 30 30 #include "ApplePayDetailsUpdateBase.h" 31 #include "ApplePayError.h" 32 #include "ApplePayShippingMethod.h" 33 #include <wtf/RefPtr.h> 34 #include <wtf/Vector.h> 31 35 #include <wtf/text/WTFString.h> 32 36 … … 34 38 35 39 struct ApplePayPaymentMethodUpdate final : public ApplePayDetailsUpdateBase { 40 #if ENABLE(APPLE_PAY_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_LINE_ITEMS) 41 Vector<RefPtr<ApplePayError>> errors; 42 43 Vector<ApplePayShippingMethod> newShippingMethods; 44 #endif 45 36 46 #if ENABLE(APPLE_PAY_INSTALLMENTS) 37 47 String installmentGroupIdentifier; … … 46 56 { 47 57 ApplePayDetailsUpdateBase::encode(encoder); 58 #if ENABLE(APPLE_PAY_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_LINE_ITEMS) 59 encoder << errors; 60 encoder << newShippingMethods; 61 #endif 48 62 #if ENABLE(APPLE_PAY_INSTALLMENTS) 49 63 encoder << installmentGroupIdentifier; … … 66 80 result.name = WTFMove(*name); \ 67 81 82 #if ENABLE(APPLE_PAY_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_LINE_ITEMS) 83 DECODE(errors, Vector<RefPtr<ApplePayError>>) 84 DECODE(newShippingMethods, Vector<ApplePayShippingMethod>) 85 #endif 86 68 87 #if ENABLE(APPLE_PAY_INSTALLMENTS) 69 88 DECODE(installmentGroupIdentifier, String) -
trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethodUpdate.idl
r273143 r280459 27 27 Conditional=APPLE_PAY, 28 28 ] dictionary ApplePayPaymentMethodUpdate : ApplePayDetailsUpdateBase { 29 [Conditional=APPLE_PAY_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_LINE_ITEMS] sequence<ApplePayError> errors; 30 31 [Conditional=APPLE_PAY_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_LINE_ITEMS] sequence<ApplePayShippingMethod> newShippingMethods; 32 29 33 [Conditional=APPLE_PAY_INSTALLMENTS] DOMString installmentGroupIdentifier; 30 34 }; -
trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethodUpdate.h
r278253 r280459 29 29 30 30 #include "ApplePayDetailsUpdateBase.h" 31 #include "ApplePayShippingMethod.h" 32 #include <wtf/Vector.h> 31 33 32 34 namespace WebCore { 33 35 34 36 struct ApplePayShippingMethodUpdate final : public ApplePayDetailsUpdateBase { 37 #if ENABLE(APPLE_PAY_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_LINE_ITEMS) 38 Vector<ApplePayShippingMethod> newShippingMethods; 39 #endif 40 35 41 template<class Encoder> void encode(Encoder&) const; 36 42 template<class Decoder> static std::optional<ApplePayShippingMethodUpdate> decode(Decoder&); … … 41 47 { 42 48 ApplePayDetailsUpdateBase::encode(encoder); 49 #if ENABLE(APPLE_PAY_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_LINE_ITEMS) 50 encoder << newShippingMethods; 51 #endif 43 52 } 44 53 … … 51 60 return std::nullopt; 52 61 62 #define DECODE(name, type) \ 63 std::optional<type> name; \ 64 decoder >> name; \ 65 if (!name) \ 66 return std::nullopt; \ 67 result.name = WTFMove(*name); \ 68 69 #if ENABLE(APPLE_PAY_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_LINE_ITEMS) 70 DECODE(newShippingMethods, Vector<ApplePayShippingMethod>) 71 #endif 72 73 #undef DECODE 74 53 75 return result; 54 76 } -
trunk/Source/WebCore/Modules/applepay/ApplePayShippingMethodUpdate.idl
r273143 r280459 27 27 Conditional=APPLE_PAY, 28 28 ] dictionary ApplePayShippingMethodUpdate : ApplePayDetailsUpdateBase { 29 [Conditional=APPLE_PAY_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_LINE_ITEMS] sequence<ApplePayShippingMethod> newShippingMethods; 29 30 }; -
trunk/Source/WebCore/Modules/applepay/paymentrequest/ApplePayModifier.h
r278437 r280459 42 42 std::optional<ApplePayLineItem> total; 43 43 Vector<ApplePayLineItem> additionalLineItems; 44 #if ENABLE(APPLE_PAY_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_LINE_ITEMS) 44 45 Vector<ApplePayShippingMethod> additionalShippingMethods; 46 #endif 45 47 46 48 #if defined(ApplePayModifierAdditions_members) -
trunk/Source/WebCore/Modules/applepay/paymentrequest/ApplePayModifier.idl
r278437 r280459 30 30 ApplePayLineItem total; 31 31 sequence<ApplePayLineItem> additionalLineItems; 32 sequence<ApplePayShippingMethod> additionalShippingMethods;32 [Conditional=APPLE_PAY_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_LINE_ITEMS] sequence<ApplePayShippingMethod> additionalShippingMethods; 33 33 }; -
trunk/Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp
r278630 r280459 307 307 } 308 308 309 #if ENABLE(APPLE_PAY_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_LINE_ITEMS) 309 310 auto modifierException = firstApplicableModifier(); 310 311 if (modifierException.hasException()) … … 312 313 if (auto modifierData = modifierException.releaseReturnValue()) 313 314 shippingOptions.appendVector(WTFMove(std::get<1>(*modifierData).additionalShippingMethods)); 315 #endif 314 316 315 317 return WTFMove(shippingOptions); … … 512 514 return shippingOptionUpdated(); 513 515 case Reason::PaymentMethodChanged: 514 return paymentMethodUpdated(computeErrors( paymentMethodErrors));516 return paymentMethodUpdated(computeErrors(WTFMove(error), WTFMove(addressErrors), WTFMove(payerErrors), paymentMethodErrors)); 515 517 } 516 518 … … 575 577 ApplePayShippingMethodUpdate update; 576 578 579 #if ENABLE(APPLE_PAY_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_LINE_ITEMS) 580 auto newShippingMethods = computeShippingMethods(); 581 if (newShippingMethods.hasException()) 582 return newShippingMethods.releaseException(); 583 update.newShippingMethods = newShippingMethods.releaseReturnValue(); 584 #endif 585 577 586 auto newTotalAndLineItems = computeTotalAndLineItems(); 578 587 if (newTotalAndLineItems.hasException()) … … 618 627 return { }; 619 628 } 629 #endif // ENABLE(APPLE_PAY_COUPON_CODE) 630 631 ASSERT(m_updateState == UpdateState::PaymentMethod); 632 m_updateState = UpdateState::None; 633 634 ApplePayPaymentMethodUpdate update; 635 636 #if ENABLE(APPLE_PAY_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_LINE_ITEMS) 637 update.errors = WTFMove(errors); 638 639 auto newShippingMethods = computeShippingMethods(); 640 if (newShippingMethods.hasException()) 641 return newShippingMethods.releaseException(); 642 update.newShippingMethods = newShippingMethods.releaseReturnValue(); 620 643 #else 621 644 UNUSED_PARAM(errors); 622 #endif // ENABLE(APPLE_PAY_COUPON_CODE) 623 624 ASSERT(m_updateState == UpdateState::PaymentMethod); 625 m_updateState = UpdateState::None; 626 627 ApplePayPaymentMethodUpdate update; 645 #endif 628 646 629 647 auto newTotalAndLineItems = computeTotalAndLineItems(); -
trunk/Source/WebCore/PAL/ChangeLog
r280441 r280459 1 2021-07-29 Devin Rousso <drousso@apple.com> 2 3 [Payment Request] `additionalShippingMethods` are not used if a `paymentMethodType` is provided 4 https://bugs.webkit.org/show_bug.cgi?id=228599 5 <rdar://problem/81190366> 6 7 Reviewed by Andy Estes. 8 9 r275169 made it so that `paymentMethodType` is no longer `required` so that `additionalShippingMethods` 10 can be specified without having to limit it to a specific payment method type. While this 11 works in theory, WebKit doesn't know about the user's selected payment method type until the 12 user actually selects a payment method, meaning that until then the `additionalShippingMethods` 13 are not used. Unfortunately (until now) `PKPaymentRequestPaymentMethodUpdate` did not 14 support providing a `NSArray<PKShippingMethod *> *`, so there was no way to update the list 15 of shipping methods when the user changed their selected payment method, meaning that WebKit 16 would have to wait/rely on the user to change their shipping address _after_ selecting a 17 payment method in order for `additionalShippingMethods` to take effect. 18 19 This also fixes an issue with WebKit's implementation of the W3C Payment Request API by 20 allowing any generic (i.e. things not specific to Apple Pay) `shippingOptions` provided in 21 `PaymentDetailsUpdate` to actually be used and update the Apple Pay sheet accordingly. 22 23 * pal/spi/cocoa/PassKitSPI.h: 24 - add the new `shippingMethods` property on `PKPaymentRequestUpdate` 25 - add the existing `errors` property on `PKPaymentRequestPaymentMethodUpdate` 26 1 27 2021-07-29 Kate Cheney <katherine_cheney@apple.com> 2 28 -
trunk/Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h
r278834 r280459 450 450 - (instancetype)initWithPaymentSummaryItems:(NSArray<PKPaymentSummaryItem *> *)paymentSummaryItems; 451 451 @property (nonatomic, copy) NSArray<PKPaymentSummaryItem *> *paymentSummaryItems; 452 #if HAVE(PASSKIT_ COUPON_CODE)452 #if HAVE(PASSKIT_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_SUMMARY_ITEMS) 453 453 @property (nonatomic, copy) NSArray<PKShippingMethod *> *shippingMethods; 454 454 #endif 455 456 455 @end 457 456 458 457 @interface PKPaymentRequestPaymentMethodUpdate : PKPaymentRequestUpdate 458 - (instancetype)initWithErrors:(nullable NSArray<NSError *> *)errors paymentSummaryItems:(nonnull NSArray<PKPaymentSummaryItem *> *)summaryItems; 459 @property (null_resettable, nonatomic, copy) NSArray<NSError *> *errors; 459 460 @end 460 461 -
trunk/Source/WebCore/testing/MockPaymentCoordinator.cpp
r278630 r280459 148 148 m_total = WTFMove(shippingMethodUpdate->newTotal); 149 149 m_lineItems = WTFMove(shippingMethodUpdate->newLineItems); 150 #if ENABLE(APPLE_PAY_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_LINE_ITEMS) 151 m_shippingMethods = WTFMove(shippingMethodUpdate->newShippingMethods); 152 #endif 150 153 #if defined(MockPaymentCoordinatorAdditions_completeShippingMethodSelection) 151 154 MockPaymentCoordinatorAdditions_completeShippingMethodSelection … … 170 173 m_total = WTFMove(shippingContactUpdate->newTotal); 171 174 m_lineItems = WTFMove(shippingContactUpdate->newLineItems); 175 m_shippingMethods = WTFMove(shippingContactUpdate->newShippingMethods); 172 176 m_errors = convert(WTFMove(shippingContactUpdate->errors)); 173 m_shippingMethods = WTFMove(shippingContactUpdate->newShippingMethods);174 177 #if defined(MockPaymentCoordinatorAdditions_completeShippingContactSelection) 175 178 MockPaymentCoordinatorAdditions_completeShippingContactSelection … … 184 187 m_total = WTFMove(paymentMethodUpdate->newTotal); 185 188 m_lineItems = WTFMove(paymentMethodUpdate->newLineItems); 189 #if ENABLE(APPLE_PAY_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_LINE_ITEMS) 190 m_shippingMethods = WTFMove(paymentMethodUpdate->newShippingMethods); 191 m_errors = convert(WTFMove(paymentMethodUpdate->errors)); 192 #endif 186 193 #if defined(MockPaymentCoordinatorAdditions_completePaymentMethodSelection) 187 194 MockPaymentCoordinatorAdditions_completePaymentMethodSelection … … 198 205 m_total = WTFMove(couponCodeUpdate->newTotal); 199 206 m_lineItems = WTFMove(couponCodeUpdate->newLineItems); 207 m_shippingMethods = WTFMove(couponCodeUpdate->newShippingMethods); 200 208 m_errors = convert(WTFMove(couponCodeUpdate->errors)); 201 m_shippingMethods = WTFMove(couponCodeUpdate->newShippingMethods);202 209 #if defined(MockPaymentCoordinatorAdditions_completeCouponCodeChange) 203 210 MockPaymentCoordinatorAdditions_completeCouponCodeChange -
trunk/Source/WebKit/ChangeLog
r280451 r280459 1 2021-07-29 Devin Rousso <drousso@apple.com> 2 3 [Payment Request] `additionalShippingMethods` are not used if a `paymentMethodType` is provided 4 https://bugs.webkit.org/show_bug.cgi?id=228599 5 <rdar://problem/81190366> 6 7 Reviewed by Andy Estes. 8 9 r275169 made it so that `paymentMethodType` is no longer `required` so that `additionalShippingMethods` 10 can be specified without having to limit it to a specific payment method type. While this 11 works in theory, WebKit doesn't know about the user's selected payment method type until the 12 user actually selects a payment method, meaning that until then the `additionalShippingMethods` 13 are not used. Unfortunately (until now) `PKPaymentRequestPaymentMethodUpdate` did not 14 support providing a `NSArray<PKShippingMethod *> *`, so there was no way to update the list 15 of shipping methods when the user changed their selected payment method, meaning that WebKit 16 would have to wait/rely on the user to change their shipping address _after_ selecting a 17 payment method in order for `additionalShippingMethods` to take effect. 18 19 This also fixes an issue with WebKit's implementation of the W3C Payment Request API by 20 allowing any generic (i.e. things not specific to Apple Pay) `shippingOptions` provided in 21 `PaymentDetailsUpdate` to actually be used and update the Apple Pay sheet accordingly. 22 23 * Platform/cocoa/PaymentAuthorizationPresenter.mm: 24 (WebKit::PaymentAuthorizationPresenter::completePaymentMethodSelection): 25 (WebKit::PaymentAuthorizationPresenter::completeShippingMethodSelection): 26 Also convert and set the `shippingMethods` on the update. 27 1 28 2021-07-29 Kate Cheney <katherine_cheney@apple.com> 2 29 -
trunk/Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm
r280284 r280459 218 218 219 219 auto paymentMethodUpdate = adoptNS([PAL::allocPKPaymentRequestPaymentMethodUpdateInstance() initWithPaymentSummaryItems:WebCore::platformSummaryItems(WTFMove(update->newTotal), WTFMove(update->newLineItems))]); 220 #if HAVE(PASSKIT_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_SUMMARY_ITEMS) 221 [paymentMethodUpdate setErrors:toNSErrors(WTFMove(update->errors)).get()]; 222 [paymentMethodUpdate setShippingMethods:toPKShippingMethods(WTFMove(update->newShippingMethods)).get()]; 223 #endif 220 224 #if HAVE(PASSKIT_INSTALLMENTS) && ENABLE(APPLE_PAY_INSTALLMENTS) 221 225 [paymentMethodUpdate setInstallmentGroupIdentifier:WTFMove(update->installmentGroupIdentifier)]; … … 261 265 262 266 auto shippingMethodUpdate = adoptNS([PAL::allocPKPaymentRequestShippingMethodUpdateInstance() initWithPaymentSummaryItems:WebCore::platformSummaryItems(WTFMove(update->newTotal), WTFMove(update->newLineItems))]); 267 #if HAVE(PASSKIT_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_SUMMARY_ITEMS) 268 [shippingMethodUpdate setShippingMethods:toPKShippingMethods(WTFMove(update->newShippingMethods)).get()]; 269 #endif 263 270 #if defined(PaymentAuthorizationPresenterAdditions_completeShippingMethodSelection) 264 271 PaymentAuthorizationPresenterAdditions_completeShippingMethodSelection
Note: See TracChangeset
for help on using the changeset viewer.