[webkit-gtk] Webkit Scrollbar

Gavin Lambert gavinl at compacsort.com
Wed May 18 18:24:14 PDT 2011

Quoth Gustavo Noronha Silva:
> 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).

Not sure if this is related, but I noticed a while back that given this

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml">
<style type="text/css">
  html, body { height: 100%; margin: 0px; padding: 0px; }
  #content { width: 100%; height: 100%; }
<body style="height: 100%">
  <div id="content">
    <svg xmlns="http://www.w3.org/2000/svg" version="1.1"
         width="100%" height="100%"
         viewBox="0 0 1024 768"
         preserveAspectRatio="xMidYMid meet">
      <!-- some svg content here, irrelevant to current example -->

And with a similar GTK+ scroll policy, WebKit would display a 5px vertical
scrollbar.  Including "overflow: hidden" on the html style makes this go
away, but I wasn't sure why it was appearing in the first place.

It's not specific to WebKit, though -- Firefox does the same thing.

More information about the webkit-gtk mailing list