[webkit-gtk] Breaking the API/ABI for 2.6

Adrian Perez de Castro aperez at igalia.com
Fri Jun 6 02:16:09 PDT 2014


Carlos Garcia Campos <cgarcia at igalia.com> writes:

>   - Remove WebKitWebViewGroup. Anders Carlsson told me the other day
> that WebPageGroup is going to be removed, in favor of sharing settings
> objects among different web views (like we did before, btw) and moving
> the user style sheets and user script to a different class
> (UserContentController). I think most of the WebKit2 users don't use web
> view groups at all (the default web view group is handled internally and
> transparently), so we could anticipate to this change and get rid of the
> WebKitWebViewGroup class.

JFTR:

As a matter of fact, I have already started working on a patch to
add WebKitUserContentController to the API, because it would be
needed anyway to implement support for user script messages.

User messages are a simple solution to let the web process send
messages to the UI process asynchronously: web content call the
“window.webkit.<name>.postMessage(value)” function, and the UI
process gets the value sent over IPC. In our API, after using a
method to register the “<name>” and make it available, messages
will cause the emission of a “script-message-received” signal
in the WebKitUserContentController. Signal handlers receive a
WebKitJavascriptResult with the value sent from the JS world.

This will make it possible to avoid having to use Web Extensions
for simple use cases where user script messages are enough — and
save time for developers migrating to WebKit2 now that WebKit1
is not developed anymore. Last but not least, let's not forget
that for the moment only we only load C/C++ Web Extensions and
no built-in support is available for other languages, so having
support for the user script messages API will benefit all the
languages with GObject-Introspection support.

Cheers,


-Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 180 bytes
Desc: not available
URL: <https://lists.webkit.org/pipermail/webkit-gtk/attachments/20140606/dbba1e73/attachment.sig>


More information about the webkit-gtk mailing list