Currently the support in WebKit GTK to open new windows (via js, target=_blank, etc.) is very limited and buggy.
Created attachment 21254 [details] Allow more control on the creation of new windows I added a create-web-view signal so handlers can create and return a new web view. I also added WebKitWebViewRequest and WebKitWebWindowFeatures, containing information on the new web view (like the network request or the requested size). Initially the web view should be invisible and shown only after the emission of show-web-view. If no handlers handle this signal then the default action is to show the toplevel widget containing the web view.
Created attachment 21272 [details] Allow more control on the creation of new windows Same patch as before but I added a missing const.
Note that some things will not work (e.g. requiring via js a specific size for a window) because of bug #16881.
*** This bug has been marked as a duplicate of 19130 ***
Comment on attachment 21272 [details] Allow more control on the creation of new windows This is obsolete now, so no need to review.
(In reply to comment #5) > (From update of attachment 21272 [details] [edit]) > This is obsolete now, so no need to review. It seems that bug #16562 had code to fix this, but it was then pulled from that large patch in favor of this bug (comment 20 on that bug), and then this bug was obsoleted in favor of #16562. This is clearly a blocker for the use of WebKit on the GTK platform (without insane workarounds, it's impossible to open new windows, without this patch - Epiphany Webkit can't do it, etc.). Not sure what can be done (though this patch seems to do the job...), but /something/ needs to be done.
(In reply to comment #6) > This is clearly a blocker for the use of WebKit on the GTK platform (without > insane workarounds, it's impossible to open new windows, without this patch - > Epiphany Webkit can't do it, etc.). Agreed. > Not sure what can be done (though this patch seems to do the job...), but > /something/ needs to be done. What needs to be done is to get 16562 and 19130 (which has the current patch for implementing new windows, a merge from the one provided here with mine) reviewed and landed, in my opinion.