Changeset 252057 in webkit
- Timestamp:
- Nov 5, 2019 9:13:00 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r252056 r252057 1 2019-11-05 Andy Estes <aestes@apple.com> 2 3 ApplePaySession should never prevent entering the back/forward cache 4 https://bugs.webkit.org/show_bug.cgi?id=203087 5 <rdar://problem/56744401> 6 7 Reviewed by Chris Dumez. 8 9 * http/tests/ssl/applepay/page-cache-active-apple-pay-session-expected.txt: Added. 10 * http/tests/ssl/applepay/page-cache-active-apple-pay-session.html: Added. 11 * http/tests/ssl/applepay/page-cache-inactive-apple-pay-session-expected.txt: Added. 12 * http/tests/ssl/applepay/page-cache-inactive-apple-pay-session.html: Added. 13 1 14 2019-11-05 youenn fablet <youenn@apple.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r252056 r252057 1 2019-11-05 Andy Estes <aestes@apple.com> 2 3 ApplePaySession should never prevent entering the back/forward cache 4 https://bugs.webkit.org/show_bug.cgi?id=203087 5 <rdar://problem/56744401> 6 7 Reviewed by Chris Dumez. 8 9 Rather than prevent entering the back/forward cache when there is an active session, abort 10 the session on suspension and queue a task to the event loop that dispatches the cancel event. 11 12 Tests: http/tests/ssl/applepay/page-cache-active-apple-pay-session.html 13 http/tests/ssl/applepay/page-cache-inactive-apple-pay-session.html 14 15 * Modules/applepay/ApplePaySession.cpp: 16 (WebCore::ApplePaySession::canSuspendWithoutCanceling const): 17 (WebCore::ApplePaySession::suspend): 18 (WebCore::ApplePaySession::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted. 19 * Modules/applepay/ApplePaySession.h: 20 1 21 2019-11-05 youenn fablet <youenn@apple.com> 2 22 -
trunk/Source/WebCore/Modules/applepay/ApplePaySession.cpp
r251425 r252057 824 824 } 825 825 826 bool ApplePaySession:: shouldPreventEnteringBackForwardCache_DEPRECATED() const826 bool ApplePaySession::canSuspendWithoutCanceling() const 827 827 { 828 828 switch (m_state) { … … 831 831 case State::Completed: 832 832 case State::Canceled: 833 return false;833 return true; 834 834 835 835 case State::Active: … … 839 839 case State::PaymentMethodSelected: 840 840 case State::CancelRequested: 841 // FIXME: This should never prevent entering the back/forward cache. 842 return true; 841 return false; 843 842 } 844 843 } … … 851 850 m_state = State::Aborted; 852 851 paymentCoordinator().abortPaymentSession(); 852 853 didReachFinalState(); 854 } 855 856 void ApplePaySession::suspend(ReasonForSuspension reason) 857 { 858 if (reason != ReasonForSuspension::BackForwardCache) 859 return; 860 861 if (canSuspendWithoutCanceling()) 862 return; 863 864 m_state = State::Canceled; 865 paymentCoordinator().abortPaymentSession(); 866 queueTaskToDispatchEvent(*this, TaskSource::UserInteraction, ApplePayCancelEvent::create(eventNames().cancelEvent, { })); 853 867 854 868 didReachFinalState(); -
trunk/Source/WebCore/Modules/applepay/ApplePaySession.h
r251425 r252057 103 103 // ActiveDOMObject. 104 104 const char* activeDOMObjectName() const override; 105 bool shouldPreventEnteringBackForwardCache_DEPRECATED() const override;106 105 void stop() override; 106 void suspend(ReasonForSuspension) override; 107 107 108 108 // EventTargetWithInlineData. … … 131 131 bool canCompletePaymentMethodSelection() const; 132 132 bool canCompletePayment() const; 133 bool canSuspendWithoutCanceling() const; 133 134 134 135 bool isFinalState() const;
Note: See TracChangeset
for help on using the changeset viewer.