Title: [169016] trunk
Revision
169016
Author
[email protected]
Date
2014-05-18 12:33:58 -0700 (Sun, 18 May 2014)

Log Message

Implement Navigations for all methods declared returning one
https://bugs.webkit.org/show_bug.cgi?id=133048
<rdar://problem/16830064>

Reviewed by Sam Weinig.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (169015 => 169016)


--- trunk/Source/WebKit2/ChangeLog	2014-05-18 17:47:11 UTC (rev 169015)
+++ trunk/Source/WebKit2/ChangeLog	2014-05-18 19:33:58 UTC (rev 169016)
@@ -1,3 +1,68 @@
+2014-05-18  Anders Carlsson  <[email protected]>
+
+        Implement Navigations for all methods declared returning one
+        https://bugs.webkit.org/show_bug.cgi?id=133048
+        <rdar://problem/16830064>
+
+        Reviewed by Sam Weinig.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView goToBackForwardListItem:]):
+        (-[WKWebView goBack]):
+        (-[WKWebView goForward]):
+        (-[WKWebView reload]):
+        (-[WKWebView reloadFromOrigin]):
+        Create and return navigations.
+
+        (-[WKWebView _reload]):
+        Call -[WKWebView reload].
+
+        * UIProcess/Cocoa/NavigationState.h:
+        * UIProcess/Cocoa/NavigationState.mm:
+        (WebKit::NavigationState::createBackForwardNavigation):
+        Create a back/forward navigation.
+
+        (WebKit::NavigationState::createReloadNavigation):
+        Create a reload navigation.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::reattachToWebProcessWithItem):
+        Generate a navigation ID and send it with the GoToBackForwardItem message.
+
+        (WebKit::WebPageProxy::reload):
+        Return a navigation ID.
+
+        (WebKit::WebPageProxy::goForward):
+        Generate a navigation ID and send it with the GoForward message.
+        
+        (WebKit::WebPageProxy::goBack):
+        Generate a navigation ID and send it with the GoBack message.
+
+        (WebKit::WebPageProxy::goToBackForwardItem):
+        Generate a navigation ID and send it with the GoToBackForwardItem message.
+
+        * UIProcess/WebPageProxy.h:
+        Return navigation IDs where appropriate.
+
+        * UIProcess/cf/WebPageProxyCF.cpp:
+        (WebKit::WebPageProxy::restoreFromSessionStateData):
+        Generate a navigation ID and send it with the RestoreSessionAndNavigateToCurrentItem message.
+        
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::goForward):
+        (WebKit::WebPage::goBack):
+        (WebKit::WebPage::goToBackForwardItem):
+        Set up the pending navigation ID.
+
+        (WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
+        Call goToBackForwardItem with a navigation ID.
+
+        * WebProcess/WebPage/WebPage.h:
+        Add navigation IDs.
+
+        * WebProcess/WebPage/WebPage.messages.in:
+        Add navigation IDs.
+
 2014-05-18  Commit Queue  <[email protected]>
 
         Unreviewed, rolling out r169001.

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (169015 => 169016)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2014-05-18 17:47:11 UTC (rev 169015)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2014-05-18 19:33:58 UTC (rev 169016)
@@ -288,10 +288,11 @@
 
 - (WKNavigation *)goToBackForwardListItem:(WKBackForwardListItem *)item
 {
-    _page->goToBackForwardItem(&item._item);
+    uint64_t navigationID = _page->goToBackForwardItem(&item._item);
 
-    // FIXME: return a WKNavigation object.
-    return nil;
+    auto navigation = _navigationState->createBackForwardNavigation(navigationID, item._item);
+
+    return [navigation.leakRef() autorelease];
 }
 
 - (NSString *)title
@@ -333,34 +334,44 @@
 
 - (WKNavigation *)goBack
 {
-    _page->goBack();
+    uint64_t navigationID = _page->goBack();
+    if (!navigationID)
+        return nil;
 
-    // FIXME: Return a navigation object.
-    return nil;
+    ASSERT(_page->backForwardList().currentItem());
+    auto navigation = _navigationState->createBackForwardNavigation(navigationID, *_page->backForwardList().currentItem());
+
+    return [navigation.leakRef() autorelease];
 }
 
 - (WKNavigation *)goForward
 {
-    _page->goForward();
+    uint64_t navigationID = _page->goForward();
+    if (!navigationID)
+        return nil;
 
-    // FIXME: Return a navigation object.
-    return nil;
+    ASSERT(_page->backForwardList().currentItem());
+    auto navigation = _navigationState->createBackForwardNavigation(navigationID, *_page->backForwardList().currentItem());
+
+    return [navigation.leakRef() autorelease];
 }
 
 - (WKNavigation *)reload
 {
-    _page->reload(false);
+    uint64_t navigationID = _page->reload(false);
+    ASSERT(navigationID);
 
-    // FIXME: Return a navigation object.
-    return nil;
+    auto navigation = _navigationState->createReloadNavigation(navigationID);
+    return [navigation.leakRef() autorelease];
 }
 
 - (WKNavigation *)reloadFromOrigin
 {
-    _page->reload(true);
+    uint64_t navigationID = _page->reload(true);
+    ASSERT(navigationID);
 
-    // FIXME: Return a navigation object.
-    return nil;
+    auto navigation = _navigationState->createReloadNavigation(navigationID);
+    return [navigation.leakRef() autorelease];
 }
 
 - (void)stopLoading
@@ -1100,10 +1111,7 @@
 
 - (WKNavigation *)_reload
 {
-    _page->reload(false);
-
-    // FIXME: return a WKNavigation object.
-    return nil;
+    return [self reload];
 }
 
 - (NSArray *)_certificateChain

Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h (169015 => 169016)


--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h	2014-05-18 17:47:11 UTC (rev 169015)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h	2014-05-18 19:33:58 UTC (rev 169016)
@@ -63,7 +63,9 @@
     RetainPtr<id <WKHistoryDelegatePrivate> > historyDelegate();
     void setHistoryDelegate(id <WKHistoryDelegatePrivate>);
 
+    RetainPtr<WKNavigation> createBackForwardNavigation(uint64_t navigationID, const WebBackForwardListItem&);
     RetainPtr<WKNavigation> createLoadRequestNavigation(uint64_t navigationID, NSURLRequest *);
+    RetainPtr<WKNavigation> createReloadNavigation(uint64_t navigationID);
 
     // Called by the history client.
     void didNavigateWithNavigationData(const WebKit::WebNavigationDataStore&);

Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm (169015 => 169016)


--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm	2014-05-18 17:47:11 UTC (rev 169015)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm	2014-05-18 19:33:58 UTC (rev 169016)
@@ -163,6 +163,30 @@
     return navigation;
 }
 
