[webkit-gtk] Webkit Scrollbar

Gustavo Noronha Silva gns at gnome.org
Wed May 18 07:52:58 PDT 2011


On Wed, 2011-05-18 at 09:56 -0400, Calvin Morrison wrote:
> > Can you be more specific? What do you mean with it not respecting that
> > policy?
> 
> The Scrollbars still are displayed when even when set to
> GTK_POLICY_NEVER, so the policy isn't effecting the bars for some
> reason.
> 
> strangely enough GTK_POLICY_ALWAYS and GTK_POLICY_AUTOMATIC both seem
> to work as expected.

So, let me explain a bit about how this works and you'll probably
understand what's going on in your case. There are two types of
scrollbars in our current WebKitGTK+ widget: scrollbars operated and
painted by WebKit and scrollbars operated and painted by
GtkScrolledWindow.

The GtkScrolledWindow policy only affects GtkScrolledWindow's
scrollbars. Some pages, though, never use GtkScrolledWindow's
scrollbars, they use tricks to make the page be sized to the exact size
of the browser tab and then make their content block overflow, causing
WebKit scrollbars to appear (as they would in any overflown div).

That is for instance what gmail does and I don't think there's a lot
that WebKitGTK+ can do for that case other than perhaps implementing
frame flattening, but we'd have to investigate whether it really helps
in your case.

Cheers,
-- 
Gustavo Noronha Silva <gns at gnome.org>
GNOME Project



More information about the webkit-gtk mailing list