Roman Leonov
2012-02-11 09:46:33 UTC
I've continued porting luakit to webkit3 which had been started by
Nathan Hoad: https://github.com/nathan-hoad/luakit/tree/webkit3.
You can see results here: https://github.com/liaonau/luakit/tree/webkit3.
I've joined code from both webkit1 and webkit3 branches by using #if
GTK_CHECK_VERSION(3,0,0). You can compile lukit with libwebkit3 with
command
"USE_GTK3=1 make"
Also luakit can be compiled with -D{GTK,GDK,G}-DISABLE-DEPRECATED,
-D{GTK,GDK,G}-DISABLE-SINGLE-INCLUDES, -DGSEAL_ENABLE flags.
There are two things I want to discuss.
1. There is no entry->im_context property in GTK3. IMContext is
completely private. Therefore we can't use callback for signal
"commit" anymore. I've changed it to key_press callback which emits
"changes" if gtk_entry_im_context_filter_keypress() returns TRUE. I'm
not sure if it can be replacement for "commit".
2. Bug (more exactly feature) with a window which size appears to be
larger than size of screen caused by gtk_scrolled_window_set_policy()
to GTK_POLICY_NEVER. It seems that without scrolls webview allocates
size to fit whole content as if it can't scroll. Therefore policy is
always AUTOMATIC.
Scrolls are hidden (but not disabled as it would be with
GTK_POLICY_NEVER) by CSSProvider which is loaded from predefined
string. Provider is kept in the globalconf (I don't know if there is
more proper place to keep the pointer to the provider).
Should I pull request or some other improvements (for instance better
solutions of two things mentioned above) can be done before?
Nathan Hoad: https://github.com/nathan-hoad/luakit/tree/webkit3.
You can see results here: https://github.com/liaonau/luakit/tree/webkit3.
I've joined code from both webkit1 and webkit3 branches by using #if
GTK_CHECK_VERSION(3,0,0). You can compile lukit with libwebkit3 with
command
"USE_GTK3=1 make"
Also luakit can be compiled with -D{GTK,GDK,G}-DISABLE-DEPRECATED,
-D{GTK,GDK,G}-DISABLE-SINGLE-INCLUDES, -DGSEAL_ENABLE flags.
There are two things I want to discuss.
1. There is no entry->im_context property in GTK3. IMContext is
completely private. Therefore we can't use callback for signal
"commit" anymore. I've changed it to key_press callback which emits
"changes" if gtk_entry_im_context_filter_keypress() returns TRUE. I'm
not sure if it can be replacement for "commit".
2. Bug (more exactly feature) with a window which size appears to be
larger than size of screen caused by gtk_scrolled_window_set_policy()
to GTK_POLICY_NEVER. It seems that without scrolls webview allocates
size to fit whole content as if it can't scroll. Therefore policy is
always AUTOMATIC.
Scrolls are hidden (but not disabled as it would be with
GTK_POLICY_NEVER) by CSSProvider which is loaded from predefined
string. Provider is kept in the globalconf (I don't know if there is
more proper place to keep the pointer to the provider).
Should I pull request or some other improvements (for instance better
solutions of two things mentioned above) can be done before?