+RetainPtr<WKNavigation> NavigationState::createBackForwardNavigation(uint64_t navigationID, const WebBackForwardListItem& item)
+{
+    ASSERT(!m_navigations.contains(navigationID));
+
+    auto navigation = adoptNS([[WKNavigation alloc] init]);
+
+    // FIXME: We need to remove the navigation when we're done with it!
+    m_navigations.set(navigationID, navigation);
+
+    return navigation;
+}
+
+RetainPtr<WKNavigation> NavigationState::createReloadNavigation(uint64_t navigationID)
+{
+    ASSERT(!m_navigations.contains(navigationID));
+
+    auto navigation = adoptNS([[WKNavigation alloc] init]);
+
+    // FIXME: We need to remove the navigation when we're done with it!
+    m_navigations.set(navigationID, navigation);
+
+    return navigation;
+}
+
 void NavigationState::didNavigateWithNavigationData(const WebKit::WebNavigationDataStore& navigationDataStore)
 {
     if (!m_historyDelegateMethods.webViewDidNavigateWithNavigationData)

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (169015 => 169016)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2014-05-18 17:47:11 UTC (rev 169015)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2014-05-18 19:33:58 UTC (rev 169016)
@@ -553,7 +553,7 @@
     m_drawingArea->waitForBackingStoreUpdateOnNextPaint();
 }
 
