WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
92878
[GTK] Add WebKitNetworkResponse::suggested-filename property
https://bugs.webkit.org/show_bug.cgi?id=92878
Summary
[GTK] Add WebKitNetworkResponse::suggested-filename property
Claudio Saavedra
Reported
2012-08-01 09:47:23 PDT
Webcore has API the suggested filename for a response, add a property and getter for it in WebKitNetworkResponse. Patch for WK1 follows.
Attachments
2012-08-01 Claudio Saavedra <csaavedra@igalia.com>
(7.18 KB, patch)
2012-08-01 09:48 PDT
,
Claudio Saavedra
no flags
Details
Formatted Diff
Diff
2012-08-01 Claudio Saavedra <csaavedra@igalia.com>
(7.43 KB, patch)
2012-08-01 10:24 PDT
,
Claudio Saavedra
no flags
Details
Formatted Diff
Diff
2012-08-01 Claudio Saavedra <csaavedra@igalia.com>
(7.43 KB, patch)
2012-08-01 10:39 PDT
,
Claudio Saavedra
no flags
Details
Formatted Diff
Diff
2012-08-01 Claudio Saavedra <csaavedra@igalia.com>
(7.42 KB, patch)
2012-08-02 00:45 PDT
,
Claudio Saavedra
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Claudio Saavedra
Comment 1
2012-08-01 09:48:59 PDT
Created
attachment 155825
[details]
2012-08-01 Claudio Saavedra <
csaavedra@igalia.com
> [GTK] Add WebKitNetworkResponse::suggested-filename property Need the bug URL (OOPS!). Reviewed by NOBODY (OOPS!). Webcore has API the suggested filename for a response, add a property and getter for it in WebKitNetworkResponse. * docs/webkitgtk-sections.txt: Add the symbols * webkit/webkitnetworkresponse.cpp: (_WebKitNetworkResponsePrivate): Add suggested_filename. (webkit_network_response_finalize): Free it on finalize (webkit_network_response_get_property): Add the getter call. (webkit_network_response_class_init): Install the property. (webkit_network_response_get_suggested_filename): New getter. * webkit/webkitnetworkresponse.h: Add the declaration to header file.
Martin Robinson
Comment 2
2012-08-01 09:52:27 PDT
Comment on
attachment 155825
[details]
2012-08-01 Claudio Saavedra <
csaavedra@igalia.com
> View in context:
https://bugs.webkit.org/attachment.cgi?id=155825&action=review
Looks good to me, apart from some style nits.
> Source/WebKit/gtk/webkit/webkitnetworkresponse.cpp:44 > +using namespace WebKit; > +
This should really be just below the header list.
> Source/WebKit/gtk/webkit/webkitnetworkresponse.cpp:174 > + (GParamFlags)(WEBKIT_PARAM_READABLE)));
Should use a C++ cast here.
> Source/WebKit/gtk/webkit/webkitnetworkresponse.cpp:287 > + g_return_val_if_fail(WEBKIT_IS_NETWORK_RESPONSE(response), NULL);
Instead of NULL use 0 in WebKit, unless it's the end of an argument list.
Carlos Garcia Campos
Comment 3
2012-08-01 09:59:06 PDT
Comment on
attachment 155825
[details]
2012-08-01 Claudio Saavedra <
csaavedra@igalia.com
> View in context:
https://bugs.webkit.org/attachment.cgi?id=155825&action=review
API looks good to me
>> Source/WebKit/gtk/webkit/webkitnetworkresponse.cpp:174 >> + (GParamFlags)(WEBKIT_PARAM_READABLE))); > > Should use a C++ cast here.
We don't need the cast, I think , since it's a single flag.
Carlos Garcia Campos
Comment 4
2012-08-01 10:01:35 PDT
Comment on
attachment 155825
[details]
2012-08-01 Claudio Saavedra <
csaavedra@igalia.com
> View in context:
https://bugs.webkit.org/attachment.cgi?id=155825&action=review
> Source/WebKit/gtk/webkit/webkitnetworkresponse.cpp:280 > + * Obtains the suggested filename for the given network response.
Maybe we could explain this is extracted from the Content-Disposition HTTP header, and that it might not be present
> Source/WebKit/gtk/webkit/webkitnetworkresponse.cpp:282 > + * Returns: (transfer none): the suggested filename
We should mention this can return NULL
Claudio Saavedra
Comment 5
2012-08-01 10:24:50 PDT
Created
attachment 155831
[details]
2012-08-01 Claudio Saavedra <
csaavedra@igalia.com
> [GTK] Add WebKitNetworkResponse::suggested-filename property Need the bug URL (OOPS!). Reviewed by NOBODY (OOPS!). Webcore has API the suggested filename for a response, add a property and getter for it in WebKitNetworkResponse. * docs/webkitgtk-sections.txt: Add the symbols * webkit/webkitnetworkresponse.cpp: (_WebKitNetworkResponsePrivate): Add suggested_filename. (webkit_network_response_finalize): Free it on finalize (webkit_network_response_get_property): Add the getter call. (webkit_network_response_class_init): Install the property. (webkit_network_response_get_suggested_filename): New getter. * webkit/webkitnetworkresponse.h: Add the declaration to header file.
Carlos Garcia Campos
Comment 6
2012-08-01 10:36:45 PDT
Comment on
attachment 155831
[details]
2012-08-01 Claudio Saavedra <
csaavedra@igalia.com
> View in context:
https://bugs.webkit.org/attachment.cgi?id=155831&action=review
> Source/WebKit/gtk/webkit/webkitnetworkresponse.cpp:173 > + NULL,
0 instead of NULL here too :-P
Claudio Saavedra
Comment 7
2012-08-01 10:39:39 PDT
Created
attachment 155837
[details]
2012-08-01 Claudio Saavedra <
csaavedra@igalia.com
> [GTK] Add WebKitNetworkResponse::suggested-filename property Need the bug URL (OOPS!). Reviewed by NOBODY (OOPS!). Webcore has API the suggested filename for a response, add a property and getter for it in WebKitNetworkResponse. * docs/webkitgtk-sections.txt: Add the symbols * webkit/webkitnetworkresponse.cpp: (_WebKitNetworkResponsePrivate): Add suggested_filename. (webkit_network_response_finalize): Free it on finalize (webkit_network_response_get_property): Add the getter call. (webkit_network_response_class_init): Install the property. (webkit_network_response_get_suggested_filename): New getter. * webkit/webkitnetworkresponse.h: Add the declaration to header file.
Carlos Garcia Campos
Comment 8
2012-08-02 00:30:13 PDT
Comment on
attachment 155837
[details]
2012-08-01 Claudio Saavedra <
csaavedra@igalia.com
> View in context:
https://bugs.webkit.org/attachment.cgi?id=155837&action=review
> Source/WebKit/gtk/webkit/webkitnetworkresponse.cpp:49 > + gchar* suggested_filename;
Sorry I didn't notice this before, and I wonder why the style checker haven't complained, but this should be suggestedFilename instead of suggested_filename.
Claudio Saavedra
Comment 9
2012-08-02 00:45:15 PDT
Created
attachment 155991
[details]
2012-08-01 Claudio Saavedra <
csaavedra@igalia.com
> [GTK] Add WebKitNetworkResponse::suggested-filename property Need the bug URL (OOPS!). Reviewed by NOBODY (OOPS!). Webcore has API the suggested filename for a response, add a property and getter for it in WebKitNetworkResponse. * docs/webkitgtk-sections.txt: Add the symbols * webkit/webkitnetworkresponse.cpp: (_WebKitNetworkResponsePrivate): Add suggested_filename. (webkit_network_response_finalize): Free it on finalize (webkit_network_response_get_property): Add the getter call. (webkit_network_response_class_init): Install the property. (webkit_network_response_get_suggested_filename): New getter. * webkit/webkitnetworkresponse.h: Add the declaration to header file.
Claudio Saavedra
Comment 10
2012-08-02 00:46:18 PDT
Comment on
attachment 155991
[details]
2012-08-01 Claudio Saavedra <
csaavedra@igalia.com
> Fixed the casing of the private variable for the suggested filename.
Xan Lopez
Comment 11
2012-08-02 01:46:40 PDT
Comment on
attachment 155991
[details]
2012-08-01 Claudio Saavedra <
csaavedra@igalia.com
> This looks good to me too!
WebKit Review Bot
Comment 12
2012-08-02 02:06:36 PDT
Comment on
attachment 155991
[details]
2012-08-01 Claudio Saavedra <
csaavedra@igalia.com
> Clearing flags on attachment: 155991 Committed
r124427
: <
http://trac.webkit.org/changeset/124427
>
WebKit Review Bot
Comment 13
2012-08-02 02:06:40 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug