[webkit-gtk] Implement runOpenPanel in WebKit2GTK+

Mario Sanchez Prada msanchez at igalia.com
Tue Feb 14 19:45:03 PST 2012


On Tue, 2012-02-14 at 19:10 +0100, Simon Schampijer wrote:
> Hi Mario & others,
> 
> thanks a lot for your work on this track! This is the missing piece for 
> the path I took. I think it will work very well to pass the 
> WebKitFileChooserRequest request with the signal and then the app can 
> handle that, similar to the 'WebKitDownload' object that is passed with 
> "download-requested".

Glad to hear my work was useful to you too.

> So, about the signal naming, 'upload-requested' talks most to me so far, 
> at least in WebKit1 in WebKit2 that part seem to be a bit different. 
> 'run-filechooser' would be ok as well, I guess. In any case, happy to 
> see this moving forward.

If it's ok to you, I'd say that keeping the same name in WK1 and WK2 for
that signal would make sense. In that sense, please notice I named it
'run-file-chooser' (not 'run-filechooser'), just pointing it out.

Last, I've just attached my last patch for the WK2 implementation in
bugzilla, providing some changes since my last mail here:
https://bugs.webkit.org/show_bug.cgi?id=78491
(yes, no more mail attachments)

For the lazy ones, those changes were mainly:

 - Implemented unit tests, in TestWebKitWebView.cpp.

 - Implemented new function mouseButtonClick() in WebViewTest,
   to simulate button clicks through GdkEvent's (for unit test)

 - Consider the MIME handlers in the default handler for
   'run-file-chooser' provided by the WebView (to set a
   GtkFileFilter)

 - Migrated all the occurrences in the API of gchar**  to
   GSList*, for consistency. Also, to easy usage from apps,
   those functions returning GSList* will work on a [transfer
   none] basis, so the caller won't have to bother about
   freeing the GSList nor about its elements.

 - Make MiniBrowser use this API too, for easily testing it (it
   will connect to the 'run-file-chooser' signal and provide
   its own dialog).

 - Some fixes all around the patch

So that's all I think. It would be awesome if I could get some (informal
or not) review over the patch in bugzilla before Thursday, as I won't be
available tomorrow and would like to continue working on this (and
eventually finishing it!) when I get back.

Just one last thing: the patch still lacks gtk-doc documentation (or any
at all), so don't be surprised, it's on the plan to add it :-)

Thank you!
Mario




More information about the webkit-gtk mailing list