[WK2][iOS] Swipe gesture snapshot stays up for 3 seconds when swiping back after...
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Jun 2015 19:56:03 +0000 (19:56 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Jun 2015 19:56:03 +0000 (19:56 +0000)
commit37d662233c2820ff40e44b91767547043df067d3
tree94aafd6963f86a8d4e6f657156785d1bda294bc0
parentfa78ae03baf162378db260f74c27e5d138b6c527
[WK2][iOS] Swipe gesture snapshot stays up for 3 seconds when swiping back after top-hit navigation
https://bugs.webkit.org/show_bug.cgi?id=146415
<rdar://problem/21595801>

Reviewed by Tim Horton.

Swipe gesture snapshot previously stayed up for 3 seconds when swiping
back after a top-hit navigation. This is because we do not restore the
scroll position in this case and the ViewGestureController was waiting
for the scroll position to be restored before taking down the snapshot.

This patch adds a fail-safe mechanism so that the WebProcess can let
the UIProcess know (via a CouldNotRestorePageState IPC) that the page
state (including scroll position) could not be restored so that it can
let the ViewGestureController it should not wait for the scroll
position to be restored.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _couldNotRestorePageState]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::couldNotRestorePageState):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::couldNotRestorePageState):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::restorePageState):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h
Source/WebKit2/UIProcess/PageClient.h
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/UIProcess/ios/PageClientImplIOS.h
Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm
Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm
Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm