WebKit Bugzilla
Attachment 348073 Details for
Bug 188942
: Transition WKBrowsingContextController from WKPageLoaderClient to WKPageNavigationClient
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188942-20180824212150.patch (text/plain), 13.64 KB, created by
Alex Christensen
on 2018-08-24 21:21:50 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2018-08-24 21:21:50 PDT
Size:
13.64 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 235338) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,35 @@ >+2018-08-24 Alex Christensen <achristensen@webkit.org> >+ >+ Transition WKBrowsingContextController from WKPageLoaderClient to WKPageNavigationClient >+ https://bugs.webkit.org/show_bug.cgi?id=188942 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/API/Cocoa/WKBrowsingContextController.mm: >+ (didStartProvisionalNavigation): >+ (didReceiveServerRedirectForProvisionalNavigation): >+ (didFailProvisionalNavigation): >+ (didCommitNavigation): >+ (didFinishNavigation): >+ (didFailNavigation): >+ (canAuthenticateAgainstProtectionSpace): >+ (didReceiveAuthenticationChallenge): >+ (setUpPageLoaderClient): >+ (-[WKBrowsingContextController setLoadDelegate:]): >+ (didStartProvisionalLoadForFrame): Deleted. >+ (didReceiveServerRedirectForProvisionalLoadForFrame): Deleted. >+ (didFailProvisionalLoadWithErrorForFrame): Deleted. >+ (didCommitLoadForFrame): Deleted. >+ (didFinishLoadForFrame): Deleted. >+ (didFailLoadWithErrorForFrame): Deleted. >+ (canAuthenticateAgainstProtectionSpaceInFrame): Deleted. >+ (didReceiveAuthenticationChallengeInFrame): Deleted. >+ (didStartProgress): Deleted. >+ (didChangeProgress): Deleted. >+ (didFinishProgress): Deleted. >+ (didChangeBackForwardList): Deleted. >+ * UIProcess/API/Cocoa/WKBrowsingContextLoadDelegate.h: >+ > 2018-08-23 Jeff Miller <jeffm@apple.com> > > Remove -[WKNavigationDelegate _webView:decidePolicyForPluginLoadWithCurrentPolicy:pluginInfo:unavailabilityDescription:] >Index: Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.mm >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.mm (revision 235331) >+++ Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.mm (working copy) >@@ -320,11 +320,8 @@ - (void)setPageZoom:(CGFloat)pageZoom > _page->setPageZoomFactor(pageZoom); > } > >-static void didStartProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo) >+static void didStartProvisionalNavigation(WKPageRef page, WKNavigationRef, WKTypeRef userData, const void* clientInfo) > { >- if (!WKFrameIsMainFrame(frame)) >- return; >- > auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto loadDelegate = browsingContext->_loadDelegate.get(); > >@@ -332,11 +329,8 @@ static void didStartProvisionalLoadForFr > [loadDelegate browsingContextControllerDidStartProvisionalLoad:browsingContext]; > } > >-static void didReceiveServerRedirectForProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo) >+static void didReceiveServerRedirectForProvisionalNavigation(WKPageRef page, WKNavigationRef, WKTypeRef userData, const void* clientInfo) > { >- if (!WKFrameIsMainFrame(frame)) >- return; >- > auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto loadDelegate = browsingContext->_loadDelegate.get(); > >@@ -344,11 +338,8 @@ static void didReceiveServerRedirectForP > [loadDelegate browsingContextControllerDidReceiveServerRedirectForProvisionalLoad:browsingContext]; > } > >-static void didFailProvisionalLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, WKErrorRef error, WKTypeRef userData, const void* clientInfo) >+static void didFailProvisionalNavigation(WKPageRef page, WKNavigationRef, WKErrorRef error, WKTypeRef userData, const void* clientInfo) > { >- if (!WKFrameIsMainFrame(frame)) >- return; >- > auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto loadDelegate = browsingContext->_loadDelegate.get(); > >@@ -356,11 +347,8 @@ static void didFailProvisionalLoadWithEr > [loadDelegate browsingContextController:browsingContext didFailProvisionalLoadWithError:wrapper(*toImpl(error))]; > } > >-static void didCommitLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo) >+static void didCommitNavigation(WKPageRef page, WKNavigationRef, WKTypeRef userData, const void* clientInfo) > { >- if (!WKFrameIsMainFrame(frame)) >- return; >- > auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto loadDelegate = browsingContext->_loadDelegate.get(); > >@@ -368,11 +356,8 @@ static void didCommitLoadForFrame(WKPage > [loadDelegate browsingContextControllerDidCommitLoad:browsingContext]; > } > >-static void didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo) >+static void didFinishNavigation(WKPageRef page, WKNavigationRef, WKTypeRef userData, const void* clientInfo) > { >- if (!WKFrameIsMainFrame(frame)) >- return; >- > auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto loadDelegate = browsingContext->_loadDelegate.get(); > >@@ -380,11 +365,8 @@ static void didFinishLoadForFrame(WKPage > [loadDelegate browsingContextControllerDidFinishLoad:browsingContext]; > } > >-static void didFailLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, WKErrorRef error, WKTypeRef userData, const void* clientInfo) >+static void didFailNavigation(WKPageRef page, WKNavigationRef, WKErrorRef error, WKTypeRef userData, const void* clientInfo) > { >- if (!WKFrameIsMainFrame(frame)) >- return; >- > auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto loadDelegate = browsingContext->_loadDelegate.get(); > >@@ -392,7 +374,7 @@ static void didFailLoadWithErrorForFrame > [loadDelegate browsingContextController:browsingContext didFailLoadWithError:wrapper(*toImpl(error))]; > } > >-static bool canAuthenticateAgainstProtectionSpaceInFrame(WKPageRef page, WKFrameRef frame, WKProtectionSpaceRef protectionSpace, const void *clientInfo) >+static bool canAuthenticateAgainstProtectionSpace(WKPageRef page, WKProtectionSpaceRef protectionSpace, const void *clientInfo) > { > auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto loadDelegate = browsingContext->_loadDelegate.get(); >@@ -403,7 +385,7 @@ static bool canAuthenticateAgainstProtec > return false; > } > >-static void didReceiveAuthenticationChallengeInFrame(WKPageRef page, WKFrameRef frame, WKAuthenticationChallengeRef authenticationChallenge, const void *clientInfo) >+static void didReceiveAuthenticationChallenge(WKPageRef page, WKAuthenticationChallengeRef authenticationChallenge, const void *clientInfo) > { > auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto loadDelegate = browsingContext->_loadDelegate.get(); >@@ -412,46 +394,6 @@ static void didReceiveAuthenticationChal > [(id <WKBrowsingContextLoadDelegatePrivate>)loadDelegate browsingContextController:browsingContext didReceiveAuthenticationChallenge:wrapper(*toImpl(authenticationChallenge))]; > } > >-static void didStartProgress(WKPageRef page, const void* clientInfo) >-{ >- auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; >- auto loadDelegate = browsingContext->_loadDelegate.get(); >- >- if ([loadDelegate respondsToSelector:@selector(browsingContextControllerDidStartProgress:)]) >- [loadDelegate browsingContextControllerDidStartProgress:browsingContext]; >-} >- >-static void didChangeProgress(WKPageRef page, const void* clientInfo) >-{ >- auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; >- auto loadDelegate = browsingContext->_loadDelegate.get(); >- >- if ([loadDelegate respondsToSelector:@selector(browsingContextController:estimatedProgressChangedTo:)]) >- [loadDelegate browsingContextController:browsingContext estimatedProgressChangedTo:toImpl(page)->estimatedProgress()]; >-} >- >-static void didFinishProgress(WKPageRef page, const void* clientInfo) >-{ >- auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; >- auto loadDelegate = browsingContext->_loadDelegate.get(); >- >- if ([loadDelegate respondsToSelector:@selector(browsingContextControllerDidFinishProgress:)]) >- [loadDelegate browsingContextControllerDidFinishProgress:browsingContext]; >-} >- >-static void didChangeBackForwardList(WKPageRef page, WKBackForwardListItemRef addedItem, WKArrayRef removedItems, const void *clientInfo) >-{ >- auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; >- auto loadDelegate = browsingContext->_loadDelegate.get(); >- >- if (![loadDelegate respondsToSelector:@selector(browsingContextControllerDidChangeBackForwardList:addedItem:removedItems:)]) >- return; >- >- WKBackForwardListItem *added = addedItem ? wrapper(*toImpl(addedItem)) : nil; >- NSArray *removed = removedItems ? wrapper(*toImpl(removedItems)) : nil; >- [loadDelegate browsingContextControllerDidChangeBackForwardList:browsingContext addedItem:added removedItems:removed]; >-} >- > static void processDidCrash(WKPageRef page, const void* clientInfo) > { > auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; >@@ -463,29 +405,22 @@ static void processDidCrash(WKPageRef pa > > static void setUpPageLoaderClient(WKBrowsingContextController *browsingContext, WebPageProxy& page) > { >- WKPageLoaderClientV4 loaderClient; >+ WKPageNavigationClientV0 loaderClient; > memset(&loaderClient, 0, sizeof(loaderClient)); > >- loaderClient.base.version = 4; >+ loaderClient.base.version = 0; > loaderClient.base.clientInfo = (__bridge void*)browsingContext; >- loaderClient.didStartProvisionalLoadForFrame = didStartProvisionalLoadForFrame; >- loaderClient.didReceiveServerRedirectForProvisionalLoadForFrame = didReceiveServerRedirectForProvisionalLoadForFrame; >- loaderClient.didFailProvisionalLoadWithErrorForFrame = didFailProvisionalLoadWithErrorForFrame; >- loaderClient.didCommitLoadForFrame = didCommitLoadForFrame; >- loaderClient.didFinishLoadForFrame = didFinishLoadForFrame; >- loaderClient.didFailLoadWithErrorForFrame = didFailLoadWithErrorForFrame; >- >- loaderClient.canAuthenticateAgainstProtectionSpaceInFrame = canAuthenticateAgainstProtectionSpaceInFrame; >- loaderClient.didReceiveAuthenticationChallengeInFrame = didReceiveAuthenticationChallengeInFrame; >- >- loaderClient.didStartProgress = didStartProgress; >- loaderClient.didChangeProgress = didChangeProgress; >- loaderClient.didFinishProgress = didFinishProgress; >- loaderClient.didChangeBackForwardList = didChangeBackForwardList; >- >- loaderClient.processDidCrash = processDidCrash; >+ loaderClient.didStartProvisionalNavigation = didStartProvisionalNavigation; >+ loaderClient.didReceiveServerRedirectForProvisionalNavigation = didReceiveServerRedirectForProvisionalNavigation; >+ loaderClient.didFailProvisionalNavigation = didFailProvisionalNavigation; >+ loaderClient.didCommitNavigation = didCommitNavigation; >+ loaderClient.didFinishNavigation = didFinishNavigation; >+ loaderClient.didFailNavigation = didFailNavigation; >+ loaderClient.canAuthenticateAgainstProtectionSpace = canAuthenticateAgainstProtectionSpace; >+ loaderClient.didReceiveAuthenticationChallenge = didReceiveAuthenticationChallenge; >+ loaderClient.webProcessDidCrash = processDidCrash; > >- WKPageSetPageLoaderClient(toAPI(&page), &loaderClient.base); >+ WKPageSetPageNavigationClient(toAPI(&page), &loaderClient.base); > } > > static WKPolicyDecisionHandler makePolicyDecisionBlock(WKFramePolicyListenerRef listener) >@@ -597,7 +532,7 @@ - (void)setLoadDelegate:(id <WKBrowsingC > if (loadDelegate) > setUpPageLoaderClient(self, *_page); > else >- WKPageSetPageLoaderClient(toAPI(_page.get()), nullptr); >+ WKPageSetPageNavigationClient(toAPI(_page.get()), nullptr); > } > > - (id <WKBrowsingContextPolicyDelegate>)policyDelegate >Index: Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextLoadDelegate.h >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextLoadDelegate.h (revision 235331) >+++ Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextLoadDelegate.h (working copy) >@@ -53,11 +53,11 @@ > /* Sent if the commited load fails. */ > - (void)browsingContextController:(WKBrowsingContextController *)sender didFailLoadWithError:(NSError *)error; > >-- (void)browsingContextControllerDidStartProgress:(WKBrowsingContextController *)sender; >-- (void)browsingContextController:(WKBrowsingContextController *)sender estimatedProgressChangedTo:(double)estimatedProgress; >-- (void)browsingContextControllerDidFinishProgress:(WKBrowsingContextController *)sender; >+- (void)browsingContextControllerDidStartProgress:(WKBrowsingContextController *)sender WK_API_DEPRECATED_WITH_REPLACEMENT("WKWebView.estimatedProgress", macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); >+- (void)browsingContextController:(WKBrowsingContextController *)sender estimatedProgressChangedTo:(double)estimatedProgress WK_API_DEPRECATED_WITH_REPLACEMENT("WKWebView.estimatedProgress", macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); >+- (void)browsingContextControllerDidFinishProgress:(WKBrowsingContextController *)sender WK_API_DEPRECATED_WITH_REPLACEMENT("WKWebView.estimatedProgress", macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); > >-- (void)browsingContextControllerDidChangeBackForwardList:(WKBrowsingContextController *)sender addedItem:(WKBackForwardListItem *)addedItem removedItems:(NSArray *)removedItems; >+- (void)browsingContextControllerDidChangeBackForwardList:(WKBrowsingContextController *)sender addedItem:(WKBackForwardListItem *)addedItem removedItems:(NSArray *)removedItems WK_API_DEPRECATED_WITH_REPLACEMENT("WKWebView.backForwardList", macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); > > @end >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
aestes
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188942
: 348073