GNOME Bugzilla – Bug 686467
Download widget is always added to first window in WebKit2
Last modified: 2013-01-04 10:01:01 UTC
The problem is that in WebKit2 downloads are started by the web context, so we need API to get the web view associated to a download to show the widget in the window containing the web view that initiated the download. See https://bugs.webkit.org/show_bug.cgi?id=99836
Created attachment 227279 [details] [review] Make EphyDownload:window a construct only property It's always set right after the download object is created and it doesn't have any effect when it's set after the download has been added to the embed shell. This way we can make sure that when the download is added to the embed shell the parent window has already been set if there's any.
Created attachment 227280 [details] [review] Create the download with the window of the web vie that initiated the download Using webkit_download_get_web_view() and falling back to the active window if the download was not initiated by a web view.
Created attachment 229889 [details] [review] Update: Make EphyDownload:window a construct only property Patch updated after a60eb7cad58e17985e8a7908d5e90bab5fff6186 (ephy_shell_get_active_window() has been removed)
Created attachment 229890 [details] [review] Update: Create the download with the window of the web vie that initiated the download Patch updated after a60eb7cad58e17985e8a7908d5e90bab5fff6186 (ephy_shell_get_active_window() has been removed)
Review of attachment 229889 [details] [review]: OK.
Review of attachment 229890 [details] [review]: OK, makes sense. I wonder if it would make sense for the download to do all this stuff by default (say, when window is NULL), but don't care too much either way.