<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[178217] trunk/Source/WebKit2</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/178217">178217</a></dd>
<dt>Author</dt> <dd>weinig@apple.com</dd>
<dt>Date</dt> <dd>2015-01-09 16:00:08 -0800 (Fri, 09 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Move Navigation creation out of the Cocoa layer and down into the WebPageProxy level
https://bugs.webkit.org/show_bug.cgi?id=140319

Reviewed by Anders Carlsson.

- Adds WebNavigationState, a class at the WebPageProxy level to handle the creation
  and storage of Navigations. Starts moving some of the functionality from NavigationState
  there.

* UIProcess/API/APINavigation.cpp:
(API::Navigation::Navigation):
* UIProcess/API/APINavigation.h:
(API::Navigation::create):
(API::Navigation::navigationID):
Have each Navigation store its navigationID and generate it via the WebNavigationState
that is passed to the constructor.
        
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadRequest:]):
(-[WKWebView loadFileURL:allowingReadAccessToURL:]):
(-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
(-[WKWebView goToBackForwardListItem:]):
(-[WKWebView goBack]):
(-[WKWebView goForward]):
(-[WKWebView reload]):
(-[WKWebView reloadFromOrigin]):
(-[WKWebView _restoreFromSessionStateData:]):
(-[WKWebView _restoreSessionState:andNavigate:]):
Update for WebPageProxy functions returning the Navigations directly, rather than
the navigationID.

* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
Remove creation of the load request navigation which is now handled by the WebPageProxy.

(WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame):
(WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
(WebKit::NavigationState::LoaderClient::didCommitLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
(WebKit::NavigationState::LoaderClient::didSameDocumentNavigationForFrame):
(WebKit::NavigationState::LoaderClient::didDestroyNavigation):
(WebKit::NavigationState::LoaderClient::processDidCrash):
Change to get/take/remove Navigations from the WebPageProxy's WebNavigationState

(WebKit::NavigationState::createLoadRequestNavigation): Deleted.
(WebKit::NavigationState::createBackForwardNavigation): Deleted.
(WebKit::NavigationState::createReloadNavigation): Deleted.
(WebKit::NavigationState::createLoadDataNavigation): Deleted.
Move Navigation creation to WebNavigationState.

* UIProcess/WebFrameListenerProxy.cpp:
(WebKit::WebFrameListenerProxy::WebFrameListenerProxy):
(WebKit::WebFrameListenerProxy::receivedPolicyDecision):
* UIProcess/WebFrameListenerProxy.h:
(WebKit::WebFrameListenerProxy::navigation):
(WebKit::WebFrameListenerProxy::setNavigation):
(WebKit::WebFrameListenerProxy::navigationID): Deleted.
(WebKit::WebFrameListenerProxy::setNavigationID): Deleted.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::receivedPolicyDecision):
* UIProcess/WebFrameProxy.h:
Store a Navigation rather than a navigationID on the WebFrameListenerProxy.

* UIProcess/WebNavigationState.cpp: Added.
(WebKit::WebNavigationState::WebNavigationState):
(WebKit::WebNavigationState::~WebNavigationState):
(WebKit::WebNavigationState::createLoadRequestNavigation):
(WebKit::WebNavigationState::createBackForwardNavigation):
(WebKit::WebNavigationState::createReloadNavigation):
(WebKit::WebNavigationState::createLoadDataNavigation):
(WebKit::WebNavigationState::navigation):
(WebKit::WebNavigationState::takeNavigation):
(WebKit::WebNavigationState::didDestroyNavigation):
(WebKit::WebNavigationState::clearAllNavigations):
* UIProcess/WebNavigationState.h: Added.
(WebKit::WebNavigationState::generateNavigationID):
New class to manage navigations.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcessForReload):
(WebKit::WebPageProxy::reattachToWebProcessWithItem):
(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadHTMLString):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::goForward):
(WebKit::WebPageProxy::goBack):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::restoreFromSessionState):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::generateNavigationID): Deleted.
Create navigations directly rather than generating a navigation ID and letting
the API level create Navigation.

* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::navigationState):
Add WebNavigationState member and accessor.