-void WebPageProxy::reattachToWebProcessWithItem(WebBackForwardListItem* item)
+uint64_t WebPageProxy::reattachToWebProcessWithItem(WebBackForwardListItem* item)
 {
     if (item && item != m_backForwardList->currentItem())
         m_backForwardList->goToItem(item);
@@ -561,10 +561,14 @@
     reattachToWebProcess();
 
     if (!item)
-        return;
+        return 0;
 
-    m_process->send(Messages::WebPage::GoToBackForwardItem(item->itemID()), m_pageID);
+    uint64_t navigationID = generateNavigationID();
+
+    m_process->send(Messages::WebPage::GoToBackForwardItem(navigationID, item->itemID()), m_pageID);
     m_process->responsivenessTimer()->start();
+
+    return navigationID;
 }
 
 void WebPageProxy::setSession(API::Session& session)
@@ -795,7 +799,7 @@
     m_process->responsivenessTimer()->start();
 }
 
-void WebPageProxy::reload(bool reloadFromOrigin)
+uint64_t WebPageProxy::reload(bool reloadFromOrigin)
 {
     SandboxExtension::Handle sandboxExtensionHandle;
 
@@ -810,13 +814,15 @@
             m_process->willAcquireUniversalFileReadSandboxExtension();
     }
 
-    if (!isValid()) {
-        reattachToWebProcessWithItem(m_backForwardList->currentItem());
-        return;
-    }
+    if (!isValid())
+        return reattachToWebProcessWithItem(m_backForwardList->currentItem());
 
-    m_process->send(Messages::WebPage::Reload(generateNavigationID(), reloadFromOrigin, sandboxExtensionHandle), m_pageID);
+    uint64_t navigationID = generateNavigationID();
+
+    m_process->send(Messages::WebPage::Reload(navigationID, reloadFromOrigin, sandboxExtensionHandle), m_pageID);
     m_process->responsivenessTimer()->start();
+
+    return navigationID;
 }
 
 void WebPageProxy::recordNavigationSnapshot()
@@ -829,11 +835,11 @@
 #endif
 }
 
-void WebPageProxy::goForward()
+uint64_t WebPageProxy::goForward()
 {
     WebBackForwardListItem* forwardItem = m_backForwardList->forwardItem();
     if (!forwardItem)
-        return;
+        return 0;
 
     recordNavigationSnapshot();
 
@@ -841,20 +847,22 @@
 
     m_pageLoadState.setPendingAPIRequestURL(transaction, forwardItem->url());
 
-    if (!isValid()) {
-        reattachToWebProcessWithItem(forwardItem);
-        return;
-    }
+    if (!isValid())
+        return reattachToWebProcessWithItem(forwardItem);
 
-    m_process->send(Messages::WebPage::GoForward(forwardItem->itemID()), m_pageID);
+    uint64_t navigationID = generateNavigationID();
+
+    m_process->send(Messages::WebPage::GoForward(navigationID, forwardItem->itemID()), m_pageID);
     m_process->responsivenessTimer()->start();
+
+    return navigationID;
 }
 
-void WebPageProxy::goBack()
+uint64_t WebPageProxy::goBack()
 {
     WebBackForwardListItem* backItem = m_backForwardList->backItem();
     if (!backItem)
-        return;
+        return 0;
 
     recordNavigationSnapshot();
 
@@ -862,21 +870,21 @@
 
     m_pageLoadState.setPendingAPIRequestURL(transaction, backItem->url());
 
-    if (!isValid()) {
-        reattachToWebProcessWithItem(backItem);
-        return;
-    }
+    if (!isValid())
+        return reattachToWebProcessWithItem(backItem);
 
-    m_process->send(Messages::WebPage::GoBack(backItem->itemID()), m_pageID);
+    uint64_t navigationID = generateNavigationID();
+
+    m_process->send(Messages::WebPage::GoBack(navigationID, backItem->itemID()), m_pageID);
     m_process->responsivenessTimer()->start();
+
+    return navigationID;
 }
 
