You need to
before you can comment on or make changes to this bug.
The initial idea of the loader client object exposed in the API was mainly to reduce the amount of signals of WebView. During the webkitgtk hackfest we were discussing the current API and agreed on moving to simpler API adding just two signals to WebView and making the current loader client private.
Created an attachment (id=119424) [details]
The code is simpler and the API easier to use. Now we also have only one condition for load finish. The patch doesn't include previous status in load-status-changed callback as agreed during the hackfest, because Martin has some doubts about it, it's better to add it later if we finally decide it's useful than remve it.
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
(From update of attachment 119424 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=119424&action=review
> + * @status: the #WebKitLoadStatus
I prefer @event: the #WebKitLoadEvent here. See below.
> +} WebKitLoadStatus;
So I think this should be renamed to WebKitLoadEvent since WEBKIT_LOAD_REDIRECTED is not really a status, but something that happened to us.
(In reply to comment #3)
> > Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h:71
> > +} WebKitLoadStatus;
> So I think this should be renamed to WebKitLoadEvent since WEBKIT_LOAD_REDIRECTED is not really a status, but something that happened to us.
hmm, good point!
(In reply to comment #4)
> (In reply to comment #3)
> > > Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h:71
> > > +} WebKitLoadStatus;
> > So I think this should be renamed to WebKitLoadEvent since WEBKIT_LOAD_REDIRECTED is not really a status, but something that happened to us.
> hmm, good point!
I guess we can go two ways here: try to make the enum represent a status or an events For instance if we used events, they enum values would be something like:
and the argument names would be something like previous_load_event instead of previous_load_status.
If we think of them as states we would have:
Personally, I prefer the 'event' structure because that's the interface that the C API gives us and I think it more closely matches what's happening within WebCore.
That's a great approach, Martin, I agree with you!
Created an attachment (id=120538) [details]
Renamed WebKitLoadStatus to WebKitLoadEvent. I also renamed load-status-changed signal as load-changed to avoid the word 'status' and for consistency with load-failed.
Created an attachment (id=120539) [details]
I forgot to include Tools/ChangeLog in previous patch
(From update of attachment 120539 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=120539&action=review
OK, looks good to me
> + * fail for transport issues such as not being able to
s/for/due to/ sounds better I think
Committed r103938: <http://trac.webkit.org/changeset/103938>