* WebKit2.xcodeproj/project.pbxproj:
Add WebNavigationState.h/cpp</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2CMakeListstxt">trunk/Source/WebKit2/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPINavigationcpp">trunk/Source/WebKit2/UIProcess/API/APINavigation.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPINavigationh">trunk/Source/WebKit2/UIProcess/API/APINavigation.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaNavigationStateh">trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaNavigationStatemm">trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebFrameListenerProxycpp">trunk/Source/WebKit2/UIProcess/WebFrameListenerProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebFrameListenerProxyh">trunk/Source/WebKit2/UIProcess/WebFrameListenerProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebFrameProxycpp">trunk/Source/WebKit2/UIProcess/WebFrameProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebFrameProxyh">trunk/Source/WebKit2/UIProcess/WebFrameProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessWebNavigationStatecpp">trunk/Source/WebKit2/UIProcess/WebNavigationState.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebNavigationStateh">trunk/Source/WebKit2/UIProcess/WebNavigationState.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2CMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/CMakeLists.txt (178216 => 178217)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/CMakeLists.txt        2015-01-09 23:57:13 UTC (rev 178216)
+++ trunk/Source/WebKit2/CMakeLists.txt        2015-01-10 00:00:08 UTC (rev 178217)
</span><span class="lines">@@ -343,6 +343,7 @@
</span><span class="cx">     UIProcess/WebIconDatabaseClient.cpp
</span><span class="cx">     UIProcess/WebInspectorProxy.cpp
</span><span class="cx">     UIProcess/WebKeyValueStorageManager.cpp
</span><ins>+    UIProcess/WebNavigationState.cpp
</ins><span class="cx">     UIProcess/WebMediaCacheManagerProxy.cpp
</span><span class="cx">     UIProcess/WebOpenPanelResultListenerProxy.cpp
</span><span class="cx">     UIProcess/WebOriginDataManagerProxy.cpp
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (178216 => 178217)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-01-09 23:57:13 UTC (rev 178216)
+++ trunk/Source/WebKit2/ChangeLog        2015-01-10 00:00:08 UTC (rev 178217)
</span><span class="lines">@@ -1,3 +1,113 @@
</span><ins>+2015-01-09  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        Move Navigation creation out of the Cocoa layer and down into the WebPageProxy level
+        https://bugs.webkit.org/show_bug.cgi?id=140319
+
+        Reviewed by Anders Carlsson.
+
+        - Adds WebNavigationState, a class at the WebPageProxy level to handle the creation
+          and storage of Navigations. Starts moving some of the functionality from NavigationState
+          there.
+
+        * UIProcess/API/APINavigation.cpp:
+        (API::Navigation::Navigation):
+        * UIProcess/API/APINavigation.h:
+        (API::Navigation::create):
+        (API::Navigation::navigationID):
+        Have each Navigation store its navigationID and generate it via the WebNavigationState
+        that is passed to the constructor.
+        
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView loadRequest:]):
+        (-[WKWebView loadFileURL:allowingReadAccessToURL:]):
+        (-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
+        (-[WKWebView goToBackForwardListItem:]):
+        (-[WKWebView goBack]):
+        (-[WKWebView goForward]):
+        (-[WKWebView reload]):
+        (-[WKWebView reloadFromOrigin]):
+        (-[WKWebView _restoreFromSessionStateData:]):
+        (-[WKWebView _restoreSessionState:andNavigate:]):
+        Update for WebPageProxy functions returning the Navigations directly, rather than
+        the navigationID.
+
+        * UIProcess/Cocoa/NavigationState.h:
+        * UIProcess/Cocoa/NavigationState.mm:
+        (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
+        Remove creation of the load request navigation which is now handled by the WebPageProxy.
+
+        (WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame):
+        (WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
+        (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
+        (WebKit::NavigationState::LoaderClient::didCommitLoadForFrame):
+        (WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame):
+        (WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
+        (WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
+        (WebKit::NavigationState::LoaderClient::didSameDocumentNavigationForFrame):
+        (WebKit::NavigationState::LoaderClient::didDestroyNavigation):
+        (WebKit::NavigationState::LoaderClient::processDidCrash):
+        Change to get/take/remove Navigations from the WebPageProxy's WebNavigationState
+
+        (WebKit::NavigationState::createLoadRequestNavigation): Deleted.
+        (WebKit::NavigationState::createBackForwardNavigation): Deleted.
+        (WebKit::NavigationState::createReloadNavigation): Deleted.
+        (WebKit::NavigationState::createLoadDataNavigation): Deleted.
+        Move Navigation creation to WebNavigationState.
+
+        * UIProcess/WebFrameListenerProxy.cpp:
+        (WebKit::WebFrameListenerProxy::WebFrameListenerProxy):
+        (WebKit::WebFrameListenerProxy::receivedPolicyDecision):
+        * UIProcess/WebFrameListenerProxy.h:
+        (WebKit::WebFrameListenerProxy::navigation):
+        (WebKit::WebFrameListenerProxy::setNavigation):
+        (WebKit::WebFrameListenerProxy::navigationID): Deleted.
+        (WebKit::WebFrameListenerProxy::setNavigationID): Deleted.
+        * UIProcess/WebFrameProxy.cpp:
+        (WebKit::WebFrameProxy::receivedPolicyDecision):
+        * UIProcess/WebFrameProxy.h:
+        Store a Navigation rather than a navigationID on the WebFrameListenerProxy.
+
+        * UIProcess/WebNavigationState.cpp: Added.
+        (WebKit::WebNavigationState::WebNavigationState):
+        (WebKit::WebNavigationState::~WebNavigationState):
+        (WebKit::WebNavigationState::createLoadRequestNavigation):
+        (WebKit::WebNavigationState::createBackForwardNavigation):
+        (WebKit::WebNavigationState::createReloadNavigation):
+        (WebKit::WebNavigationState::createLoadDataNavigation):
+        (WebKit::WebNavigationState::navigation):
+        (WebKit::WebNavigationState::takeNavigation):
+        (WebKit::WebNavigationState::didDestroyNavigation):
+        (WebKit::WebNavigationState::clearAllNavigations):
+        * UIProcess/WebNavigationState.h: Added.
+        (WebKit::WebNavigationState::generateNavigationID):
+        New class to manage navigations.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::WebPageProxy):
+        (WebKit::WebPageProxy::reattachToWebProcessForReload):
+        (WebKit::WebPageProxy::reattachToWebProcessWithItem):
+        (WebKit::WebPageProxy::loadRequest):
+        (WebKit::WebPageProxy::loadFile):
+        (WebKit::WebPageProxy::loadData):
+        (WebKit::WebPageProxy::loadHTMLString):
+        (WebKit::WebPageProxy::reload):
+        (WebKit::WebPageProxy::goForward):
+        (WebKit::WebPageProxy::goBack):
+        (WebKit::WebPageProxy::goToBackForwardItem):
+        (WebKit::WebPageProxy::receivedPolicyDecision):
+        (WebKit::WebPageProxy::restoreFromSessionState):
+        (WebKit::WebPageProxy::decidePolicyForNavigationAction):
+        (WebKit::WebPageProxy::generateNavigationID): Deleted.
+        Create navigations directly rather than generating a navigation ID and letting
+        the API level create Navigation.
+
+        * UIProcess/WebPageProxy.h:
+        (WebKit::WebPageProxy::navigationState):
+        Add WebNavigationState member and accessor.
+
+        * WebKit2.xcodeproj/project.pbxproj:
+        Add WebNavigationState.h/cpp
+
</ins><span class="cx"> 2015-01-09  Daniel Bates  &lt;dabates@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS] Make DumpRenderTree build with public SDK
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPINavigationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APINavigation.cpp (178216 => 178217)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APINavigation.cpp        2015-01-09 23:57:13 UTC (rev 178216)
+++ trunk/Source/WebKit2/UIProcess/API/APINavigation.cpp        2015-01-10 00:00:08 UTC (rev 178217)
</span><span class="lines">@@ -26,14 +26,18 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;APINavigation.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;WebNavigationState.h&quot;
+
</ins><span class="cx"> namespace API {
</span><span class="cx"> 
</span><del>-Navigation::Navigation()
</del><ins>+Navigation::Navigation(WebKit::WebNavigationState&amp; state)
+    : m_navigationID(state.generateNavigationID())
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Navigation::Navigation(const WebCore::ResourceRequest&amp; request)
-    : m_request(request)
</del><ins>+Navigation::Navigation(WebKit::WebNavigationState&amp; state, const WebCore::ResourceRequest&amp; request)
+    : m_navigationID(state.generateNavigationID())
+    , m_request(request)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPINavigationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APINavigation.h (178216 => 178217)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APINavigation.h        2015-01-09 23:57:13 UTC (rev 178216)
+++ trunk/Source/WebKit2/UIProcess/API/APINavigation.h        2015-01-10 00:00:08 UTC (rev 178217)
</span><span class="lines">@@ -30,28 +30,35 @@
</span><span class="cx"> #include &lt;WebCore/ResourceRequest.h&gt;
</span><span class="cx"> #include &lt;wtf/Ref.h&gt;
</span><span class="cx"> 
</span><ins>+namespace WebKit {
+class WebNavigationState;
+}
+
</ins><span class="cx"> namespace API {
</span><span class="cx"> 
</span><span class="cx"> class Navigation : public ObjectImpl&lt;Object::Type::Navigation&gt; {
</span><span class="cx"> public:
</span><del>-    static Ref&lt;Navigation&gt; create()
</del><ins>+    static Ref&lt;Navigation&gt; create(WebKit::WebNavigationState&amp; state)
</ins><span class="cx">     {
</span><del>-        return adoptRef(*new Navigation);
</del><ins>+        return adoptRef(*new Navigation(state));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static Ref&lt;Navigation&gt; create(const WebCore::ResourceRequest&amp; request)
</del><ins>+    static Ref&lt;Navigation&gt; create(WebKit::WebNavigationState&amp; state, const WebCore::ResourceRequest&amp; request)
</ins><span class="cx">     {
</span><del>-        return adoptRef(*new Navigation(request));
</del><ins>+        return adoptRef(*new Navigation(state, request));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     virtual ~Navigation();
</span><span class="cx"> 
</span><ins>+    uint64_t navigationID() const { return m_navigationID; }
+
</ins><span class="cx">     const WebCore::ResourceRequest&amp; request() const { return m_request; }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    explicit Navigation();
-    explicit Navigation(const WebCore::ResourceRequest&amp;);
</del><ins>+    explicit Navigation(WebKit::WebNavigationState&amp;);
+    explicit Navigation(WebKit::WebNavigationState&amp;, const WebCore::ResourceRequest&amp;);
</ins><span class="cx"> 
</span><ins>+    uint64_t m_navigationID;
</ins><span class="cx">     WebCore::ResourceRequest m_request;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (178216 => 178217)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2015-01-09 23:57:13 UTC (rev 178216)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2015-01-10 00:00:08 UTC (rev 178217)
</span><span class="lines">@@ -425,10 +425,11 @@
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)loadRequest:(NSURLRequest *)request
</span><span class="cx"> {
</span><del>-    uint64_t navigationID = _page-&gt;loadRequest(request);
-    auto navigation = _navigationState-&gt;createLoadRequestNavigation(navigationID, request);
</del><ins>+    auto navigation = _page-&gt;loadRequest(request);
+    if (!navigation)
+        return nil;
</ins><span class="cx"> 
</span><del>-    return [wrapper(navigation.leakRef()) autorelease];
</del><ins>+    return [wrapper(*navigation.release().leakRef()) autorelease];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)loadFileURL:(NSURL *)URL allowingReadAccessToURL:(NSURL *)readAccessURL
</span><span class="lines">@@ -439,13 +440,11 @@
</span><span class="cx">     if (![readAccessURL isFileURL])
</span><span class="cx">         [NSException raise:NSInvalidArgumentException format:@&quot;%@ is not a file URL&quot;, readAccessURL];
</span><span class="cx"> 
</span><del>-    uint64_t navigationID = _page-&gt;loadFile([URL _web_originalDataAsWTFString], [readAccessURL _web_originalDataAsWTFString]);
-    if (!navigationID)
</del><ins>+    auto navigation = _page-&gt;loadFile([URL _web_originalDataAsWTFString], [readAccessURL _web_originalDataAsWTFString]);
+    if (!navigation)
</ins><span class="cx">         return nil;
</span><span class="cx"> 
</span><del>-    auto navigation = _navigationState-&gt;createLoadRequestNavigation(navigationID, [NSURLRequest requestWithURL:URL]);
-
-    return [wrapper(navigation.leakRef()) autorelease];
</del><ins>+    return [wrapper(*navigation.release().leakRef()) autorelease];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL
</span><span class="lines">@@ -457,22 +456,20 @@
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)loadData:(NSData *)data MIMEType:(NSString *)MIMEType characterEncodingName:(NSString *)characterEncodingName baseURL:(NSURL *)baseURL
</span><span class="cx"> {
</span><del>-    uint64_t navigationID = _page-&gt;loadData(API::Data::createWithoutCopying(data).get(), MIMEType, characterEncodingName, baseURL.absoluteString);
-    if (!navigationID)
</del><ins>+    auto navigation = _page-&gt;loadData(API::Data::createWithoutCopying(data).get(), MIMEType, characterEncodingName, baseURL.absoluteString);
+    if (!navigation)
</ins><span class="cx">         return nil;
</span><span class="cx"> 
</span><del>-    auto navigation = _navigationState-&gt;createLoadDataNavigation(navigationID);
-
-    return [wrapper(navigation.leakRef()) autorelease];
</del><ins>+    return [wrapper(*navigation.release().leakRef()) autorelease];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)goToBackForwardListItem:(WKBackForwardListItem *)item
</span><span class="cx"> {
</span><del>-    uint64_t navigationID = _page-&gt;goToBackForwardItem(&amp;item._item);
</del><ins>+    auto navigation = _page-&gt;goToBackForwardItem(&amp;item._item);
+    if (!navigation)
+        return nil;
</ins><span class="cx"> 
</span><del>-    auto navigation = _navigationState-&gt;createBackForwardNavigation(navigationID, item._item);
-
-    return [wrapper(navigation.leakRef()) autorelease];
</del><ins>+    return [wrapper(*navigation.release().leakRef()) autorelease];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (NSString *)title
</span><span class="lines">@@ -512,46 +509,38 @@
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)goBack
</span><span class="cx"> {
</span><del>-    uint64_t navigationID = _page-&gt;goBack();
-    if (!navigationID)
</del><ins>+    auto navigation = _page-&gt;goBack();
+    if (!navigation)
</ins><span class="cx">         return nil;
</span><del>-
-    ASSERT(_page-&gt;backForwardList().currentItem());
-    auto navigation = _navigationState-&gt;createBackForwardNavigation(navigationID, *_page-&gt;backForwardList().currentItem());
</del><span class="cx">  
</span><del>-    return [wrapper(navigation.leakRef()) autorelease];
</del><ins>+    return [wrapper(*navigation.release().leakRef()) autorelease];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)goForward
</span><span class="cx"> {
</span><del>-    uint64_t navigationID = _page-&gt;goForward();
-    if (!navigationID)
</del><ins>+    auto navigation = _page-&gt;goForward();
+    if (!navigation)
</ins><span class="cx">         return nil;
</span><span class="cx"> 
</span><del>-    ASSERT(_page-&gt;backForwardList().currentItem());
-    auto navigation = _navigationState-&gt;createBackForwardNavigation(navigationID, *_page-&gt;backForwardList().currentItem());
-
-    return [wrapper(navigation.leakRef()) autorelease];
</del><ins>+    return [wrapper(*navigation.release().leakRef()) autorelease];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)reload
</span><span class="cx"> {
</span><del>-    uint64_t navigationID = _page-&gt;reload(false);
-    if (!navigationID)
</del><ins>+    auto navigation = _page-&gt;reload(false);
+    if (!navigation)
</ins><span class="cx">         return nil;
</span><span class="cx"> 
</span><del>-    auto navigation = _navigationState-&gt;createReloadNavigation(navigationID);
-    return [wrapper(navigation.leakRef()) autorelease];
</del><ins>+    return [wrapper(*navigation.release().leakRef()) autorelease];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)reloadFromOrigin
</span><span class="cx"> {
</span><del>-    uint64_t navigationID = _page-&gt;reload(true);
-    if (!navigationID)
</del><ins>+    auto navigation = _page-&gt;reload(true);
+    if (!navigation)
</ins><span class="cx">         return nil;
</span><span class="cx"> 
</span><del>-    auto navigation = _navigationState-&gt;createReloadNavigation(navigationID);
-    return [wrapper(navigation.leakRef()) autorelease];
</del><ins>+    return [wrapper(*navigation.release().leakRef()) autorelease];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)stopLoading
</span><span class="lines">@@ -1763,22 +1752,16 @@
</span><span class="cx">     if (!WebKit::decodeLegacySessionState(static_cast&lt;const uint8_t*&gt;(sessionStateData.bytes), sessionStateData.length, sessionState))
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (uint64_t navigationID = _page-&gt;restoreFromSessionState(WTF::move(sessionState), true)) {
-        // FIXME: This is not necessarily always a reload navigation.
-        _navigationState-&gt;createReloadNavigation(navigationID);
-    }
</del><ins>+    _page-&gt;restoreFromSessionState(WTF::move(sessionState), true);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)_restoreSessionState:(_WKSessionState *)sessionState andNavigate:(BOOL)navigate
</span><span class="cx"> {
</span><del>-    if (uint64_t navigationID = _page-&gt;restoreFromSessionState(sessionState-&gt;_sessionState, navigate)) {
-        // FIXME: This is not necessarily always a reload navigation.
-        auto navigation = _navigationState-&gt;createReloadNavigation(navigationID);
</del><ins>+    auto navigation = _page-&gt;restoreFromSessionState(sessionState-&gt;_sessionState, navigate);
+    if (!navigation)
+        return nil;
</ins><span class="cx"> 
</span><del>-        return [wrapper(navigation.leakRef()) autorelease];
-    }
-
-    return nil;
</del><ins>+    return [wrapper(*navigation.release().leakRef()) autorelease];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_close
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaNavigationStateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h (178216 => 178217)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h        2015-01-09 23:57:13 UTC (rev 178216)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h        2015-01-10 00:00:08 UTC (rev 178217)
</span><span class="lines">@@ -66,11 +66,6 @@
</span><span class="cx">     RetainPtr&lt;id &lt;WKHistoryDelegatePrivate&gt; &gt; historyDelegate();
</span><span class="cx">     void setHistoryDelegate(id &lt;WKHistoryDelegatePrivate&gt;);
</span><span class="cx"> 
</span><del>-    Ref&lt;API::Navigation&gt; createBackForwardNavigation(uint64_t navigationID, const WebBackForwardListItem&amp;);
-    Ref&lt;API::Navigation&gt; createLoadRequestNavigation(uint64_t navigationID, NSURLRequest *);
-    Ref&lt;API::Navigation&gt; createReloadNavigation(uint64_t navigationID);
-    Ref&lt;API::Navigation&gt; createLoadDataNavigation(uint64_t navigationID);
-
</del><span class="cx">     // Called by the page client.
</span><span class="cx">     void navigationGestureDidBegin();
</span><span class="cx">     void navigationGestureWillEnd(bool willNavigate, WebBackForwardListItem&amp;);
</span><span class="lines">@@ -177,8 +172,6 @@
</span><span class="cx"> #endif
</span><span class="cx">     } m_navigationDelegateMethods;
</span><span class="cx"> 
</span><del>-    HashMap&lt;uint64_t, RefPtr&lt;API::Navigation&gt;&gt; m_navigations;
-
</del><span class="cx">     WeakObjCPtr&lt;id &lt;WKHistoryDelegatePrivate&gt; &gt; m_historyDelegate;
</span><span class="cx">     struct {
</span><span class="cx">         bool webViewDidNavigateWithNavigationData : 1;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaNavigationStatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm (178216 => 178217)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm        2015-01-09 23:57:13 UTC (rev 178216)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm        2015-01-10 00:00:08 UTC (rev 178217)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx"> #import &quot;WKWebViewInternal.h&quot;
</span><span class="cx"> #import &quot;WebCredential.h&quot;
</span><span class="cx"> #import &quot;WebFrameProxy.h&quot;
</span><ins>+#import &quot;WebNavigationState.h&quot;
</ins><span class="cx"> #import &quot;WebPageProxy.h&quot;
</span><span class="cx"> #import &quot;WebProcessProxy.h&quot;
</span><span class="cx"> #import &quot;WebProtectionSpace.h&quot;
</span><span class="lines">@@ -164,50 +165,6 @@
</span><span class="cx">     m_historyDelegateMethods.webViewDidUpdateHistoryTitleForURL = [historyDelegate respondsToSelector:@selector(_webView:didUpdateHistoryTitle:forURL:)];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;API::Navigation&gt; NavigationState::createLoadRequestNavigation(uint64_t navigationID, NSURLRequest *request)
-{
-    ASSERT(!m_navigations.contains(navigationID));
-
-    auto navigation = API::Navigation::create(WebCore::ResourceRequest(request));
-
-    m_navigations.set(navigationID, navigation.ptr());
-
-    return navigation;
-}
-
-Ref&lt;API::Navigation&gt; NavigationState::createBackForwardNavigation(uint64_t navigationID, const WebBackForwardListItem&amp; item)
-{
-    ASSERT(!m_navigations.contains(navigationID));
-
-    auto navigation = API::Navigation::create();
-
-    m_navigations.set(navigationID, navigation.ptr());
-
-    return navigation;
-}
-
-Ref&lt;API::Navigation&gt; NavigationState::createReloadNavigation(uint64_t navigationID)
-{
-    ASSERT(!m_navigations.contains(navigationID));
-
-    auto navigation = API::Navigation::create();
-
-    m_navigations.set(navigationID, navigation.ptr());
-
-    return navigation;
-}
-
-Ref&lt;API::Navigation&gt; NavigationState::createLoadDataNavigation(uint64_t navigationID)
-{
-    ASSERT(!m_navigations.contains(navigationID));
-
-    auto navigation = API::Navigation::create();
-
-    m_navigations.set(navigationID, navigation.ptr());
-
-    return navigation;
-}
-
</del><span class="cx"> void NavigationState::navigationGestureDidBegin()
</span><span class="cx"> {
</span><span class="cx">     if (!m_navigationDelegateMethods.webViewDidBeginNavigationGesture)
</span><span class="lines">@@ -269,9 +226,6 @@
</span><span class="cx"> {
</span><span class="cx">     RetainPtr&lt;NSURLRequest&gt; nsURLRequest = adoptNS(wrapper(*API::URLRequest::create(request).leakRef()));
</span><span class="cx"> 
</span><del>-    if (listener-&gt;navigationID())
-        m_navigationState.createLoadRequestNavigation(listener-&gt;navigationID(), nsURLRequest.get());
-
</del><span class="cx">     if (!m_navigationState.m_navigationDelegateMethods.webViewDecidePolicyForNavigationActionDecisionHandler) {
</span><span class="cx">         if (!destinationFrame) {
</span><span class="cx">             listener-&gt;use();
</span><span class="lines">@@ -407,7 +361,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NavigationState::LoaderClient::didStartProvisionalLoadForFrame(WebPageProxy*, WebFrameProxy* webFrameProxy, uint64_t navigationID, API::Object*)
</del><ins>+void NavigationState::LoaderClient::didStartProvisionalLoadForFrame(WebPageProxy* page, WebFrameProxy* webFrameProxy, uint64_t navigationID, API::Object*)
</ins><span class="cx"> {
</span><span class="cx">     if (!webFrameProxy-&gt;isMainFrame())
</span><span class="cx">         return;
</span><span class="lines">@@ -422,12 +376,12 @@
</span><span class="cx">     // FIXME: We should assert that navigationID is not zero here, but it's currently zero for some navigations through the page cache.
</span><span class="cx">     WKNavigation *navigation = nil;
</span><span class="cx">     if (navigationID)
</span><del>-        navigation = wrapper(*m_navigationState.m_navigations.get(navigationID));
</del><ins>+        navigation = wrapper(page-&gt;navigationState().navigation(navigationID));
</ins><span class="cx"> 
</span><span class="cx">     [navigationDelegate webView:m_navigationState.m_webView didStartProvisionalNavigation:navigation];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy* webFrameProxy, uint64_t navigationID, API::Object*)
</del><ins>+void NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame(WebKit::WebPageProxy* page, WebKit::WebFrameProxy* webFrameProxy, uint64_t navigationID, API::Object*)
</ins><span class="cx"> {
</span><span class="cx">     if (!webFrameProxy-&gt;isMainFrame())
</span><span class="cx">         return;
</span><span class="lines">@@ -442,7 +396,7 @@
</span><span class="cx">     // FIXME: We should assert that navigationID is not zero here, but it's currently zero for some navigations through the page cache.
</span><span class="cx">     WKNavigation *navigation = nil;
</span><span class="cx">     if (navigationID)
</span><del>-        navigation = wrapper(*m_navigationState.m_navigations.get(navigationID));
</del><ins>+        navigation = wrapper(page-&gt;navigationState().navigation(navigationID));
</ins><span class="cx"> 
</span><span class="cx">     [navigationDelegate webView:m_navigationState.m_webView didReceiveServerRedirectForProvisionalNavigation:navigation];
</span><span class="cx"> }
</span><span class="lines">@@ -461,7 +415,7 @@
</span><span class="cx">     return adoptNS([[NSError alloc] initWithDomain:originalError.domain code:originalError.code userInfo:userInfo.get()]);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame(WebPageProxy*, WebFrameProxy* webFrameProxy, uint64_t navigationID, const WebCore::ResourceError&amp; error, API::Object*)
</del><ins>+void NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame(WebPageProxy* page, WebFrameProxy* webFrameProxy, uint64_t navigationID, const WebCore::ResourceError&amp; error, API::Object*)
</ins><span class="cx"> {
</span><span class="cx">     if (!webFrameProxy-&gt;isMainFrame()) {
</span><span class="cx">         if (!m_navigationState.m_navigationDelegateMethods.webViewNavigationDidFailProvisionalLoadInSubframeWithError)
</span><span class="lines">@@ -478,8 +432,8 @@
</span><span class="cx">     // FIXME: We should assert that navigationID is not zero here, but it's currently zero for some navigations through the page cache.
</span><span class="cx">     RetainPtr&lt;WKNavigation&gt; navigation;
</span><span class="cx">     if (navigationID)
</span><del>-        navigation = wrapper(*m_navigationState.m_navigations.take(navigationID));
-
</del><ins>+        navigation = wrapper(page-&gt;navigationState().takeNavigation(navigationID).get());
+    
</ins><span class="cx">     // FIXME: Set the error on the navigation object.
</span><span class="cx"> 
</span><span class="cx">     if (!m_navigationState.m_navigationDelegateMethods.webViewDidFailProvisionalNavigationWithError)
</span><span class="lines">@@ -493,7 +447,7 @@
</span><span class="cx">     [navigationDelegate webView:m_navigationState.m_webView didFailProvisionalNavigation:navigation.get() withError:errorWithRecoveryAttempter.get()];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NavigationState::LoaderClient::didCommitLoadForFrame(WebPageProxy*, WebFrameProxy* webFrameProxy, uint64_t navigationID, API::Object*)
</del><ins>+void NavigationState::LoaderClient::didCommitLoadForFrame(WebPageProxy* page, WebFrameProxy* webFrameProxy, uint64_t navigationID, API::Object*)
</ins><span class="cx"> {
</span><span class="cx">     if (!webFrameProxy-&gt;isMainFrame())
</span><span class="cx">         return;
</span><span class="lines">@@ -508,12 +462,12 @@
</span><span class="cx">     // FIXME: We should assert that navigationID is not zero here, but it's currently zero for some navigations through the page cache.
</span><span class="cx">     WKNavigation *navigation = nil;
</span><span class="cx">     if (navigationID)
</span><del>-        navigation = wrapper(*m_navigationState.m_navigations.get(navigationID));
</del><ins>+        navigation = wrapper(page-&gt;navigationState().navigation(navigationID));
</ins><span class="cx"> 
</span><span class="cx">     [navigationDelegate webView:m_navigationState.m_webView didCommitNavigation:navigation];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NavigationState::LoaderClient::didFinishDocumentLoadForFrame(WebPageProxy*, WebFrameProxy* webFrameProxy, uint64_t navigationID, API::Object*)
</del><ins>+void NavigationState::LoaderClient::didFinishDocumentLoadForFrame(WebPageProxy* page, WebFrameProxy* webFrameProxy, uint64_t navigationID, API::Object*)
</ins><span class="cx"> {
</span><span class="cx">     if (!webFrameProxy-&gt;isMainFrame())
</span><span class="cx">         return;
</span><span class="lines">@@ -528,12 +482,12 @@
</span><span class="cx">     // FIXME: We should assert that navigationID is not zero here, but it's currently zero for some navigations through the page cache.
</span><span class="cx">     WKNavigation *navigation = nil;
</span><span class="cx">     if (navigationID)
</span><del>-        navigation = wrapper(*m_navigationState.m_navigations.get(navigationID));
</del><ins>+        navigation = wrapper(page-&gt;navigationState().navigation(navigationID));
</ins><span class="cx"> 
</span><span class="cx">     [static_cast&lt;id &lt;WKNavigationDelegatePrivate&gt;&gt;(navigationDelegate.get()) _webView:m_navigationState.m_webView navigationDidFinishDocumentLoad:navigation];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NavigationState::LoaderClient::didFinishLoadForFrame(WebPageProxy*, WebFrameProxy* webFrameProxy, uint64_t navigationID, API::Object*)
</del><ins>+void NavigationState::LoaderClient::didFinishLoadForFrame(WebPageProxy* page, WebFrameProxy* webFrameProxy, uint64_t navigationID, API::Object*)
</ins><span class="cx"> {
</span><span class="cx">     if (!webFrameProxy-&gt;isMainFrame())
</span><span class="cx">         return;
</span><span class="lines">@@ -548,12 +502,12 @@
</span><span class="cx">     // FIXME: We should assert that navigationID is not zero here, but it's currently zero for some navigations through the page cache.
</span><span class="cx">     WKNavigation *navigation = nil;
</span><span class="cx">     if (navigationID)
</span><del>-        navigation = wrapper(*m_navigationState.m_navigations.get(navigationID));
</del><ins>+        navigation = wrapper(page-&gt;navigationState().navigation(navigationID));
</ins><span class="cx"> 
</span><span class="cx">     [navigationDelegate webView:m_navigationState.m_webView didFinishNavigation:navigation];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NavigationState::LoaderClient::didFailLoadWithErrorForFrame(WebPageProxy*, WebFrameProxy* webFrameProxy, uint64_t navigationID, const WebCore::ResourceError&amp; error, API::Object* userData)
</del><ins>+void NavigationState::LoaderClient::didFailLoadWithErrorForFrame(WebPageProxy* page, WebFrameProxy* webFrameProxy, uint64_t navigationID, const WebCore::ResourceError&amp; error, API::Object* userData)
</ins><span class="cx"> {
</span><span class="cx">     if (!webFrameProxy-&gt;isMainFrame())
</span><span class="cx">         return;
</span><span class="lines">@@ -568,13 +522,13 @@
</span><span class="cx">     // FIXME: We should assert that navigationID is not zero here, but it's currently zero for some navigations through the page cache.
</span><span class="cx">     WKNavigation *navigation = nil;
</span><span class="cx">     if (navigationID)
</span><del>-        navigation = wrapper(*m_navigationState.m_navigations.get(navigationID));
</del><ins>+        navigation = wrapper(page-&gt;navigationState().navigation(navigationID));
</ins><span class="cx"> 
</span><span class="cx">     auto errorWithRecoveryAttempter = createErrorWithRecoveryAttempter(m_navigationState.m_webView, *webFrameProxy, error);
</span><span class="cx">     [navigationDelegate webView:m_navigationState.m_webView didFailNavigation:navigation withError:errorWithRecoveryAttempter.get()];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NavigationState::LoaderClient::didSameDocumentNavigationForFrame(WebPageProxy*, WebFrameProxy* webFrameProxy, uint64_t navigationID, SameDocumentNavigationType navigationType, API::Object*)
</del><ins>+void NavigationState::LoaderClient::didSameDocumentNavigationForFrame(WebPageProxy* page, WebFrameProxy* webFrameProxy, uint64_t navigationID, SameDocumentNavigationType navigationType, API::Object*)
</ins><span class="cx"> {
</span><span class="cx">     if (!webFrameProxy-&gt;isMainFrame())
</span><span class="cx">         return;
</span><span class="lines">@@ -589,14 +543,14 @@
</span><span class="cx">     // FIXME: We should assert that navigationID is not zero here, but it's currently zero for some navigations through the page cache.
</span><span class="cx">     WKNavigation *navigation = nil;
</span><span class="cx">     if (navigationID)
</span><del>-        navigation = wrapper(*m_navigationState.m_navigations.get(navigationID));
</del><ins>+        navigation = wrapper(page-&gt;navigationState().navigation(navigationID));
</ins><span class="cx"> 
</span><span class="cx">     [static_cast&lt;id &lt;WKNavigationDelegatePrivate&gt;&gt;(navigationDelegate.get()) _webView:m_navigationState.m_webView navigation:navigation didSameDocumentNavigation:toWKSameDocumentNavigationType(navigationType)];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NavigationState::LoaderClient::didDestroyNavigation(WebPageProxy*, uint64_t navigationID)
</del><ins>+void NavigationState::LoaderClient::didDestroyNavigation(WebPageProxy* page, uint64_t navigationID)
</ins><span class="cx"> {
</span><del>-    m_navigationState.m_navigations.remove(navigationID);
</del><ins>+    page-&gt;navigationState().didDestroyNavigation(navigationID);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void NavigationState::LoaderClient::didLayout(WebKit::WebPageProxy*, WebCore::LayoutMilestones layoutMilestones, API::Object*)
</span><span class="lines">@@ -683,9 +637,9 @@
</span><span class="cx">     [static_cast&lt;id &lt;WKNavigationDelegatePrivate&gt;&gt;(navigationDelegate.get()) _webView:m_navigationState.m_webView didReceiveAuthenticationChallenge:wrapper(*authenticationChallenge)];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NavigationState::LoaderClient::processDidCrash(WebKit::WebPageProxy*)
</del><ins>+void NavigationState::LoaderClient::processDidCrash(WebKit::WebPageProxy* page)
</ins><span class="cx"> {
</span><del>-    m_navigationState.m_navigations.clear();
</del><ins>+    page-&gt;navigationState().clearAllNavigations();
</ins><span class="cx"> 
</span><span class="cx">     if (!m_navigationState.m_navigationDelegateMethods.webViewWebProcessDidCrash)
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebFrameListenerProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebFrameListenerProxy.cpp (178216 => 178217)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebFrameListenerProxy.cpp        2015-01-09 23:57:13 UTC (rev 178216)
+++ trunk/Source/WebKit2/UIProcess/WebFrameListenerProxy.cpp        2015-01-10 00:00:08 UTC (rev 178217)
</span><span class="lines">@@ -33,7 +33,6 @@
</span><span class="cx"> WebFrameListenerProxy::WebFrameListenerProxy(WebFrameProxy* frame, uint64_t listenerID)
</span><span class="cx">     : m_frame(frame)
</span><span class="cx">     , m_listenerID(listenerID)
</span><del>-    , m_navigationID(0)
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -51,7 +50,7 @@
</span><span class="cx">     if (!m_frame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_frame-&gt;receivedPolicyDecision(action, m_listenerID, m_navigationID);
</del><ins>+    m_frame-&gt;receivedPolicyDecision(action, m_listenerID, m_navigation.get());
</ins><span class="cx">     m_frame = 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebFrameListenerProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebFrameListenerProxy.h (178216 => 178217)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebFrameListenerProxy.h        2015-01-09 23:57:13 UTC (rev 178216)
+++ trunk/Source/WebKit2/UIProcess/WebFrameListenerProxy.h        2015-01-10 00:00:08 UTC (rev 178217)
</span><span class="lines">@@ -26,9 +26,11 @@
</span><span class="cx"> #ifndef WebFrameListenerProxy_h
</span><span class="cx"> #define WebFrameListenerProxy_h
</span><span class="cx"> 
</span><ins>+#include &quot;APINavigation.h&quot;
</ins><span class="cx"> #include &quot;APIObject.h&quot;
</span><span class="cx"> #include &lt;WebCore/FrameLoaderTypes.h&gt;
</span><span class="cx"> #include &lt;wtf/PassRefPtr.h&gt;
</span><ins>+#include &lt;wtf/Ref.h&gt;
</ins><span class="cx"> #include &lt;wtf/RefPtr.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="lines">@@ -42,8 +44,8 @@
</span><span class="cx">     void invalidate();
</span><span class="cx">     uint64_t listenerID() const { return m_listenerID; }
</span><span class="cx"> 
</span><del>-    uint64_t navigationID() const { return m_navigationID; }
-    void setNavigationID(uint64_t navigationID) { m_navigationID = navigationID; }
</del><ins>+    API::Navigation* navigation() { return m_navigation.get(); }
+    void setNavigation(Ref&lt;API::Navigation&gt;&amp;&amp; navigation) { m_navigation = WTF::move(navigation); }
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     WebFrameListenerProxy(WebFrameProxy*, uint64_t listenerID);
</span><span class="lines">@@ -53,7 +55,7 @@
</span><span class="cx"> private:
</span><span class="cx">     RefPtr&lt;WebFrameProxy&gt; m_frame;
</span><span class="cx">     uint64_t m_listenerID;
</span><del>-    uint64_t m_navigationID;
</del><ins>+    RefPtr&lt;API::Navigation&gt; m_navigation;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebFrameProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebFrameProxy.cpp (178216 => 178217)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebFrameProxy.cpp        2015-01-09 23:57:13 UTC (rev 178216)
+++ trunk/Source/WebKit2/UIProcess/WebFrameProxy.cpp        2015-01-10 00:00:08 UTC (rev 178217)
</span><span class="lines">@@ -172,14 +172,14 @@
</span><span class="cx">     m_title = title;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebFrameProxy::receivedPolicyDecision(WebCore::PolicyAction action, uint64_t listenerID, uint64_t navigationID)
</del><ins>+void WebFrameProxy::receivedPolicyDecision(WebCore::PolicyAction action, uint64_t listenerID, API::Navigation* navigation)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_page)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     ASSERT(m_activeListener);
</span><span class="cx">     ASSERT(m_activeListener-&gt;listenerID() == listenerID);
</span><del>-    m_page-&gt;receivedPolicyDecision(action, this, listenerID, navigationID);
</del><ins>+    m_page-&gt;receivedPolicyDecision(action, this, listenerID, navigation);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebFramePolicyListenerProxy* WebFrameProxy::setUpPolicyListenerProxy(uint64_t listenerID)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebFrameProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebFrameProxy.h (178216 => 178217)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebFrameProxy.h        2015-01-09 23:57:13 UTC (rev 178216)
+++ trunk/Source/WebKit2/UIProcess/WebFrameProxy.h        2015-01-10 00:00:08 UTC (rev 178217)
</span><span class="lines">@@ -39,6 +39,11 @@
</span><span class="cx"> #include &lt;WebCore/ContentFilter.h&gt;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+namespace API {
+class Navigation;
+}
+
+
</ins><span class="cx"> namespace IPC {
</span><span class="cx">     class ArgumentDecoder;
</span><span class="cx">     class Connection;
</span><span class="lines">@@ -113,7 +118,7 @@
</span><span class="cx">     void didChangeTitle(const String&amp;);
</span><span class="cx"> 
</span><span class="cx">     // Policy operations.
</span><del>-    void receivedPolicyDecision(WebCore::PolicyAction, uint64_t listenerID, uint64_t navigationID = 0);
</del><ins>+    void receivedPolicyDecision(WebCore::PolicyAction, uint64_t listenerID, API::Navigation* = nullptr);
</ins><span class="cx">     WebFramePolicyListenerProxy* setUpPolicyListenerProxy(uint64_t listenerID);
</span><span class="cx">     WebFormSubmissionListenerProxy* setUpFormSubmissionListenerProxy(uint64_t listenerID);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebNavigationStatecpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/WebNavigationState.cpp (0 => 178217)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebNavigationState.cpp                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/WebNavigationState.cpp        2015-01-10 00:00:08 UTC (rev 178217)
</span><span class="lines">@@ -0,0 +1,105 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebNavigationState.h&quot;
+
+#include &quot;APINavigation.h&quot;
+#include &quot;WebPageProxy.h&quot;
+#include &lt;WebCore/ResourceRequest.h&gt;
+
+namespace WebKit {
+
+WebNavigationState::WebNavigationState()
+{
+}
+
+WebNavigationState::~WebNavigationState()
+{
+}
+
+Ref&lt;API::Navigation&gt; WebNavigationState::createLoadRequestNavigation(const WebCore::ResourceRequest&amp; request)
+{
+    auto navigation = API::Navigation::create(*this, request);
+
+    m_navigations.set(navigation-&gt;navigationID(), navigation.ptr());
+
+    return navigation;
+}
+
+Ref&lt;API::Navigation&gt; WebNavigationState::createBackForwardNavigation()
+{
+    auto navigation = API::Navigation::create(*this);
+
+    m_navigations.set(navigation-&gt;navigationID(), navigation.ptr());
+
+    return navigation;
+}
+
+Ref&lt;API::Navigation&gt; WebNavigationState::createReloadNavigation()
+{
+    auto navigation = API::Navigation::create(*this);
+
+    m_navigations.set(navigation-&gt;navigationID(), navigation.ptr());
+
+    return navigation;
+}
+
+Ref&lt;API::Navigation&gt; WebNavigationState::createLoadDataNavigation()
+{
+    auto navigation = API::Navigation::create(*this);
+
+    m_navigations.set(navigation-&gt;navigationID(), navigation.ptr());
+
+    return navigation;
+}
+
+API::Navigation&amp; WebNavigationState::navigation(uint64_t navigationID)
+{
+    ASSERT(navigationID);
+    
+    return *m_navigations.get(navigationID);
+}
+
+Ref&lt;API::Navigation&gt; WebNavigationState::takeNavigation(uint64_t navigationID)
+{
+    ASSERT(navigationID);
+    
+    return m_navigations.take(navigationID).releaseNonNull();
+}
+
+void WebNavigationState::didDestroyNavigation(uint64_t navigationID)
+{
+    ASSERT(navigationID);
+
+    m_navigations.remove(navigationID);
+}
+
+void WebNavigationState::clearAllNavigations()
+{
+    m_navigations.clear();
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebNavigationStateh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/WebNavigationState.h (0 => 178217)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebNavigationState.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/WebNavigationState.h        2015-01-10 00:00:08 UTC (rev 178217)
</span><span class="lines">@@ -0,0 +1,72 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebNavigationState_h
+#define WebNavigationState_h
+
+#include &lt;wtf/HashMap.h&gt;
+#include &lt;wtf/Ref.h&gt;
+
+namespace API {
+class Navigation;
+}
+
+namespace WebCore {
+class ResourceRequest;
+}
+
+namespace WebKit {
+
+class WebPageProxy;
+class WebBackForwardListItem;
+
+class WebNavigationState {
+public:
+    explicit WebNavigationState();
+    ~WebNavigationState();
+
+    Ref&lt;API::Navigation&gt; createBackForwardNavigation();
+    Ref&lt;API::Navigation&gt; createLoadRequestNavigation(const WebCore::ResourceRequest&amp;);
+    Ref&lt;API::Navigation&gt; createReloadNavigation();
+    Ref&lt;API::Navigation&gt; createLoadDataNavigation();
+
+    API::Navigation&amp; navigation(uint64_t navigationID);
+    Ref&lt;API::Navigation&gt; takeNavigation(uint64_t navigationID);
+    void didDestroyNavigation(uint64_t navigationID);
+    void clearAllNavigations();
+
+    uint64_t generateNavigationID()
+    {
+        return ++m_navigationID;
+    }
+
+private:
+    HashMap&lt;uint64_t, RefPtr&lt;API::Navigation&gt;&gt; m_navigations;
+    uint64_t m_navigationID { 0 };
+};
+
+} // namespace WebKit
+
+#endif // WebNavigationState_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (178216 => 178217)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-01-09 23:57:13 UTC (rev 178216)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-01-10 00:00:08 UTC (rev 178217)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include &quot;APIGeometry.h&quot;
</span><span class="cx"> #include &quot;APILegacyContextHistoryClient.h&quot;
</span><span class="cx"> #include &quot;APILoaderClient.h&quot;
</span><ins>+#include &quot;APINavigation.h&quot;
</ins><span class="cx"> #include &quot;APIPolicyClient.h&quot;
</span><span class="cx"> #include &quot;APISecurityOrigin.h&quot;
</span><span class="cx"> #include &quot;APIUIClient.h&quot;
</span><span class="lines">@@ -74,6 +75,7 @@
</span><span class="cx"> #include &quot;WebImage.h&quot;
</span><span class="cx"> #include &quot;WebInspectorProxy.h&quot;
</span><span class="cx"> #include &quot;WebInspectorProxyMessages.h&quot;
</span><ins>+#include &quot;WebNavigationState.h&quot;
</ins><span class="cx"> #include &quot;WebNotificationManagerProxy.h&quot;
</span><span class="cx"> #include &quot;WebOpenPanelParameters.h&quot;
</span><span class="cx"> #include &quot;WebOpenPanelResultListenerProxy.h&quot;
</span><span class="lines">@@ -262,6 +264,7 @@
</span><span class="cx">     , m_formClient(std::make_unique&lt;API::FormClient&gt;())
</span><span class="cx">     , m_uiClient(std::make_unique&lt;API::UIClient&gt;())
</span><span class="cx">     , m_findClient(std::make_unique&lt;API::FindClient&gt;())
</span><ins>+    , m_navigationState(std::make_unique&lt;WebNavigationState&gt;())
</ins><span class="cx">     , m_process(process)
</span><span class="cx">     , m_pageGroup(*configuration.pageGroup)
</span><span class="cx">     , m_preferences(*configuration.preferences)
</span><span class="lines">@@ -593,11 +596,30 @@
</span><span class="cx">     m_drawingArea-&gt;waitForBackingStoreUpdateOnNextPaint();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-uint64_t WebPageProxy::reattachToWebProcessWithItem(WebBackForwardListItem* item)
</del><ins>+RefPtr&lt;API::Navigation&gt; WebPageProxy::reattachToWebProcessForReload()
</ins><span class="cx"> {
</span><span class="cx">     if (m_isClosed)
</span><del>-        return 0;
</del><ins>+        return nullptr;
+    
+    ASSERT(!isValid());
+    reattachToWebProcess();
</ins><span class="cx"> 
</span><ins>+    if (!m_backForwardList-&gt;currentItem())
+        return nullptr;
+
+    auto navigation = m_navigationState-&gt;createReloadNavigation();
+
+    m_process-&gt;send(Messages::WebPage::GoToBackForwardItem(navigation-&gt;navigationID(), m_backForwardList-&gt;currentItem()-&gt;itemID()), m_pageID);
+    m_process-&gt;responsivenessTimer()-&gt;start();
+
+    return WTF::move(navigation);
+}
+
+RefPtr&lt;API::Navigation&gt; WebPageProxy::reattachToWebProcessWithItem(WebBackForwardListItem* item)
+{
+    if (m_isClosed)
+        return nullptr;
+
</ins><span class="cx">     if (item &amp;&amp; item != m_backForwardList-&gt;currentItem())
</span><span class="cx">         m_backForwardList-&gt;goToItem(item);
</span><span class="cx"> 
</span><span class="lines">@@ -605,14 +627,14 @@
</span><span class="cx">     reattachToWebProcess();
</span><span class="cx"> 
</span><span class="cx">     if (!item)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><del>-    uint64_t navigationID = generateNavigationID();
</del><ins>+    auto navigation = m_navigationState-&gt;createBackForwardNavigation();
</ins><span class="cx"> 
</span><del>-    m_process-&gt;send(Messages::WebPage::GoToBackForwardItem(navigationID, item-&gt;itemID()), m_pageID);
</del><ins>+    m_process-&gt;send(Messages::WebPage::GoToBackForwardItem(navigation-&gt;navigationID(), item-&gt;itemID()), m_pageID);
</ins><span class="cx">     m_process-&gt;responsivenessTimer()-&gt;start();
</span><span class="cx"> 
</span><del>-    return navigationID;
</del><ins>+    return WTF::move(navigation);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::setSessionID(SessionID sessionID)
</span><span class="lines">@@ -722,12 +744,12 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-uint64_t WebPageProxy::loadRequest(const ResourceRequest&amp; request, API::Object* userData)
</del><ins>+RefPtr&lt;API::Navigation&gt; WebPageProxy::loadRequest(const ResourceRequest&amp; request, API::Object* userData)
</ins><span class="cx"> {
</span><span class="cx">     if (m_isClosed)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><del>-    uint64_t navigationID = generateNavigationID();
</del><ins>+    auto navigation = m_navigationState-&gt;createLoadRequestNavigation(request);
</ins><span class="cx"> 
</span><span class="cx">     auto transaction = m_pageLoadState.transaction();
</span><span class="cx"> 
</span><span class="lines">@@ -740,23 +762,23 @@
</span><span class="cx">     bool createdExtension = maybeInitializeSandboxExtensionHandle(request.url(), sandboxExtensionHandle);
</span><span class="cx">     if (createdExtension)
</span><span class="cx">         m_process-&gt;willAcquireUniversalFileReadSandboxExtension();
</span><del>-    m_process-&gt;send(Messages::WebPage::LoadRequest(navigationID, request, sandboxExtensionHandle, UserData(process().transformObjectsToHandles(userData).get())), m_pageID);
</del><ins>+    m_process-&gt;send(Messages::WebPage::LoadRequest(navigation-&gt;navigationID(), request, sandboxExtensionHandle, UserData(process().transformObjectsToHandles(userData).get())), m_pageID);
</ins><span class="cx">     m_process-&gt;responsivenessTimer()-&gt;start();
</span><span class="cx"> 
</span><del>-    return navigationID;
</del><ins>+    return WTF::move(navigation);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-uint64_t WebPageProxy::loadFile(const String&amp; fileURLString, const String&amp; resourceDirectoryURLString, API::Object* userData)
</del><ins>+RefPtr&lt;API::Navigation&gt; WebPageProxy::loadFile(const String&amp; fileURLString, const String&amp; resourceDirectoryURLString, API::Object* userData)
</ins><span class="cx"> {
</span><span class="cx">     if (m_isClosed)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><span class="cx">     if (!isValid())
</span><span class="cx">         reattachToWebProcess();
</span><span class="cx"> 
</span><span class="cx">     URL fileURL = URL(URL(), fileURLString);
</span><span class="cx">     if (!fileURL.isLocalFile())
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><span class="cx">     URL resourceDirectoryURL;
</span><span class="cx">     if (resourceDirectoryURLString.isNull())
</span><span class="lines">@@ -764,10 +786,10 @@
</span><span class="cx">     else {
</span><span class="cx">         resourceDirectoryURL = URL(URL(), resourceDirectoryURLString);
</span><span class="cx">         if (!resourceDirectoryURL.isLocalFile())
</span><del>-            return 0;
</del><ins>+            return nullptr;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    uint64_t navigationID = generateNavigationID();
</del><ins>+    auto navigation = m_navigationState-&gt;createLoadRequestNavigation(ResourceRequest(fileURL));
</ins><span class="cx"> 
</span><span class="cx">     auto transaction = m_pageLoadState.transaction();
</span><span class="cx"> 
</span><span class="lines">@@ -778,18 +800,18 @@
</span><span class="cx">     SandboxExtension::Handle sandboxExtensionHandle;
</span><span class="cx">     SandboxExtension::createHandle(resourceDirectoryPath, SandboxExtension::ReadOnly, sandboxExtensionHandle);
</span><span class="cx">     m_process-&gt;assumeReadAccessToBaseURL(resourceDirectoryURL);
</span><del>-    m_process-&gt;send(Messages::WebPage::LoadRequest(navigationID, fileURL, sandboxExtensionHandle, UserData(process().transformObjectsToHandles(userData).get())), m_pageID);
</del><ins>+    m_process-&gt;send(Messages::WebPage::LoadRequest(navigation-&gt;navigationID(), fileURL, sandboxExtensionHandle, UserData(process().transformObjectsToHandles(userData).get())), m_pageID);
</ins><span class="cx">     m_process-&gt;responsivenessTimer()-&gt;start();
</span><span class="cx"> 
</span><del>-    return navigationID;
</del><ins>+    return WTF::move(navigation);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-uint64_t WebPageProxy::loadData(API::Data* data, const String&amp; MIMEType, const String&amp; encoding, const String&amp; baseURL, API::Object* userData)
</del><ins>+RefPtr&lt;API::Navigation&gt; WebPageProxy::loadData(API::Data* data, const String&amp; MIMEType, const String&amp; encoding, const String&amp; baseURL, API::Object* userData)
</ins><span class="cx"> {
</span><span class="cx">     if (m_isClosed)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><del>-    uint64_t navigationID = generateNavigationID();
</del><ins>+    auto navigation = m_navigationState-&gt;createLoadDataNavigation();
</ins><span class="cx"> 
</span><span class="cx">     auto transaction = m_pageLoadState.transaction();
</span><span class="cx"> 
</span><span class="lines">@@ -802,16 +824,16 @@
</span><span class="cx">     m_process-&gt;send(Messages::WebPage::LoadData(data-&gt;dataReference(), MIMEType, encoding, baseURL, UserData(process().transformObjectsToHandles(userData).get())), m_pageID);
</span><span class="cx">     m_process-&gt;responsivenessTimer()-&gt;start();
</span><span class="cx"> 
</span><del>-    return navigationID;
</del><ins>+    return WTF::move(navigation);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // FIXME: Get rid of loadHTMLString and just use loadData instead.
</span><del>-uint64_t WebPageProxy::loadHTMLString(const String&amp; htmlString, const String&amp; baseURL, API::Object* userData)
</del><ins>+RefPtr&lt;API::Navigation&gt; WebPageProxy::loadHTMLString(const String&amp; htmlString, const String&amp; baseURL, API::Object* userData)
</ins><span class="cx"> {
</span><span class="cx">     if (m_isClosed)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><del>-    uint64_t navigationID = generateNavigationID();
</del><ins>+    auto navigation = m_navigationState-&gt;createLoadDataNavigation();
</ins><span class="cx"> 
</span><span class="cx">     auto transaction = m_pageLoadState.transaction();
</span><span class="cx"> 
</span><span class="lines">@@ -821,10 +843,10 @@
</span><span class="cx">         reattachToWebProcess();
</span><span class="cx"> 
</span><span class="cx">     m_process-&gt;assumeReadAccessToBaseURL(baseURL);
</span><del>-    m_process-&gt;send(Messages::WebPage::LoadHTMLString(navigationID, htmlString, baseURL, UserData(process().transformObjectsToHandles(userData).get())), m_pageID);
</del><ins>+    m_process-&gt;send(Messages::WebPage::LoadHTMLString(navigation-&gt;navigationID(), htmlString, baseURL, UserData(process().transformObjectsToHandles(userData).get())), m_pageID);
</ins><span class="cx">     m_process-&gt;responsivenessTimer()-&gt;start();
</span><span class="cx"> 
</span><del>-    return navigationID;
</del><ins>+    return WTF::move(navigation);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::loadAlternateHTMLString(const String&amp; htmlString, const String&amp; baseURL, const String&amp; unreachableURL, API::Object* userData)
</span><span class="lines">@@ -892,7 +914,7 @@
</span><span class="cx">     m_process-&gt;responsivenessTimer()-&gt;start();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-uint64_t WebPageProxy::reload(bool reloadFromOrigin)
</del><ins>+RefPtr&lt;API::Navigation&gt; WebPageProxy::reload(bool reloadFromOrigin)
</ins><span class="cx"> {
</span><span class="cx">     SandboxExtension::Handle sandboxExtensionHandle;
</span><span class="cx"> 
</span><span class="lines">@@ -908,14 +930,14 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!isValid())
</span><del>-        return reattachToWebProcessWithItem(m_backForwardList-&gt;currentItem());
</del><ins>+        return reattachToWebProcessForReload();
+    
+    auto navigation = m_navigationState-&gt;createReloadNavigation();
</ins><span class="cx"> 
</span><del>-    uint64_t navigationID = generateNavigationID();
-
-    m_process-&gt;send(Messages::WebPage::Reload(navigationID, reloadFromOrigin, sandboxExtensionHandle), m_pageID);
</del><ins>+    m_process-&gt;send(Messages::WebPage::Reload(navigation-&gt;navigationID(), reloadFromOrigin, sandboxExtensionHandle), m_pageID);
</ins><span class="cx">     m_process-&gt;responsivenessTimer()-&gt;start();
</span><span class="cx"> 
</span><del>-    return navigationID;
</del><ins>+    return WTF::move(navigation);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::recordNavigationSnapshot()
</span><span class="lines">@@ -936,11 +958,11 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-uint64_t WebPageProxy::goForward()
</del><ins>+RefPtr&lt;API::Navigation&gt; WebPageProxy::goForward()
</ins><span class="cx"> {
</span><span class="cx">     WebBackForwardListItem* forwardItem = m_backForwardList-&gt;forwardItem();
</span><span class="cx">     if (!forwardItem)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><span class="cx">     auto transaction = m_pageLoadState.transaction();
</span><span class="cx"> 
</span><span class="lines">@@ -949,19 +971,21 @@
</span><span class="cx">     if (!isValid())
</span><span class="cx">         return reattachToWebProcessWithItem(forwardItem);
</span><span class="cx"> 
</span><del>-    uint64_t navigationID = m_backForwardList-&gt;currentItem()-&gt;itemIsInSameDocument(*forwardItem) ? 0 : generateNavigationID();
</del><ins>+    RefPtr&lt;API::Navigation&gt; navigation;
+    if (!m_backForwardList-&gt;currentItem()-&gt;itemIsInSameDocument(*forwardItem))
+        navigation = m_navigationState-&gt;createBackForwardNavigation();
</ins><span class="cx"> 
</span><del>-    m_process-&gt;send(Messages::WebPage::GoForward(navigationID, forwardItem-&gt;itemID()), m_pageID);
</del><ins>+    m_process-&gt;send(Messages::WebPage::GoForward(navigation ? navigation-&gt;navigationID() : 0, forwardItem-&gt;itemID()), m_pageID);
</ins><span class="cx">     m_process-&gt;responsivenessTimer()-&gt;start();
</span><span class="cx"> 
</span><del>-    return navigationID;
</del><ins>+    return navigation;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-uint64_t WebPageProxy::goBack()
</del><ins>+RefPtr&lt;API::Navigation&gt; WebPageProxy::goBack()
</ins><span class="cx"> {
</span><span class="cx">     WebBackForwardListItem* backItem = m_backForwardList-&gt;backItem();
</span><span class="cx">     if (!backItem)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><span class="cx">     auto transaction = m_pageLoadState.transaction();
</span><span class="cx"> 
</span><span class="lines">@@ -970,15 +994,17 @@
</span><span class="cx">     if (!isValid())
</span><span class="cx">         return reattachToWebProcessWithItem(backItem);
</span><span class="cx"> 
</span><del>-    uint64_t navigationID = m_backForwardList-&gt;currentItem()-&gt;itemIsInSameDocument(*backItem) ? 0 : generateNavigationID();
</del><ins>+    RefPtr&lt;API::Navigation&gt; navigation;
+    if (!m_backForwardList-&gt;currentItem()-&gt;itemIsInSameDocument(*backItem))
+        navigation = m_navigationState-&gt;createBackForwardNavigation();
</ins><span class="cx"> 
</span><del>-    m_process-&gt;send(Messages::WebPage::GoBack(navigationID, backItem-&gt;itemID()), m_pageID);
</del><ins>+    m_process-&gt;send(Messages::WebPage::GoBack(navigation ? navigation-&gt;navigationID() : 0, backItem-&gt;itemID()), m_pageID);
</ins><span class="cx">     m_process-&gt;responsivenessTimer()-&gt;start();
</span><span class="cx"> 
</span><del>-    return navigationID;
</del><ins>+    return navigation;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-uint64_t WebPageProxy::goToBackForwardItem(WebBackForwardListItem* item)
</del><ins>+RefPtr&lt;API::Navigation&gt; WebPageProxy::goToBackForwardItem(WebBackForwardListItem* item)
</ins><span class="cx"> {
</span><span class="cx">     if (!isValid())
</span><span class="cx">         return reattachToWebProcessWithItem(item);
</span><span class="lines">@@ -987,12 +1013,14 @@
</span><span class="cx"> 
</span><span class="cx">     m_pageLoadState.setPendingAPIRequestURL(transaction, item-&gt;url());
</span><span class="cx"> 
</span><del>-    uint64_t navigationID = m_backForwardList-&gt;currentItem()-&gt;itemIsInSameDocument(*item) ? 0 : generateNavigationID();
</del><ins>+    RefPtr&lt;API::Navigation&gt; navigation;
+    if (!m_backForwardList-&gt;currentItem()-&gt;itemIsInSameDocument(*item))
+        navigation = m_navigationState-&gt;createBackForwardNavigation();
</ins><span class="cx"> 
</span><del>-    m_process-&gt;send(Messages::WebPage::GoToBackForwardItem(navigationID, item-&gt;itemID()), m_pageID);
</del><ins>+    m_process-&gt;send(Messages::WebPage::GoToBackForwardItem(navigation ? navigation-&gt;navigationID() : 0, item-&gt;itemID()), m_pageID);
</ins><span class="cx">     m_process-&gt;responsivenessTimer()-&gt;start();
</span><span class="cx"> 
</span><del>-    return navigationID;
</del><ins>+    return navigation;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::tryRestoreScrollPosition()
</span><span class="lines">@@ -1630,11 +1658,6 @@
</span><span class="cx">         m_process-&gt;send(Messages::WebPage::KeyEvent(event), m_pageID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-uint64_t WebPageProxy::generateNavigationID()
-{
-    return ++m_navigationID;
-}
-
</del><span class="cx"> WebPreferencesStore WebPageProxy::preferencesStore() const
</span><span class="cx"> {
</span><span class="cx">     if (m_configurationPreferenceValues.isEmpty())
</span><span class="lines">@@ -1805,7 +1828,7 @@
</span><span class="cx">     m_process-&gt;send(Messages::WebPage::CenterSelectionInVisibleArea(), m_pageID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::receivedPolicyDecision(PolicyAction action, WebFrameProxy* frame, uint64_t listenerID, uint64_t navigationID)
</del><ins>+void WebPageProxy::receivedPolicyDecision(PolicyAction action, WebFrameProxy* frame, uint64_t listenerID, API::Navigation* navigation)
</ins><span class="cx"> {
</span><span class="cx">     if (!isValid())
</span><span class="cx">         return;
</span><span class="lines">@@ -1843,7 +1866,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    m_process-&gt;send(Messages::WebPage::DidReceivePolicyDecision(frame-&gt;frameID(), listenerID, action, navigationID, downloadID), m_pageID);
</del><ins>+    m_process-&gt;send(Messages::WebPage::DidReceivePolicyDecision(frame-&gt;frameID(), listenerID, action, navigation ? navigation-&gt;navigationID() : 0, downloadID), m_pageID);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::setUserAgent(const String&amp; userAgent)
</span><span class="lines">@@ -1954,7 +1977,7 @@
</span><span class="cx">     return sessionState;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-uint64_t WebPageProxy::restoreFromSessionState(SessionState sessionState, bool navigate)
</del><ins>+RefPtr&lt;API::Navigation&gt; WebPageProxy::restoreFromSessionState(SessionState sessionState, bool navigate)
</ins><span class="cx"> {
</span><span class="cx">     m_sessionRestorationRenderTreeSize = 0;
</span><span class="cx">     m_hitRenderTreeSizeThreshold = false;
</span><span class="lines">@@ -1986,7 +2009,7 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return 0;
</del><ins>+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WebPageProxy::supportsTextZoom() const
</span><span class="lines">@@ -2863,8 +2886,9 @@
</span><span class="cx">     
</span><span class="cx">     RefPtr&lt;WebFramePolicyListenerProxy&gt; listener = frame-&gt;setUpPolicyListenerProxy(listenerID);
</span><span class="cx">     if (!navigationID &amp;&amp; frame-&gt;isMainFrame()) {
</span><del>-        newNavigationID = generateNavigationID();
-        listener-&gt;setNavigationID(newNavigationID);
</del><ins>+        auto navigation = m_navigationState-&gt;createLoadRequestNavigation(request);
+        newNavigationID = navigation-&gt;navigationID();
+        listener-&gt;setNavigation(WTF::move(navigation));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CONTENT_FILTERING)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (178216 => 178217)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2015-01-09 23:57:13 UTC (rev 178216)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2015-01-10 00:00:08 UTC (rev 178217)
</span><span class="lines">@@ -114,6 +114,7 @@
</span><span class="cx"> class FindClient;
</span><span class="cx"> class FormClient;
</span><span class="cx"> class LoaderClient;
</span><ins>+class Navigation;
</ins><span class="cx"> class PolicyClient;
</span><span class="cx"> class UIClient;
</span><span class="cx"> class URLRequest;
</span><span class="lines">@@ -169,6 +170,7 @@
</span><span class="cx"> class WebContextMenuProxy;
</span><span class="cx"> class WebEditCommandProxy;
</span><span class="cx"> class WebFullScreenManagerProxy;
</span><ins>+class WebNavigationState;
</ins><span class="cx"> class WebVideoFullscreenManagerProxy;
</span><span class="cx"> class WebKeyboardEvent;
</span><span class="cx"> class WebMouseEvent;
</span><span class="lines">@@ -264,7 +266,9 @@
</span><span class="cx">     WebFrameProxy* frameSetLargestFrame() const { return m_frameSetLargestFrame.get(); }
</span><span class="cx"> 
</span><span class="cx">     DrawingAreaProxy* drawingArea() const { return m_drawingArea.get(); }
</span><del>-    
</del><ins>+
+    WebNavigationState&amp; navigationState() { return *m_navigationState.get(); }
+
</ins><span class="cx"> #if ENABLE(ASYNC_SCROLLING)
</span><span class="cx">     RemoteScrollingCoordinatorProxy* scrollingCoordinatorProxy() const { return m_scrollingCoordinatorProxy.get(); }
</span><span class="cx"> #endif
</span><span class="lines">@@ -320,22 +324,22 @@
</span><span class="cx">     bool tryClose();
</span><span class="cx">     bool isClosed() const { return m_isClosed; }
</span><span class="cx"> 
</span><del>-    uint64_t loadRequest(const WebCore::ResourceRequest&amp;, API::Object* userData = nullptr);
-    uint64_t loadFile(const String&amp; fileURL, const String&amp; resourceDirectoryURL, API::Object* userData = nullptr);
-    uint64_t loadData(API::Data*, const String&amp; MIMEType, const String&amp; encoding, const String&amp; baseURL, API::Object* userData = nullptr);
-    uint64_t loadHTMLString(const String&amp; htmlString, const String&amp; baseURL, API::Object* userData = nullptr);
</del><ins>+    RefPtr&lt;API::Navigation&gt; loadRequest(const WebCore::ResourceRequest&amp;, API::Object* userData = nullptr);
+    RefPtr&lt;API::Navigation&gt; loadFile(const String&amp; fileURL, const String&amp; resourceDirectoryURL, API::Object* userData = nullptr);
+    RefPtr&lt;API::Navigation&gt; loadData(API::Data*, const String&amp; MIMEType, const String&amp; encoding, const String&amp; baseURL, API::Object* userData = nullptr);
+    RefPtr&lt;API::Navigation&gt; loadHTMLString(const String&amp; htmlString, const String&amp; baseURL, API::Object* userData = nullptr);
</ins><span class="cx">     void loadAlternateHTMLString(const String&amp; htmlString, const String&amp; baseURL, const String&amp; unreachableURL, API::Object* userData = nullptr);
</span><span class="cx">     void loadPlainTextString(const String&amp;, API::Object* userData = nullptr);
</span><span class="cx">     void loadWebArchiveData(API::Data*, API::Object* userData = nullptr);
</span><span class="cx">     void navigateToURLWithSimulatedClick(const String&amp; url, WebCore::IntPoint documentPoint, WebCore::IntPoint screenPoint);
</span><span class="cx"> 
</span><span class="cx">     void stopLoading();
</span><del>-    uint64_t reload(bool reloadFromOrigin);
</del><ins>+    RefPtr&lt;API::Navigation&gt; reload(bool reloadFromOrigin);
</ins><span class="cx"> 
</span><del>-    uint64_t goForward();
-    uint64_t goBack();
</del><ins>+    RefPtr&lt;API::Navigation&gt; goForward();
+    RefPtr&lt;API::Navigation&gt; goBack();
</ins><span class="cx"> 
</span><del>-    uint64_t goToBackForwardItem(WebBackForwardListItem*);
</del><ins>+    RefPtr&lt;API::Navigation&gt; goToBackForwardItem(WebBackForwardListItem*);
</ins><span class="cx">     void tryRestoreScrollPosition();
</span><span class="cx">     void didChangeBackForwardList(WebBackForwardListItem* addedItem, Vector&lt;RefPtr&lt;WebBackForwardListItem&gt;&gt; removed);
</span><span class="cx">     void willGoToBackForwardListItem(uint64_t itemID, const UserData&amp;);
</span><span class="lines">@@ -586,7 +590,7 @@
</span><span class="cx">     void terminateProcess();
</span><span class="cx"> 
</span><span class="cx">     SessionState sessionState(const std::function&lt;bool (WebBackForwardListItem&amp;)&gt;&amp; = nullptr) const;
</span><del>-    uint64_t restoreFromSessionState(SessionState, bool navigate);
</del><ins>+    RefPtr&lt;API::Navigation&gt; restoreFromSessionState(SessionState, bool navigate);
</ins><span class="cx"> 
</span><span class="cx">     bool supportsTextZoom() const;
</span><span class="cx">     double textZoomFactor() const { return m_textZoomFactor; }
</span><span class="lines">@@ -715,7 +719,7 @@
</span><span class="cx">     void performDictionaryLookupOfCurrentSelection();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    void receivedPolicyDecision(WebCore::PolicyAction, WebFrameProxy*, uint64_t listenerID, uint64_t navigationID);
</del><ins>+    void receivedPolicyDecision(WebCore::PolicyAction, WebFrameProxy*, uint64_t listenerID, API::Navigation* navigationID);
</ins><span class="cx"> 
</span><span class="cx">     void backForwardRemovedItem(uint64_t itemID);
</span><span class="cx"> 
</span><span class="lines">@@ -1099,7 +1103,8 @@
</span><span class="cx">     void setCanShortCircuitHorizontalWheelEvents(bool canShortCircuitHorizontalWheelEvents) { m_canShortCircuitHorizontalWheelEvents = canShortCircuitHorizontalWheelEvents; }
</span><span class="cx"> 
</span><span class="cx">     void reattachToWebProcess();
</span><del>-    uint64_t reattachToWebProcessWithItem(WebBackForwardListItem*);
</del><ins>+    RefPtr&lt;API::Navigation&gt; reattachToWebProcessForReload();
+    RefPtr&lt;API::Navigation&gt; reattachToWebProcessWithItem(WebBackForwardListItem*);
</ins><span class="cx"> 
</span><span class="cx">     void requestNotificationPermission(uint64_t notificationID, const String&amp; originString);
</span><span class="cx">     void showNotification(const String&amp; title, const String&amp; body, const String&amp; iconURL, const String&amp; tag, const String&amp; lang, const String&amp; dir, const String&amp; originString, uint64_t notificationID);
</span><span class="lines">@@ -1354,6 +1359,8 @@
</span><span class="cx">     WebPageContextMenuClient m_contextMenuClient;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    std::unique_ptr&lt;WebNavigationState&gt; m_navigationState;
+
</ins><span class="cx">     std::unique_ptr&lt;DrawingAreaProxy&gt; m_drawingArea;
</span><span class="cx"> #if ENABLE(ASYNC_SCROLLING)
</span><span class="cx">     std::unique_ptr&lt;RemoteScrollingCoordinatorProxy&gt; m_scrollingCoordinatorProxy;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (178216 => 178217)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2015-01-09 23:57:13 UTC (rev 178216)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2015-01-10 00:00:08 UTC (rev 178217)
</span><span class="lines">@@ -1076,6 +1076,8 @@
</span><span class="cx">                 7CB16FF31724BA2F007A0A95 /* com.microsoft.SilverlightPlugin.sb in Copy Plug-in Sandbox Profiles */ = {isa = PBXBuildFile; fileRef = 7CB16FE61724B9B5007A0A95 /* com.microsoft.SilverlightPlugin.sb */; };
</span><span class="cx">                 7CB16FF41724BA30007A0A95 /* com.oracle.java.JavaAppletPlugin.sb in Copy Plug-in Sandbox Profiles */ = {isa = PBXBuildFile; fileRef = 7CB16FE71724B9B5007A0A95 /* com.oracle.java.JavaAppletPlugin.sb */; };
</span><span class="cx">                 7CC99A3618EF7CBC0048C8B4 /* WKScriptMessageInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CC99A3518EF7CBC0048C8B4 /* WKScriptMessageInternal.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                7CCCC8FA1A5F50FD008FB0DA /* WebNavigationState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CCCC8F81A5F50FD008FB0DA /* WebNavigationState.cpp */; };
+                7CCCC8FB1A5F50FD008FB0DA /* WebNavigationState.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CCCC8F91A5F50FD008FB0DA /* WebNavigationState.h */; };
</ins><span class="cx">                 7CD102DA1866770600ED429D /* AutoCorrectionCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CD102D91866770600ED429D /* AutoCorrectionCallback.h */; };
</span><span class="cx">                 7CD3A4821A5D02FA009623B8 /* APINavigation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CD3A4801A5D02FA009623B8 /* APINavigation.cpp */; };
</span><span class="cx">                 7CD3A4831A5D02FA009623B8 /* APINavigation.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CD3A4811A5D02FA009623B8 /* APINavigation.h */; };
</span><span class="lines">@@ -3178,6 +3180,8 @@
</span><span class="cx">                 7CB16FE61724B9B5007A0A95 /* com.microsoft.SilverlightPlugin.sb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = com.microsoft.SilverlightPlugin.sb; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7CB16FE71724B9B5007A0A95 /* com.oracle.java.JavaAppletPlugin.sb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = com.oracle.java.JavaAppletPlugin.sb; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7CC99A3518EF7CBC0048C8B4 /* WKScriptMessageInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKScriptMessageInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                7CCCC8F81A5F50FD008FB0DA /* WebNavigationState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNavigationState.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                7CCCC8F91A5F50FD008FB0DA /* WebNavigationState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNavigationState.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 7CD102D91866770600ED429D /* AutoCorrectionCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AutoCorrectionCallback.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7CD3A4801A5D02FA009623B8 /* APINavigation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APINavigation.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7CD3A4811A5D02FA009623B8 /* APINavigation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APINavigation.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -5997,6 +6001,8 @@
</span><span class="cx">                                 33D3A3B71339606200709BE4 /* WebMediaCacheManagerProxy.cpp */,
</span><span class="cx">                                 33D3A3B81339606200709BE4 /* WebMediaCacheManagerProxy.h */,
</span><span class="cx">                                 33D3A3B91339606200709BE4 /* WebMediaCacheManagerProxy.messages.in */,
</span><ins>+                                7CCCC8F81A5F50FD008FB0DA /* WebNavigationState.cpp */,
+                                7CCCC8F91A5F50FD008FB0DA /* WebNavigationState.h */,
</ins><span class="cx">                                 BC1DFEA312B31F87005DF730 /* WebOpenPanelResultListenerProxy.cpp */,
</span><span class="cx">                                 BC1DFEA212B31F87005DF730 /* WebOpenPanelResultListenerProxy.h */,
</span><span class="cx">                                 755422BE18062BE40046F6A8 /* WebOriginDataManagerProxy.cpp */,
</span><span class="lines">@@ -7934,6 +7940,7 @@
</span><span class="cx">                                 1AA20D5118AD50E0005D1ED4 /* WKNavigationDelegatePrivate.h in Headers */,
</span><span class="cx">                                 1ABC3DF11899C6B6004F0626 /* WKNavigationInternal.h in Headers */,
</span><span class="cx">                                 1ACC87BA1981C341003D1AF4 /* WKNavigationPrivate.h in Headers */,
</span><ins>+                                7CCCC8FB1A5F50FD008FB0DA /* WebNavigationState.h in Headers */,
</ins><span class="cx">                                 1A1B0EB618A424950038481A /* WKNavigationResponse.h in Headers */,
</span><span class="cx">                                 1A1B0EB818A424CD0038481A /* WKNavigationResponseInternal.h in Headers */,
</span><span class="cx">                                 1AA13212191D5924009C1489 /* WKNavigationResponsePrivate.h in Headers */,
</span><span class="lines">@@ -9496,6 +9503,7 @@
</span><span class="cx">                                 BC111B11112F5E4F00337BAB /* WebProcessProxy.cpp in Sources */,
</span><span class="cx">                                 2DA944B01884E9BA00ED86DB /* WebProcessProxyIOS.mm in Sources */,
</span><span class="cx">                                 51D130581382F10500351EDD /* WebProcessProxyMac.mm in Sources */,
</span><ins>+                                7CCCC8FA1A5F50FD008FB0DA /* WebNavigationState.cpp in Sources */,
</ins><span class="cx">                                 7CE4D2161A49148400C7F152 /* WebProcessPoolCocoa.mm in Sources */,
</span><span class="cx">                                 BCEE7AD012817988009827DA /* WebProcessProxyMessageReceiver.cpp in Sources */,
</span><span class="cx">                                 1A1E093318861D3800D2DC49 /* WebProgressTrackerClient.cpp in Sources */,
</span></span></pre>
</div>
</div>

</body>
</html>