-void WebPageProxy::goToBackForwardItem(WebBackForwardListItem* item)
+uint64_t WebPageProxy::goToBackForwardItem(WebBackForwardListItem* item)
 {
-    if (!isValid()) {
-        reattachToWebProcessWithItem(item);
-        return;
-    }
+    if (!isValid())
+        return reattachToWebProcessWithItem(item);
 
     recordNavigationSnapshot();
     
@@ -884,8 +892,12 @@
 
     m_pageLoadState.setPendingAPIRequestURL(transaction, item->url());
 
-    m_process->send(Messages::WebPage::GoToBackForwardItem(item->itemID()), m_pageID);
+    uint64_t navigationID = generateNavigationID();
+
+    m_process->send(Messages::WebPage::GoToBackForwardItem(navigationID, item->itemID()), m_pageID);
     m_process->responsivenessTimer()->start();
+
+    return navigationID;
 }
 
 void WebPageProxy::tryRestoreScrollPosition()

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (169015 => 169016)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2014-05-18 17:47:11 UTC (rev 169015)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2014-05-18 19:33:58 UTC (rev 169016)
@@ -517,12 +517,12 @@
     void loadWebArchiveData(API::Data*, API::Object* userData = nullptr);
 
     void stopLoading();
-    void reload(bool reloadFromOrigin);
+    uint64_t reload(bool reloadFromOrigin);
 
-    void goForward();
-    void goBack();
+    uint64_t goForward();
+    uint64_t goBack();
 
-    void goToBackForwardItem(WebBackForwardListItem*);
+    uint64_t goToBackForwardItem(WebBackForwardListItem*);
     void tryRestoreScrollPosition();
     void didChangeBackForwardList(WebBackForwardListItem* addedItem, Vector<RefPtr<WebBackForwardListItem>> removed);
     void willGoToBackForwardListItem(uint64_t itemID, IPC::MessageDecoder&);
@@ -1206,7 +1206,7 @@
     void setCanShortCircuitHorizontalWheelEvents(bool canShortCircuitHorizontalWheelEvents) { m_canShortCircuitHorizontalWheelEvents = canShortCircuitHorizontalWheelEvents; }
 
     void reattachToWebProcess();
-    void reattachToWebProcessWithItem(WebBackForwardListItem*);
+    uint64_t reattachToWebProcessWithItem(WebBackForwardListItem*);
 
     void requestNotificationPermission(uint64_t notificationID, const String& originString);
     void showNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& lang, const String& dir, const String& originString, uint64_t notificationID);

Modified: trunk/Source/WebKit2/UIProcess/cf/WebPageProxyCF.cpp (169015 => 169016)


--- trunk/Source/WebKit2/UIProcess/cf/WebPageProxyCF.cpp	2014-05-18 17:47:11 UTC (rev 169015)
+++ trunk/Source/WebKit2/UIProcess/cf/WebPageProxyCF.cpp	2014-05-18 19:33:58 UTC (rev 169016)
@@ -169,7 +169,7 @@
                     if (WebBackForwardListItem* item = m_backForwardList->currentItem())
                         m_pageLoadState.setPendingAPIRequestURL(transaction, item->url());
 
-                    process().send(Messages::WebPage::RestoreSessionAndNavigateToCurrentItem(state), m_pageID);
+                    process().send(Messages::WebPage::RestoreSessionAndNavigateToCurrentItem(generateNavigationID(), state), m_pageID);
                 }
             }
         }

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (169015 => 169016)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2014-05-18 17:47:11 UTC (rev 169015)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2014-05-18 19:33:58 UTC (rev 169016)
@@ -1078,7 +1078,7 @@
     corePage()->userInputBridge().reloadFrame(m_mainFrame->coreFrame(), reloadFromOrigin);
 }
 
-void WebPage::goForward(uint64_t backForwardItemID)
+void WebPage::goForward(uint64_t navigationID, uint64_t backForwardItemID)
 {
     SendStopResponsivenessTimer stopper(this);
 
@@ -1087,10 +1087,14 @@
     if (!item)
         return;
 
+    ASSERT(!m_pendingNavigationID);
+    if (!item->isInPageCache())
+        m_pendingNavigationID = navigationID;
+
     m_page->goToItem(item, FrameLoadTypeForward);
 }
 
