Bug 70846

Summary: Flesh out WKBrowsingContextLoadDelegate a bit
Product: WebKit Reporter: Sam Weinig <sam>
Component: New BugsAssignee: Sam Weinig <sam>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch andersca: review+

Description Sam Weinig 2011-10-25 13:49:19 PDT
Flesh out WKBrowsingContextLoadDelegate a bit
Comment 1 Sam Weinig 2011-10-25 13:50:13 PDT
Created attachment 112394 [details]
Patch
Comment 2 Anders Carlsson 2011-10-25 13:52:16 PDT
Comment on attachment 112394 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=112394&action=review

> Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm:218
> +    WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo;
> +    [browsingContext.loadDelegate browsingContextControllerDidReceiveServerRedirectForProvisionalLoad:browsingContext];
> +}

This does not check that the delegate responds to the selector. The code needs to do that, and possibly cache the result as well.

> Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm:257
> +    WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo;
> +    [browsingContext.loadDelegate browsingContextControllerDidFailLoad:browsingContext withError:(NSError *)cfError.get()];

Ditto.
Comment 3 Sam Weinig 2011-10-25 15:29:53 PDT
Created attachment 112415 [details]
Patch
Comment 4 Sam Weinig 2011-10-25 15:30:38 PDT
Now with a test!
Comment 5 Sam Weinig 2011-10-25 15:34:50 PDT
Committed r98399: <http://trac.webkit.org/changeset/98399>