Bug 79667 - [GTK] Add method webkit_web_resource_get_data() to WebKit2 GTK+ API
Summary: [GTK] Add method webkit_web_resource_get_data() to WebKit2 GTK+ 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: 79477
Blocks: 79777
  Show dependency treegraph
 
Reported: 2012-02-27 06:34 PST by Carlos Garcia Campos
Modified: 2012-03-27 01:57 PDT (History)
2 users (show)

See Also:


Attachments
Patch (15.74 KB, patch)
2012-02-27 06:39 PST, Carlos Garcia Campos
gustavo: 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 2012-02-27 06:34:54 PST
And webkit_web_resource_get_data_finish() to finish the async operation.
Comment 1 Carlos Garcia Campos 2012-02-27 06:39:05 PST
Created attachment 129029 [details]
Patch
Comment 2 Gustavo Noronha (kov) 2012-02-28 06:43:37 PST
Comment on attachment 129029 [details]
Patch

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

+1

> Source/WebKit2/UIProcess/API/gtk/WebKitWebResource.cpp:346
> + *    of error. Set @length to a #gsize to get the length of the string.

I'd say 'if @length is not %NULL, the size of the data will be assigned to it', also, I would avoid using 'string' in any of these, because they are often not strings.
Comment 3 Carlos Garcia Campos 2012-02-28 06:45:25 PST
(In reply to comment #2)
> (From update of attachment 129029 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=129029&action=review
> 
> +1
> 
> > Source/WebKit2/UIProcess/API/gtk/WebKitWebResource.cpp:346
> > + *    of error. Set @length to a #gsize to get the length of the string.
> 
> I'd say 'if @length is not %NULL, the size of the data will be assigned to it', also, I would avoid using 'string' in any of these, because they are often not strings.

Indeed, I really meant the data not the string :-P
Comment 4 Carlos Garcia Campos 2012-03-06 04:41:34 PST
I haven't landed this yet, because it depends on bug #79477, a review would be appreciated :-)
Comment 5 Carlos Garcia Campos 2012-03-27 01:57:09 PDT
Committed r112227: <http://trac.webkit.org/changeset/112227>