-void WebPage::goBack(uint64_t backForwardItemID)
+void WebPage::goBack(uint64_t navigationID, uint64_t backForwardItemID)
 {
     SendStopResponsivenessTimer stopper(this);
 
@@ -1099,10 +1103,14 @@
     if (!item)
         return;
 
+    ASSERT(!m_pendingNavigationID);
+    if (!item->isInPageCache())
+        m_pendingNavigationID = navigationID;
+
     m_page->goToItem(item, FrameLoadTypeBack);
 }
 
-void WebPage::goToBackForwardItem(uint64_t backForwardItemID)
+void WebPage::goToBackForwardItem(uint64_t navigationID, uint64_t backForwardItemID)
 {
     SendStopResponsivenessTimer stopper(this);
 
@@ -1111,6 +1119,10 @@
     if (!item)
         return;
 
+    ASSERT(!m_pendingNavigationID);
+    if (!item->isInPageCache())
+        m_pendingNavigationID = navigationID;
+
     m_page->goToItem(item, FrameLoadTypeIndexedBackForward);
 }
 
@@ -1954,10 +1966,10 @@
     return currentItemID;
 }
 
-void WebPage::restoreSessionAndNavigateToCurrentItem(const SessionState& sessionState)
+void WebPage::restoreSessionAndNavigateToCurrentItem(uint64_t navigationID, const SessionState& sessionState)
 {
     if (uint64_t currentItemID = restoreSession(sessionState))
-        goToBackForwardItem(currentItemID);
+        goToBackForwardItem(navigationID, currentItemID);
 }
 
 #if ENABLE(TOUCH_EVENTS)

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (169015 => 169016)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2014-05-18 17:47:11 UTC (rev 169015)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2014-05-18 19:33:58 UTC (rev 169016)
@@ -855,9 +855,9 @@
     void loadPlainTextString(const String&, IPC::MessageDecoder&);
     void loadWebArchiveData(const IPC::DataReference&, IPC::MessageDecoder&);
     void reload(uint64_t navigationID, bool reloadFromOrigin, const SandboxExtension::Handle&);
-    void goForward(uint64_t);
-    void goBack(uint64_t);
-    void goToBackForwardItem(uint64_t);
+    void goForward(uint64_t navigationID, uint64_t);
+    void goBack(uint64_t navigationID, uint64_t);
+    void goToBackForwardItem(uint64_t navigationID, uint64_t);
     void tryRestoreScrollPosition();
     void setActive(bool);
     void setFocused(bool);
@@ -890,7 +890,7 @@
     void loadURLInFrame(const String&, uint64_t frameID);
 
     uint64_t restoreSession(const SessionState&);
-    void restoreSessionAndNavigateToCurrentItem(const SessionState&);
+    void restoreSessionAndNavigateToCurrentItem(uint64_t navigationID, const SessionState&);
 
     void didRemoveBackForwardItem(uint64_t);
 

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (169015 => 169016)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in	2014-05-18 17:47:11 UTC (rev 169015)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in	2014-05-18 19:33:58 UTC (rev 169016)
@@ -104,9 +104,9 @@
     ScrollBy(uint32_t scrollDirection, uint32_t scrollGranularity)
     CenterSelectionInVisibleArea()
 
-    GoBack(uint64_t backForwardItemID)
-    GoForward(uint64_t backForwardItemID)
-    GoToBackForwardItem(uint64_t backForwardItemID)
+    GoBack(uint64_t navigationID, uint64_t backForwardItemID)
+    GoForward(uint64_t navigationID, uint64_t backForwardItemID)
+    GoToBackForwardItem(uint64_t navigationID, uint64_t backForwardItemID)
     TryRestoreScrollPosition()
 
     LoadURLInFrame(String url, uint64_t frameID)
@@ -123,7 +123,7 @@
     StopLoadingFrame(uint64_t frameID)
     
     RestoreSession(WebKit::SessionState state)
-    RestoreSessionAndNavigateToCurrentItem(WebKit::SessionState state)
+    RestoreSessionAndNavigateToCurrentItem(uint64_t navigationID, WebKit::SessionState state)
 
     DidRemoveBackForwardItem(uint64_t backForwardItemID)
 

