Changeset 169460 in webkit
- Timestamp:
- May 29, 2014, 1:01:27 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r169458 r169460 1 2014-05-29 Dan Bernstein <mitz@apple.com> 2 3 [Cocoa] Can’t recover from subframe load errors 4 https://bugs.webkit.org/show_bug.cgi?id=133385 5 6 Reviewed by Anders Carlsson. 7 8 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method. 9 * UIProcess/Cocoa/NavigationState.h: Added flag in m_navigationDelegateMethods struct. 10 * UIProcess/Cocoa/NavigationState.mm: 11 (WebKit::NavigationState::setNavigationDelegate): Initialize 12 webViewNavigationDidFailProvisionalLoadInSubframeWithError flag in the delegate methods 13 struct. 14 (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame): If the 15 error occurred in a subframe, invoke the new delegate method. 16 1 17 2014-05-29 Geoffrey Garen <ggaren@apple.com> 2 18 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h
r168541 r169460 25 25 26 26 #import <WebKit/WKNavigationDelegate.h> 27 28 #import <WebKit/WKFrameInfo.h> 27 29 #import <WebKit/WKWebViewPrivate.h> 28 30 … … 36 38 37 39 @optional 40 41 - (void)_webView:(WKWebView *)webView navigation:(WKNavigation *)navigation didFailProvisionalLoadInSubframe:(WKFrameInfo *)subframe withError:(NSError *)error; 38 42 39 43 - (void)_webView:(WKWebView *)webView navigationDidFinishDocumentLoad:(WKNavigation *)navigation; -
trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h
r169016 r169460 138 138 bool webViewDidReceiveServerRedirectForProvisionalNavigation : 1; 139 139 bool webViewDidFailProvisionalNavigationWithError : 1; 140 bool webViewNavigationDidFailProvisionalLoadInSubframeWithError : 1; 140 141 bool webViewDidCommitNavigation : 1; 141 142 bool webViewNavigationDidFinishDocumentLoad : 1; -
trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm
r169016 r169460 124 124 m_navigationDelegateMethods.webViewDidFailNavigationWithError = [delegate respondsToSelector:@selector(webView:didFailNavigation:withError:)]; 125 125 126 m_navigationDelegateMethods.webViewNavigationDidFailProvisionalLoadInSubframeWithError = [delegate respondsToSelector:@selector(_webView:navigation:didFailProvisionalLoadInSubframe:withError:)]; 126 127 m_navigationDelegateMethods.webViewNavigationDidFinishDocumentLoad = [delegate respondsToSelector:@selector(_webView:navigationDidFinishDocumentLoad:)]; 127 128 m_navigationDelegateMethods.webViewRenderingProgressDidChange = [delegate respondsToSelector:@selector(_webView:renderingProgressDidChange:)]; … … 432 433 void NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame(WebPageProxy*, WebFrameProxy* webFrameProxy, uint64_t navigationID, const WebCore::ResourceError& error, API::Object*) 433 434 { 434 if (!webFrameProxy->isMainFrame()) 435 return; 435 if (!webFrameProxy->isMainFrame()) { 436 if (!m_navigationState.m_navigationDelegateMethods.webViewNavigationDidFailProvisionalLoadInSubframeWithError) 437 return; 438 439 auto navigationDelegate = m_navigationState.m_navigationDelegate.get(); 440 auto errorWithRecoveryAttempter = createErrorWithRecoveryAttempter(m_navigationState.m_webView, *webFrameProxy, error); 441 // FIXME: Get the main frame's current navigation. 442 [(id <WKNavigationDelegatePrivate>)navigationDelegate _webView:m_navigationState.m_webView navigation:nil didFailProvisionalLoadInSubframe:adoptNS([[WKFrameInfo alloc] initWithWebFrameProxy:*webFrameProxy]).get() withError:errorWithRecoveryAttempter.get()]; 443 444 return; 445 } 436 446 437 447 // FIXME: We should assert that navigationID is not zero here, but it's currently zero for navigations originating from the web process.
Note:
See TracChangeset
for help on using the changeset viewer.