Bug 68508 - [GTK] Add WebKitError to GTK+ WebKit2 API
Summary: [GTK] Add WebKitError to GTK+ WebKit2 API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2011-09-21 01:16 PDT by Carlos Garcia Campos
Modified: 2011-09-28 09:20 PDT (History)
2 users (show)

See Also:


Attachments
Patch (9.18 KB, patch)
2011-09-21 01:20 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Updated patch (9.74 KB, patch)
2011-09-21 04:59 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Updated patch (12.25 KB, patch)
2011-09-28 02:46 PDT, Carlos Garcia Campos
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2011-09-21 01:16:25 PDT
We need at least network errors for the loader client
Comment 1 Carlos Garcia Campos 2011-09-21 01:20:39 PDT
Created attachment 108120 [details]
Patch
Comment 2 Carlos Garcia Campos 2011-09-21 04:59:55 PDT
Created attachment 108135 [details]
Updated patch

I forgot to add new headers to the main header in previous patch.
Comment 3 Carlos Garcia Campos 2011-09-28 02:46:19 PDT
Created attachment 108993 [details]
Updated patch

Patch updated to current git master.
Comment 4 WebKit Review Bot 2011-09-28 02:50:07 PDT
Attachment 108993 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit..." exit_code: 1

Source/WebKit2/UIProcess/API/gtk/WebKitError.cpp:26:  webkit_network_error_quark is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Source/WebKit2/UIProcess/API/gtk/WebKitError.h:39:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 2 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Martin Robinson 2011-09-28 08:00:56 PDT
Comment on attachment 108993 [details]
Updated patch

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

> Source/WebKit2/GNUmakefile.am:1019
> +			--fprod "\n/* enumerations from \"@filename@\" */" \

Please use: Enumerations from \"@filename@\."

> Source/WebKit2/UIProcess/API/gtk/WebKitError.cpp:2
> + * Copyright (C) 2008 Luca Bruno <lethalman88@gmail.com>

This should probably be our copyright.

> Source/WebKit2/UIProcess/API/gtk/WebKitError.cpp:29
> +GQuark webkit_network_error_quark(void)
> +{
> +    return g_quark_from_static_string(WebCore::errorDomainNetwork);
> +}

Please fix the style errors here. No need to have a "void" for an empty argument list.

> Source/WebKit2/UIProcess/API/gtk/WebKitError.h:2
> + * Copyright (C) 2008 Luca Bruno <lethalman88@gmail.com>

Ditto.

> Source/WebKit2/UIProcess/API/gtk/WebKitError.h:28
> +#define WEBKIT_NETWORK_ERROR webkit_network_error_quark ()

Is this a work-around for some issue or is it standard practice. If it's just a work-around I think we should just use webkit_network_error_quark everywhere.

> Source/WebKit2/UIProcess/API/gtk/WebKitError.h:35
> +    WEBKIT_NETWORK_ERROR_FAILED              = 399,
> +    WEBKIT_NETWORK_ERROR_TRANSPORT           = 300,
> +    WEBKIT_NETWORK_ERROR_UNKNOWN_PROTOCOL    = 301,
> +    WEBKIT_NETWORK_ERROR_CANCELLED           = 302,
> +    WEBKIT_NETWORK_ERROR_FILE_DOES_NOT_EXIST = 303

Please don't unalign these.
Comment 6 Carlos Garcia Campos 2011-09-28 09:16:35 PDT
(In reply to comment #5)
> (From update of attachment 108993 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=108993&action=review
> 
> > Source/WebKit2/GNUmakefile.am:1019
> > +			--fprod "\n/* enumerations from \"@filename@\" */" \
> 
> Please use: Enumerations from \"@filename@\."

Ok.

> 
> > Source/WebKit2/UIProcess/API/gtk/WebKitError.h:28
> > +#define WEBKIT_NETWORK_ERROR webkit_network_error_quark ()
> 
> Is this a work-around for some issue or is it standard practice. If it's just a work-around I think we should just use webkit_network_error_quark everywhere.

This is standard practice.

> > Source/WebKit2/UIProcess/API/gtk/WebKitError.h:35
> > +    WEBKIT_NETWORK_ERROR_FAILED              = 399,
> > +    WEBKIT_NETWORK_ERROR_TRANSPORT           = 300,
> > +    WEBKIT_NETWORK_ERROR_UNKNOWN_PROTOCOL    = 301,
> > +    WEBKIT_NETWORK_ERROR_CANCELLED           = 302,
> > +    WEBKIT_NETWORK_ERROR_FILE_DOES_NOT_EXIST = 303
> 
> Please don't unalign these.

Ok.
Comment 7 Carlos Garcia Campos 2011-09-28 09:20:08 PDT
Committed r96225: <http://trac.webkit.org/changeset/96225>