Similar to the WK1 case, we need to wrap the core ResourceResponse::suggestedFilename() getter.
Created attachment 156024 [details] [GTK] Add WK2 API to get suggested filename for URI responses https://bugs.webkit.org/show_bug.cgi?id=92967 Reviewed by NOBODY (OOPS!). Webcore has API the suggested filename for a response, add a property and getter for it in WebKitURIResponse. * UIProcess/API/gtk/WebKitURIResponse.cpp: (_WebKitURIResponsePrivate): Add a CString holding the value. (webkitURIResponseGetProperty): Add the gobject bits for the property. (webkit_uri_response_class_init): Install the property. (webkit_uri_response_get_suggested_filename): New getter. * UIProcess/API/gtk/WebKitURIResponse.h: Declare the public method. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add the new API symbols.
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment on attachment 156024 [details] [GTK] Add WK2 API to get suggested filename for URI responses https://bugs.webkit.org/show_bug.cgi?id=92967 Looks good to me!
Comment on attachment 156024 [details] [GTK] Add WK2 API to get suggested filename for URI responses https://bugs.webkit.org/show_bug.cgi?id=92967 View in context: https://bugs.webkit.org/attachment.cgi?id=156024&action=review You should include a unit tests to check the new api added. > Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.cpp:255 > + * Returns: the suggested filename for @response, as specified by Don't use Returns: tag twice > Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.cpp:259 > + * Returns: (transfer none): the suggested filename or %NULL if none if none -> if not present > Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.cpp:260 > + * Since: 2.0 Don't add Since tags for wk2 gtk api, since we haven't released a first stable version yet. > Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.h:75 > +webkit_uri_response_get_suggested_filename (WebKitURIResponse *response); parameter name should also be aligned with other methods
(In reply to comment #4) > > Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.cpp:260 > > + * Since: 2.0 > > Don't add Since tags for wk2 gtk api, since we haven't released a first stable version yet. Are you planning to add them all at once before releasing? If you know the actual version that will be used when the new API is released (I presume 2.0), I think you should add them already. Otherwise you're in for a tedious and repetitive task.
(In reply to comment #5) > (In reply to comment #4) > > > > Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.cpp:260 > > > + * Since: 2.0 > > > > Don't add Since tags for wk2 gtk api, since we haven't released a first stable version yet. > > Are you planning to add them all at once before releasing? If you know the actual version that will be used when the new API is released (I presume 2.0), I think you should add them already. Otherwise you're in for a tedious and repetitive task. No, it will be added for new api added after 2.0, all other methods are supposed to be 2.0.
Created attachment 159063 [details] [GTK] Add WK2 API to get suggested filename for URI responses https://bugs.webkit.org/show_bug.cgi?id=92967 Reviewed by NOBODY (OOPS!). Webcore has API the suggested filename for a response, add a property and getter for it in WebKitURIResponse. * UIProcess/API/gtk/WebKitURIResponse.cpp: (_WebKitURIResponsePrivate): Add a CString holding the value. (webkitURIResponseGetProperty): Add the gobject bits for the property. (webkit_uri_response_class_init): Install the property. (webkit_uri_response_get_suggested_filename): New getter. * UIProcess/API/gtk/WebKitURIResponse.h: Declare the public method. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add the new API symbols.
Comment on attachment 159063 [details] [GTK] Add WK2 API to get suggested filename for URI responses https://bugs.webkit.org/show_bug.cgi?id=92967 View in context: https://bugs.webkit.org/attachment.cgi?id=159063&action=review > Source/WebKit2/ChangeLog:9 > + Webcore has API the suggested filename for a response, add a > + property and getter for it in WebKitURIResponse. I gues you mean Webcore has API *to get* the suggested filename > Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.cpp:260 > + * Returns: (transfer none): the suggested filename or %NULL if > + * the 'Content-Disposition' HTTP header is ot present. ot -> not
Created attachment 159108 [details] [GTK] Add WK2 API to get suggested filename for URI responses https://bugs.webkit.org/show_bug.cgi?id=92967 Reviewed by NOBODY (OOPS!). Webcore has API the suggested filename for a response, add a property and getter for it in WebKitURIResponse. * UIProcess/API/gtk/WebKitURIResponse.cpp: (_WebKitURIResponsePrivate): Add a CString holding the value. (webkitURIResponseGetProperty): Add the gobject bits for the property. (webkit_uri_response_class_init): Install the property. (webkit_uri_response_get_suggested_filename): New getter. * UIProcess/API/gtk/WebKitURIResponse.h: Declare the public method. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add the new API symbols.
Comment on attachment 159108 [details] [GTK] Add WK2 API to get suggested filename for URI responses https://bugs.webkit.org/show_bug.cgi?id=92967 Clearing flags on attachment: 159108 Committed r125910: <http://trac.webkit.org/changeset/125910>
All reviewed patches have been landed. Closing bug.