Changeset 206176 in webkit
- Timestamp:
- Sep 20, 2016 2:43:26 PM (8 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r206166 r206176 1 2016-09-20 Anders Carlsson <andersca@apple.com> 2 3 Can't present a payment sheet if a sheet is already active in another window 4 https://bugs.webkit.org/show_bug.cgi?id=162314 5 rdar://problem/27643511 6 7 Reviewed by Tim Horton. 8 9 Instead of keeping track of whether a sheet is active or not, keep track of its underlying payment coordinator proxy, 10 so we can hide it and send a cancel event to WebCore if another sheet is being presented. 11 12 * UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp: 13 (WebKit::WebPaymentCoordinatorProxy::~WebPaymentCoordinatorProxy): 14 (WebKit::WebPaymentCoordinatorProxy::showPaymentUI): 15 (WebKit::WebPaymentCoordinatorProxy::didReachFinalState): 16 1 17 2016-09-20 Keith Rollin <krollin@apple.com> 2 18 -
trunk/Source/WebKit2/UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp
r203414 r206176 37 37 namespace WebKit { 38 38 39 static bool isShowingPaymentUI;39 static WebPaymentCoordinatorProxy* activePaymentCoordinatorProxy; 40 40 41 41 WebPaymentCoordinatorProxy::WebPaymentCoordinatorProxy(WebPageProxy& webPageProxy) … … 50 50 WebPaymentCoordinatorProxy::~WebPaymentCoordinatorProxy() 51 51 { 52 if (activePaymentCoordinatorProxy == this) 53 activePaymentCoordinatorProxy = nullptr; 54 52 55 if (m_state != State::Idle) 53 56 hidePaymentUI(); … … 78 81 ASSERT(canBegin()); 79 82 80 if (isShowingPaymentUI) { 81 result = false; 82 return; 83 } 84 isShowingPaymentUI = true; 83 if (activePaymentCoordinatorProxy) { 84 activePaymentCoordinatorProxy->hidePaymentUI(); 85 activePaymentCoordinatorProxy->didCancelPayment(); 86 } 87 88 activePaymentCoordinatorProxy = this; 85 89 86 90 m_state = State::Activating; … … 332 336 m_merchantValidationState = MerchantValidationState::Idle; 333 337 334 ASSERT( isShowingPaymentUI);335 isShowingPaymentUI = false;338 ASSERT(activePaymentCoordinatorProxy == this); 339 activePaymentCoordinatorProxy = nullptr; 336 340 } 337 341
Note: See TracChangeset
for help on using the changeset viewer.