RESOLVED FIXED 29644
[GTK] Add WEBKIT_LOAD_ERROR status
https://bugs.webkit.org/show_bug.cgi?id=29644
Summary [GTK] Add WEBKIT_LOAD_ERROR status
Xan Lopez
Reported 2009-09-22 09:09:20 PDT
Page loads can fail to be completed and reach WEBKIT_LOAD_FINISHED status (user cancels the load, non-existent URI, etc). At the moment the only way to figure out this is to connect to both notify::load-status and WebKitWebView::load-error, which is far from ideal IMHO. This patch adds a new load-status enum, WEBKIT_LOAD_ERROR, which indicates that some error happened and that the load was stopped. In this way it's still possible to handle the whole flow of the load by only connecting to a single signal. Tests included.
Attachments
loaderror.diff (9.32 KB, patch)
2009-09-22 09:15 PDT, Xan Lopez
jmalonzo: review+
xan.lopez: commit-queue-
Xan Lopez
Comment 1 2009-09-22 09:15:04 PDT
Created attachment 39926 [details] loaderror.diff
Gustavo Noronha (kov)
Comment 2 2009-09-22 10:05:47 PDT
Comment on attachment 39926 [details] loaderror.diff I like the idea. You have my half r+. I'll take this into consideration when re-submitting sub-resource load tracking.
Jan Alonzo
Comment 3 2009-09-22 12:09:27 PDT
(In reply to comment #1) > Created an attachment (id=39926) [details] > loaderror.diff Does this only appply to committed load errors?
Xan Lopez
Comment 4 2009-09-22 12:27:23 PDT
(In reply to comment #3) > (In reply to comment #1) > > Created an attachment (id=39926) [details] [details] > > loaderror.diff > > Does this only appply to committed load errors? Not really, when a URL does not exist we'll go from provisional to error directly. Why? BTW, I'm thinking that WEBKIT_LOAD_FAIL might be a better name than WEBKIT_LOAD_ERROR, since the dispatch is called didFailLoad. Opinions? :)
Xan Lopez
Comment 5 2009-09-22 12:30:28 PDT
(In reply to comment #4) > (In reply to comment #3) > > (In reply to comment #1) > > > Created an attachment (id=39926) [details] [details] [details] > > > loaderror.diff > > > > Does this only appply to committed load errors? > > Not really, when a URL does not exist we'll go from provisional to error > directly. Why? > > BTW, I'm thinking that WEBKIT_LOAD_FAIL might be a better name than > WEBKIT_LOAD_ERROR, since the dispatch is called didFailLoad. Opinions? :) On the other hand the existing signal is called 'load-error', hmmm... Naming things sucks.
Jan Alonzo
Comment 6 2009-09-22 12:44:35 PDT
Comment on attachment 39926 [details] loaderror.diff (In reply to comment #5) > (In reply to comment #4) > > (In reply to comment #3) > > > (In reply to comment #1) > > > > Created an attachment (id=39926) [details] [details] [details] [details] > > > > loaderror.diff > > > > > > Does this only appply to committed load errors? > > > > Not really, when a URL does not exist we'll go from provisional to error > > directly. Why? > > > > BTW, I'm thinking that WEBKIT_LOAD_FAIL might be a better name than > > WEBKIT_LOAD_ERROR, since the dispatch is called didFailLoad. Opinions? :) I prefer LOAD_FAIL. > On the other hand the existing signal is called 'load-error', hmmm... Naming > things sucks. Can we break API? Either way, r=me.
Xan Lopez
Comment 7 2009-09-24 05:55:11 PDT
Landed in r48719 renaming the status to LOAD_FAILED as discussed on IRC.
Note You need to log in before you can comment on or make changes to this bug.