[webkit-gtk] WK2: WebKitWebViel scrolling

Carlos Garcia Campos cgarcia at igalia.com
Sun Jul 29 02:47:20 PDT 2012


El vie, 27-07-2012 a las 17:21 +0200, Julian Scheel escribió:
> Hi,

Hi, 

> I am just porting an application which we wrote with WebKit1 gtk API to
> the new WebKit2 API. While doing this I ran into some trouble with the
> scrolling behaviour. As of WebKit1 the WebKitWebView component did not
> seem to be scrollable at all, so one hat to contain it in a
> GtkScrolledWindow using a Viewport. 

you shouldn't need a viewport in WebKit1, just a GtkScrolledWindow,
since WebKitWebView implements GtkScrollable.

> Now WebKit2 seems to be scrollable
> itself.

Yes.

>  This would not be a problem, if if would implement the
> GtkScrollable interface, which it does not seem to do?

No, since it's scrollable by itself, you don't need to add the view to a
GtkScrolledWindow, and that's the reason why it doesn't implement the
GtkScrollable interface.

> Due to this it is not possible to embed the WebKitWebView in a
> GtkScrolledWindow anymore, which prevents us from using the nice
> features like kinetic-scrolling which GtkScrolledWindow provides as of
> gtk 3.4.

Those features will be implemented in WebKit itself. 

> So am I actually missing anything and what I want to do is still
> possible? Or should we try to patch the WebKitWebView to implement
> GtkScrollable?

We don't have enough information in the UI process about the scrollbars
to be able to implement the GtkScrollable interface. So, for now you can
just port your application to WebKit2 and those features will be added
in the future. If you want to contribute, it would be more useful to
work on adding touch and kinetic scrolling support to WebKit rather than
trying to make WebKitWebView implement the GtkScrollable interface.
Tomeu already has a patch to add initial touch support to WebKit clutter
that can be reused in WebKitGTK+.

Thanks for the feedback, feel free to ask here anything you need to port
your application or any comment about the new API.

> Regards,
> Julian

Regards, 

-- 
Carlos Garcia Campos
http://pgp.rediris.es:11371/pks/lookup?op=get&search=0xF3D322D0EC4582C3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20120729/a2ac8c50/attachment.sig>


More information about the webkit-gtk mailing list