Bug 90479 - [EFL][WK2] Ewk_View should report load errors
Summary: [EFL][WK2] Ewk_View should report load errors
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks: 61838
  Show dependency treegraph
 
Reported: 2012-07-03 11:06 PDT by Chris Dumez
Modified: 2012-07-04 00:34 PDT (History)
5 users (show)

See Also:


Attachments
Patch (16.47 KB, patch)
2012-07-03 11:13 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (17.03 KB, patch)
2012-07-03 23:45 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (17.23 KB, patch)
2012-07-03 23:50 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2012-07-03 11:06:28 PDT
The Ewk_View should emit a "load,error" signal if the main frame fails loading.
Comment 1 Chris Dumez 2012-07-03 11:13:30 PDT
Created attachment 150647 [details]
Patch
Comment 2 Kenneth Rohde Christiansen 2012-07-03 21:33:29 PDT
Comment on attachment 150647 [details]
Patch

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

> Source/WebKit2/UIProcess/API/efl/ewk_web_error.cpp:108
> +Eina_Bool ewk_web_error_cancellation_get(const Ewk_Web_Error* error)

is_cancellation_get ? or maybe just is_cancellation

> Source/WebKit2/UIProcess/API/efl/ewk_web_error.h:51
> + * Query domain for this error.

That makes it quite hard for people to understand what this can actually represent; what kind of values etc. It is extensible true, but maybe an enum would fit better

> Source/WebKit2/UIProcess/API/efl/ewk_web_error.h:74
> +EAPI const char *ewk_web_error_url_get(const Ewk_Web_Error *error);

IS that the originating url? Maybe add comment

> Source/WebKit2/UIProcess/API/efl/ewk_web_error.h:81
> + * @return the error code.

error code for domain?
Comment 3 Chris Dumez 2012-07-03 23:10:02 PDT
Comment on attachment 150647 [details]
Patch

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

>> Source/WebKit2/UIProcess/API/efl/ewk_web_error.cpp:108
>> +Eina_Bool ewk_web_error_cancellation_get(const Ewk_Web_Error* error)
> 
> is_cancellation_get ? or maybe just is_cancellation

I'm not saying this looks great but I did it this way to follow the EFL API style. To name a few:
Eina_Bool evas_object_visible_get (const Evas_Object *obj);
Eina_Bool evas_object_focus_get (const Evas_Object *obj);
Eina_Bool evas_object_anti_alias_get (const Evas_Object *obj);

>> Source/WebKit2/UIProcess/API/efl/ewk_web_error.h:51
>> + * Query domain for this error.
> 
> That makes it quite hard for people to understand what this can actually represent; what kind of values etc. It is extensible true, but maybe an enum would fit better

Agreed. I'll look into it.

>> Source/WebKit2/UIProcess/API/efl/ewk_web_error.h:74
>> +EAPI const char *ewk_web_error_url_get(const Ewk_Web_Error *error);
> 
> IS that the originating url? Maybe add comment

Ok.

>> Source/WebKit2/UIProcess/API/efl/ewk_web_error.h:81
>> + * @return the error code.
> 
> error code for domain?

I'll use "HTTP error code" if it is alright.
Comment 4 Chris Dumez 2012-07-03 23:45:43 PDT
Created attachment 150719 [details]
Patch

Take Kenneth's feedback into consideration.
Comment 5 Chris Dumez 2012-07-03 23:50:44 PDT
Created attachment 150720 [details]
Patch

Rebase on master.
Comment 6 WebKit Review Bot 2012-07-04 00:34:02 PDT
Comment on attachment 150720 [details]
Patch

Clearing flags on attachment: 150720

Committed r121835: <http://trac.webkit.org/changeset/121835>
Comment 7 WebKit Review Bot 2012-07-04 00:34:09 PDT
All reviewed patches have been landed.  Closing bug.