Bug 19143

Summary: [GTK] Improve the handling of new window requests
Product: WebKit Reporter: Marco Barisione <marco.barisione>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: gustavo, hortont424
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 16881    
Bug Blocks:    
Attachments:
Description Flags
Allow more control on the creation of new windows
none
Allow more control on the creation of new windows none

Description Marco Barisione 2008-05-20 06:25:47 PDT
Currently the support in WebKit GTK to open new windows (via js, target=_blank, etc.) is very limited and buggy.
Comment 1 Marco Barisione 2008-05-20 07:05:24 PDT
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.
Comment 2 Marco Barisione 2008-05-21 11:14:11 PDT
Created attachment 21272 [details]
Allow more control on the creation of new windows

Same patch as before but I added a missing const.
Comment 3 Marco Barisione 2008-05-22 10:21:04 PDT
Note that some things will not work (e.g. requiring via js a specific size for a window) because of bug #16881.
Comment 4 Marco Barisione 2008-05-23 03:17:50 PDT

*** This bug has been marked as a duplicate of 19130 ***
Comment 5 Christian Dywan 2008-06-20 10:54:09 PDT
Comment on attachment 21272 [details]
Allow more control on the creation of new windows

This is obsolete now, so no need to review.
Comment 6 Timothy P. Horton 2008-10-17 18:31:53 PDT
(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.
Comment 7 Gustavo Noronha (kov) 2008-10-18 14:43:38 PDT
(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.