When the WebKitDownload object is created with a live Handle, it also has a ResourceResponse object containing the suggested filename. For cases where download is started from scratch, even after the response is received the WebKitDownload's object notion of the suggested filename is not updated.
Created attachment 39203 [details] proposed solution
Will also add this, actually: diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp index 3d24598..617ce0b 100644 --- a/WebKit/gtk/webkit/webkitwebview.cpp +++ b/WebKit/gtk/webkit/webkitwebview.cpp @@ -2587,9 +2587,6 @@ void webkit_web_view_request_download(WebKitWebView* webView, WebKitNetworkReque else download = webkit_download_new(request); - if (!response.isNull() && !response.suggestedFilename().isEmpty()) - webkit_download_set_suggested_filename(download, response.suggestedFilename().utf8().data()); - gboolean handled; g_signal_emit(webView, webkit_web_view_signals[DOWNLOAD_REQUESTED], 0, download, &handled);
Comment on attachment 39203 [details] proposed solution r=me with the change in the comment.
Landed as r48183.