Title: [166338] trunk/Source/WebKit2
Revision
166338
Author
ander...@apple.com
Date
2014-03-26 20:46:04 -0700 (Wed, 26 Mar 2014)

Log Message

Rename a delegate method to -webView:didFinishNavigation:
https://bugs.webkit.org/show_bug.cgi?id=130814

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (166337 => 166338)


--- trunk/Source/WebKit2/ChangeLog	2014-03-27 03:45:38 UTC (rev 166337)
+++ trunk/Source/WebKit2/ChangeLog	2014-03-27 03:46:04 UTC (rev 166338)
@@ -1,3 +1,16 @@
+2014-03-26  Anders Carlsson  <ander...@apple.com>
+
+        Rename a delegate method to -webView:didFinishNavigation:
+        https://bugs.webkit.org/show_bug.cgi?id=130814
+
+        Reviewed by Sam Weinig.
+
+        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
+        * UIProcess/Cocoa/NavigationState.h:
+        * UIProcess/Cocoa/NavigationState.mm:
+        (WebKit::NavigationState::setNavigationDelegate):
+        (WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
+
 2014-03-26  Tim Horton  <timothy_hor...@apple.com>
 
         [iOS WebKit2] Crashes on swipe

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegate.h (166337 => 166338)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegate.h	2014-03-27 03:45:38 UTC (rev 166337)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegate.h	2014-03-27 03:46:04 UTC (rev 166338)
@@ -57,7 +57,7 @@
 
 - (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(NSError *)error;
 - (void)webView:(WKWebView *)webView didCommitNavigation:(WKNavigation *)navigation;
-- (void)webView:(WKWebView *)webView didFinishLoadingNavigation:(WKNavigation *)navigation;
+- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation;
 - (void)webView:(WKWebView *)webView didFailNavigation:(WKNavigation *)navigation withError:(NSError *)error;
 
 @end

Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h (166337 => 166338)


--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h	2014-03-27 03:45:38 UTC (rev 166337)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h	2014-03-27 03:46:04 UTC (rev 166338)
@@ -42,6 +42,10 @@
 @protocol WKHistoryDelegatePrivate;
 @protocol WKNavigationDelegate;
 
+@interface NSObject (WKNavigationDelegateToBeRemoved)
+- (void)webView:(WKWebView *)webView didFinishLoadingNavigation:(WKNavigation *)navigation;
+@end
+
 namespace WebKit {
 
 struct WebNavigationDataStore;
@@ -129,13 +133,16 @@
         bool webViewDidReceiveServerRedirectForProvisionalNavigation : 1;
         bool webViewDidFailProvisionalNavigationWithError : 1;
         bool webViewDidCommitNavigation : 1;
-        bool webViewDidFinishLoadingNavigation : 1;
+        bool webViewDidFinishNavigation : 1;
         bool webViewDidFailNavigationWithError : 1;
 
         bool webViewRenderingProgressDidChange : 1;
         bool webViewCanAuthenticateAgainstProtectionSpace : 1;
         bool webViewDidReceiveAuthenticationChallenge : 1;
         bool webViewWebProcessDidCrash : 1;
+
+        // FIXME: Remove this once no clients depend on it being called.
+        bool webViewDidFinishLoadingNavigation : 1;
     } m_navigationDelegateMethods;
 
     HashMap<uint64_t, RetainPtr<WKNavigation>> m_navigations;

Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm (166337 => 166338)


--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm	2014-03-27 03:45:38 UTC (rev 166337)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm	2014-03-27 03:46:04 UTC (rev 166338)
@@ -112,13 +112,16 @@
     m_navigationDelegateMethods.webViewDidReceiveServerRedirectForProvisionalNavigation = [delegate respondsToSelector:@selector(webView:didReceiveServerRedirectForProvisionalNavigation:)];
     m_navigationDelegateMethods.webViewDidFailProvisionalNavigationWithError = [delegate respondsToSelector:@selector(webView:didFailProvisionalNavigation:withError:)];
     m_navigationDelegateMethods.webViewDidCommitNavigation = [delegate respondsToSelector:@selector(webView:didCommitNavigation:)];
-    m_navigationDelegateMethods.webViewDidFinishLoadingNavigation = [delegate respondsToSelector:@selector(webView:didFinishLoadingNavigation:)];
+    m_navigationDelegateMethods.webViewDidFinishNavigation = [delegate respondsToSelector:@selector(webView:didFinishNavigation:)];
     m_navigationDelegateMethods.webViewDidFailNavigationWithError = [delegate respondsToSelector:@selector(webView:didFailNavigation:withError:)];
 
     m_navigationDelegateMethods.webViewRenderingProgressDidChange = [delegate respondsToSelector:@selector(_webView:renderingProgressDidChange:)];
     m_navigationDelegateMethods.webViewCanAuthenticateAgainstProtectionSpace = [delegate respondsToSelector:@selector(_webView:canAuthenticateAgainstProtectionSpace:)];
     m_navigationDelegateMethods.webViewDidReceiveAuthenticationChallenge = [delegate respondsToSelector:@selector(_webView:didReceiveAuthenticationChallenge:)];
     m_navigationDelegateMethods.webViewWebProcessDidCrash = [delegate respondsToSelector:@selector(_webViewWebProcessDidCrash:)];
+
+    // FIXME: Remove this once no clients depend on it being called.
+    m_navigationDelegateMethods.webViewDidFinishLoadingNavigation = [delegate respondsToSelector:@selector(webView:didFinishLoadingNavigation:)];
 }
 
 RetainPtr<id <WKHistoryDelegatePrivate> > NavigationState::historyDelegate()
@@ -410,7 +413,7 @@
     if (!webFrameProxy->isMainFrame())
         return;
 
-    if (!m_navigationState.m_navigationDelegateMethods.webViewDidFinishLoadingNavigation)
+    if (!m_navigationState.m_navigationDelegateMethods.webViewDidFinishNavigation && !m_navigationState.m_navigationDelegateMethods.webViewDidFinishLoadingNavigation)
         return;
 
     auto navigationDelegate = m_navigationState.m_navigationDelegate.get();
@@ -422,7 +425,13 @@
     if (navigationID)
         navigation = m_navigationState.m_navigations.get(navigationID).get();
 
-    [navigationDelegate webView:m_navigationState.m_webView didFinishLoadingNavigation:navigation];
+    // FIXME: Remove this once no clients depend on it being called.
+    if (m_navigationState.m_navigationDelegateMethods.webViewDidFinishLoadingNavigation) {
+        [static_cast<id>(navigationDelegate) webView:m_navigationState.m_webView didFinishLoadingNavigation:navigation];
+        return;
+    }
+
+    [navigationDelegate webView:m_navigationState.m_webView didFinishNavigation:navigation];
 }
 
 void NavigationState::LoaderClient::didFailLoadWithErrorForFrame(WebPageProxy*, WebFrameProxy* webFrameProxy, uint64_t navigationID, const WebCore::ResourceError& error, API::Object* userData)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to