[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
HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
  html, body { height: 100%; margin: 0px; padding: 0px; }
  #content { width: 100%; height: 100%; }
</style>
</head>
<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 -->
    </svg>
  </div>
</body>
</html>

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