Modified: trunk/Tools/ChangeLog (169015 => 169016)


--- trunk/Tools/ChangeLog	2014-05-18 17:47:11 UTC (rev 169015)
+++ trunk/Tools/ChangeLog	2014-05-18 19:33:58 UTC (rev 169016)
@@ -1,3 +1,23 @@
+2014-05-18  Anders Carlsson  <[email protected]>
+
+        Implement Navigations for all methods declared returning one
+        https://bugs.webkit.org/show_bug.cgi?id=133048
+        <rdar://problem/16830064>
+
+        Reviewed by Sam Weinig.
+
+        * MiniBrowser/mac/MiniBrowser_Prefix.pch:
+        Import WebKit.h.
+        
+        * MiniBrowser/mac/WK2BrowserWindowController.m:
+        (-[WK2BrowserWindowController webView:didStartProvisionalNavigation:]):
+        (-[WK2BrowserWindowController webView:didReceiveServerRedirectForProvisionalNavigation:]):
+        (-[WK2BrowserWindowController webView:didFailProvisionalNavigation:withError:]):
+        (-[WK2BrowserWindowController webView:didCommitNavigation:]):
+        (-[WK2BrowserWindowController webView:didFinishLoadingNavigation:]):
+        (-[WK2BrowserWindowController webView:didFailNavigation:withError:]):
+        Print out the navigations.
+
 2014-05-17  Zalan Bujtas  <[email protected]>
 
         Subpixel rendering: Add subpixelCSSOMElementMetricsEnabled to WK1 WebPreferences.

Modified: trunk/Tools/MiniBrowser/mac/MiniBrowser_Prefix.pch (169015 => 169016)


--- trunk/Tools/MiniBrowser/mac/MiniBrowser_Prefix.pch	2014-05-18 17:47:11 UTC (rev 169015)
+++ trunk/Tools/MiniBrowser/mac/MiniBrowser_Prefix.pch	2014-05-18 19:33:58 UTC (rev 169016)
@@ -25,10 +25,9 @@
 
 #ifdef __OBJC__
     #import <Cocoa/Cocoa.h>
+    #import <WebKit/WebKit.h>
 #endif
 
-#import <WebKit2/WebKit2_C.h>
-
 #define ENABLE_LOGGING 0
 
 #if ENABLE_LOGGING

Modified: trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m (169015 => 169016)


--- trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m	2014-05-18 17:47:11 UTC (rev 169015)
+++ trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m	2014-05-18 19:33:58 UTC (rev 169016)
@@ -424,32 +424,32 @@
 
 - (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation
 {
-    LOG(@"didStartProvisionalNavigation");
+    LOG(@"didStartProvisionalNavigation: %@", navigation);
 }
 
 - (void)webView:(WKWebView *)webView didReceiveServerRedirectForProvisionalNavigation:(WKNavigation *)navigation
 {
-    LOG(@"didReceiveServerRedirectForProvisionalNavigation");
+    LOG(@"didReceiveServerRedirectForProvisionalNavigation: %@", navigation);
 }
 
 - (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(NSError *)error
 {
-    LOG(@"didFailProvisionalNavigation: %@", error);
+    LOG(@"didFailProvisionalNavigation: %@navigation, error: %@", navigation, error);
 }
 
 - (void)webView:(WKWebView *)webView didCommitNavigation:(WKNavigation *)navigation
 {
-    LOG(@"didCommitNavigation: %@", error);
+    LOG(@"didCommitNavigation: %@", navigation);
 }
 
 - (void)webView:(WKWebView *)webView didFinishLoadingNavigation:(WKNavigation *)navigation
 {
-    LOG(@"didFinishLoadingNavigation");
+    LOG(@"didFinishLoadingNavigation: %@", navigation);
 }
 
 - (void)webView:(WKWebView *)webView didFailNavigation:(WKNavigation *)navigation withError:(NSError *)error
 {
-    LOG(@"didFailNavigation: %@", error);
+    LOG(@"didFailNavigation: %@, error %@", navigation, error);
 }
 
 @end
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to