When a request is converted to a download WebPageProxy calls handleDownloadRequest() and clients handle that to associate the web view to the download. When a download is started by a context menu action, WebPageProxy calls WebProcessPool::download() with this as initiatingPage parameter, but clients are not notified in this case.
Created attachment 293758 [details] Patch
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 293758 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=293758&action=review > Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp:1237 > + return download.leakRef(); Where is this ref adopted? Normally we leave a comment in situations like this. > Source/WebKit2/UIProcess/WebProcessPool.cpp:816 > + if (initiatingPage) > + initiatingPage->handleDownloadRequest(downloadProxy); We need an owner to approve this part. Alex?
Ping Owners?
Comment on attachment 293758 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=293758&action=review >> Source/WebKit2/UIProcess/WebProcessPool.cpp:816 >> + initiatingPage->handleDownloadRequest(downloadProxy); > > We need an owner to approve this part. Alex? I approve this part.
(In reply to comment #3) > Comment on attachment 293758 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=293758&action=review > > > Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp:1237 > > + return download.leakRef(); > > Where is this ref adopted? Normally we leave a comment in situations like > this. This is returned by public API in transfer-full methods. To clarify it, instead of adding a comment, I've changed it to leak the ref from webkit_web_context_download_uri() and webkit_web_view_download_uri(). > > Source/WebKit2/UIProcess/WebProcessPool.cpp:816 > > + if (initiatingPage) > > + initiatingPage->handleDownloadRequest(downloadProxy); > > We need an owner to approve this part. Alex?
Committed r208882: <http://trac.webkit.org/changeset/208882>