Implement Navigations for all methods declared returning one
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 18 May 2014 19:33:58 +0000 (19:33 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 18 May 2014 19:33:58 +0000 (19:33 +0000)
commit22b10b4d0fdea53ee8c4a65b09762037c733ff18
tree5f441acc7245fd85db90e25fb3b202415dfdb779
parent337803639a809b8081117642b91914d7575aaa67
Implement Navigations for all methods declared returning one
https://bugs.webkit.org/show_bug.cgi?id=133048
<rdar://problem/16830064>

Reviewed by Sam Weinig.

Source/WebKit2:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView goToBackForwardListItem:]):
(-[WKWebView goBack]):
(-[WKWebView goForward]):
(-[WKWebView reload]):
(-[WKWebView reloadFromOrigin]):
Create and return navigations.

(-[WKWebView _reload]):
Call -[WKWebView reload].

* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::createBackForwardNavigation):
Create a back/forward navigation.

(WebKit::NavigationState::createReloadNavigation):
Create a reload navigation.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcessWithItem):
Generate a navigation ID and send it with the GoToBackForwardItem message.

(WebKit::WebPageProxy::reload):
Return a navigation ID.

(WebKit::WebPageProxy::goForward):
Generate a navigation ID and send it with the GoForward message.

(WebKit::WebPageProxy::goBack):
Generate a navigation ID and send it with the GoBack message.

(WebKit::WebPageProxy::goToBackForwardItem):
Generate a navigation ID and send it with the GoToBackForwardItem message.

* UIProcess/WebPageProxy.h:
Return navigation IDs where appropriate.

* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::restoreFromSessionStateData):
Generate a navigation ID and send it with the RestoreSessionAndNavigateToCurrentItem message.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::goForward):
(WebKit::WebPage::goBack):
(WebKit::WebPage::goToBackForwardItem):
Set up the pending navigation ID.

(WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
Call goToBackForwardItem with a navigation ID.

* WebProcess/WebPage/WebPage.h:
Add navigation IDs.

* WebProcess/WebPage/WebPage.messages.in:
Add navigation IDs.

Tools:
* MiniBrowser/mac/MiniBrowser_Prefix.pch:
Import WebKit.h.

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController webView:didStartProvisionalNavigation:]):
(-[WK2BrowserWindowController webView:didReceiveServerRedirectForProvisionalNavigation:]):
(-[WK2BrowserWindowController webView:didFailProvisionalNavigation:withError:]):
(-[WK2BrowserWindowController webView:didCommitNavigation:]):
(-[WK2BrowserWindowController webView:didFinishLoadingNavigation:]):
(-[WK2BrowserWindowController webView:didFailNavigation:withError:]):
Print out the navigations.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169016 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/Cocoa/NavigationState.h
Source/WebKit2/UIProcess/Cocoa/NavigationState.mm
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/cf/WebPageProxyCF.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
Tools/ChangeLog
Tools/MiniBrowser/mac/MiniBrowser_Prefix.pch
Tools/MiniBrowser/mac/WK2BrowserWindowController.m