After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 686467 - Download widget is always added to first window in WebKit2
Download widget is always added to first window in WebKit2
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Backend
3.5.x
Other Linux
: Normal normal
: ---
Assigned To: Xan Lopez
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-10-19 13:57 UTC by Carlos Garcia Campos
Modified: 2013-01-04 10:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Make EphyDownload:window a construct only property (11.42 KB, patch)
2012-10-25 15:58 UTC, Carlos Garcia Campos
none Details | Review
Create the download with the window of the web vie that initiated the download (1.59 KB, patch)
2012-10-25 15:58 UTC, Carlos Garcia Campos
none Details | Review
Update: Make EphyDownload:window a construct only property (11.45 KB, patch)
2012-11-26 10:29 UTC, Carlos Garcia Campos
committed Details | Review
Update: Create the download with the window of the web vie that initiated the download (1.63 KB, patch)
2012-11-26 10:30 UTC, Carlos Garcia Campos
committed Details | Review

Description Carlos Garcia Campos 2012-10-19 13:57:52 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
Comment 1 Carlos Garcia Campos 2012-10-25 15:58:02 UTC
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.
Comment 2 Carlos Garcia Campos 2012-10-25 15:58:53 UTC
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.
Comment 3 Carlos Garcia Campos 2012-11-26 10:29:15 UTC
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)
Comment 4 Carlos Garcia Campos 2012-11-26 10:30:00 UTC
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)
Comment 5 Xan Lopez 2013-01-03 16:27:53 UTC
Review of attachment 229889 [details] [review]:

OK.
Comment 6 Xan Lopez 2013-01-03 16:30:31 UTC
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.