<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>16520</bug_id>
          
          <creation_ts>2007-12-19 16:11:04 -0800</creation_ts>
          <short_desc>[GTK] Acid2 has scrollbar; doesn&apos;t quite pass the test</short_desc>
          <delta_ts>2009-06-12 00:03:44 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Gtk</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alp Toker">alp</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>alp</cc>
    
    <cc>jmalonzo</cc>
    
    <cc>marco.barisione</cc>
    
    <cc>mrowe</cc>
    
    <cc>webkit</cc>
    
    <cc>zecke</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>64767</commentid>
    <comment_count>0</comment_count>
    <who name="Alp Toker">alp</who>
    <bug_when>2007-12-19 16:11:04 -0800</bug_when>
    <thetext>Acid2 rendering works but the scrollbar is expected to be hidden since the test sets overflow: hidden -- however it&apos;s still visible in the GTK+ port.

A brief look suggested the issue was not in ChromeClientGtk but rather in or around ScrollViewGtk.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64801</commentid>
    <comment_count>1</comment_count>
    <who name="Bert JW Regeer">webkit</who>
    <bug_when>2007-12-20 05:40:04 -0800</bug_when>
    <thetext>16526

is the same thing. Happens on Mac OS  X as well, not limited to just GTK.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64818</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-12-20 08:21:58 -0800</bug_when>
    <thetext>Bug 16526 is not related to this at all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74241</commentid>
    <comment_count>3</comment_count>
    <who name="Marco Barisione">marco.barisione</who>
    <bug_when>2008-03-18 05:38:02 -0700</bug_when>
    <thetext>The problem is visible when you are using real GTK scrollbars but not when you are using ScrollViewScrollbar (such as when the page with overflow:hidden is inside an iframe).

Fixing the overflow:hidden bug is easy, you only have to set the GtkAdjustament so that the GtkScrolledWindow thinks that everything fits in a the page.

Instead it isn&apos;t so easy to fix the problem when using overflow:scroll as you cannot easily force the scrolled window to have the scroll bars even if not needed.

I can see two solutions:
1) Emit a signal from the webview to ask for a change in the scroll bar visibility policy. This sucks because you have to add code everytime you use a WebView.
2) Try to access the parent and if it&apos;s a scrolled view change the scrollbar policy. This sucks because it&apos;s just a workaround.

Suggestions?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74242</commentid>
    <comment_count>4</comment_count>
      <attachid>19862</attachid>
    <who name="Marco Barisione">marco.barisione</who>
    <bug_when>2008-03-18 05:50:45 -0700</bug_when>
    <thetext>Created attachment 19862
Possible fix for the problem with overflow:hidden but not with overflow:scroll</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78368</commentid>
    <comment_count>5</comment_count>
      <attachid>20715</attachid>
    <who name="Jan Alonzo">jmalonzo</who>
    <bug_when>2008-04-20 22:49:32 -0700</bug_when>
    <thetext>Created attachment 20715
acid 2 and regression fix

This patch makes the test pass. Also fixes a regression where new pages maintain the last page&apos;s scroll position instead of resetting the position to the top of the page.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78375</commentid>
    <comment_count>6</comment_count>
      <attachid>20715</attachid>
    <who name="Alp Toker">alp</who>
    <bug_when>2008-04-21 00:24:08 -0700</bug_when>
    <thetext>Comment on attachment 20715
acid 2 and regression fix

The frameView-&gt;setGtkAdjustments() tells the WebView to use the provided GtkScrolledWindow. Without it, WebKit falls back to its own scrollbars which isn&apos;t what we want (but they do work better).

This also causes a hang when resizing http://www.google.com/

Not sure this is the right approach.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78378</commentid>
    <comment_count>7</comment_count>
    <who name="Jan Alonzo">jmalonzo</who>
    <bug_when>2008-04-21 01:06:04 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; (From update of attachment 20715 [edit])
&gt; The frameView-&gt;setGtkAdjustments() tells the WebView to use the provided
&gt; GtkScrolledWindow. Without it, WebKit falls back to its own scrollbars which
&gt; isn&apos;t what we want (but they do work better).

Hi alp. So the gtk port&apos;s is different from qt or win in this regard (removing those two lines matches the qt and win&apos;s impl for example)? From what I understand that line gets the WebView&apos;s adjustment and uses that Adjustment to the new FrameView (hence when you go to a new page the scroll position doesn&apos;t move).

Am I missing something? Do you have any idea where I should be looking at?

&gt; 
&gt; This also causes a hang when resizing http://www.google.com/

I doesn&apos;t hang here :-\ .

&gt; 
&gt; Not sure this is the right approach.

Thanks anyway. Any pointers will surely help.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78386</commentid>
    <comment_count>8</comment_count>
    <who name="Marco Barisione">marco.barisione</who>
    <bug_when>2008-04-21 03:37:43 -0700</bug_when>
    <thetext>Alp, the problem is that there is not way (or better, no clean way) to fully control the gtk scrollbars from inside the WebView.

Do we really need to use the scroll bars created by the scrolled view?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78387</commentid>
    <comment_count>9</comment_count>
    <who name="Alp Toker">alp</who>
    <bug_when>2008-04-21 04:20:13 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; Alp, the problem is that there is not way (or better, no clean way) to fully
&gt; control the gtk scrollbars from inside the WebView.
&gt; 
&gt; Do we really need to use the scroll bars created by the scrolled view?
&gt; 

It&apos;s a design decision to follow GTK+ convention as closely as possible. If the widget was created within a GtkScrolledWindow we need to respect that and can deliver chrome changes by getting at the container widget and conditionally modifying the scrollbar policy in the case that it&apos;s a GtkScrolledWindow.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78433</commentid>
    <comment_count>10</comment_count>
    <who name="Marco Barisione">marco.barisione</who>
    <bug_when>2008-04-21 11:35:39 -0700</bug_when>
    <thetext>(In reply to comment #9)
&gt; It&apos;s a design decision to follow GTK+ convention as closely as possible. If the
&gt; widget was created within a GtkScrolledWindow we need to respect that and can
&gt; deliver chrome changes by getting at the container widget and conditionally
&gt; modifying the scrollbar policy in the case that it&apos;s a GtkScrolledWindow.

Don&apos;t you think it&apos;s a bit hacky? IMO if we implement it we should change the policy type only if it was set to GTK_POLICY_AUTOMATIC, so we don&apos;t override the explicit request to have or not to have the scrollbars.

What should I do in the case of overflow:hidden? Modify the adjustament (it seems to always work well and can be used even if we are not using a scrolled window but it could break something) or use the same trick used for overflow:scroll?
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78633</commentid>
    <comment_count>11</comment_count>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2008-04-23 02:08:01 -0700</bug_when>
    <thetext>(In reply to comment #10)

&gt; Don&apos;t you think it&apos;s a bit hacky?

When I was implementing it I looked at GtkScrolledWindow and http://library.gnome.org/devel/gtk/2.6/GtkWidget.html#gtk-widget-set-scroll-adjustments. So no I don&apos;t think it is hacky but the only documented way to implement scrolling. I&apos;m always willing to update my knowledge and change my mind.

&gt; What should I do in the case of overflow:hidden? Modify the adjustament (it
&gt; seems to always work well and can be used even if we are not using a scrolled
&gt; window but it could break something) or use the same trick used for
&gt; overflow:scroll?

WebCore should handle it. In fact the only thing that changed is that the GtkAdjustmets get set at a later point in time (e.g. after a load has started). But even then updateScrollbars is called. So maybe one must force a layout again?

To reiterate. It is about time to use the LayoutTests of WebKit, there are tests for parts of ACID2, e.g. I wonder if I should ask for a reduction of this bug or if we already have one in the LayoutTests. If we have a reduction and the result is different with the FrameView change and without it I can look at it.

The two patches so far don&apos;t look quite right. The ScrollBar code is &apos;shared&apos; with the windows port and it is unlikely we need that change but windows doesn&apos;t (only if Safari is broken as well). Not setting the GtkAdjustments is not the right thing to do for the already existing comments.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125442</commentid>
    <comment_count>12</comment_count>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2009-06-12 00:03:44 -0700</bug_when>
    <thetext>This seems to be fixed now. Don&apos;t know what fixed it but I&apos;m closing the bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>19862</attachid>
            <date>2008-03-18 05:50:45 -0700</date>
            <delta_ts>2008-03-18 05:50:45 -0700</delta_ts>
            <desc>Possible fix for the problem with overflow:hidden but not with overflow:scroll</desc>
            <filename>hidden-scrollbars.patch</filename>
            <type>text/plain</type>
            <size>1374</size>
            <attacher name="Marco Barisione">marco.barisione</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvcGxhdGZvcm0vZ3RrL1Njcm9sbFZpZXdHdGsuY3BwCj09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0K
LS0tIFdlYkNvcmUvcGxhdGZvcm0vZ3RrL1Njcm9sbFZpZXdHdGsuY3BwCShyZXZpc2lvbmUgMzEx
MjEpCisrKyBXZWJDb3JlL3BsYXRmb3JtL2d0ay9TY3JvbGxWaWV3R3RrLmNwcAkoY29waWEgbG9j
YWxlKQpAQCAtNTg1LDcgKzU4NSwxMCBAQAogICAgIHNjcm9sbC5jbGFtcE5lZ2F0aXZlVG9aZXJv
KCk7CiAKICAgICBpZiAobV9kYXRhLT5ob3Jpem9udGFsQWRqdXN0bWVudCkgewotICAgICAgICBt
X2RhdGEtP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gPSB2aXNpYmxlSGVpZ2h0KCk7CiAgICAgICAgIG1fZGF0YS0+dmVydGljYWxB
ZGp1c3RtZW50LT5zdGVwX2luY3JlbWVudCA9IHZpc2libGVIZWlnaHQoKSAvIDEwLjA7CiAgICAg
ICAgIG1fZGF0YS0+dmVydGljYWxBZGp1c3RtZW50LT5wYWdlX2luY3JlbWVudCA9IHZpc2libGVI
ZWlnaHQoKSAqIDAuOTsKICAgICAgICAgbV9kYXRhLT52ZXJ0aWNhbEFkanVzdG1lbnQtPmxvd2Vy
ID0gMDsK
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>20715</attachid>
            <date>2008-04-20 22:49:32 -0700</date>
            <delta_ts>2008-04-21 00:24:08 -0700</delta_ts>
            <desc>acid 2 and regression fix</desc>
            <filename>webkitgtk-acid2-fix.patch</filename>
            <type>text/plain</type>
            <size>1562</size>
            <attacher name="Jan Alonzo">jmalonzo</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYktpdC9ndGsvQ2hhbmdlTG9nIGIvV2ViS2l0L2d0ay9DaGFuZ2VMb2cK
aW5kZXggMzI0MjE4Ni4uNjBjNDc3OSAxMDA2NDQKLS0tIGEvV2ViS2l0L2d0ay9DaGFuZ2VMb2cK
KysrIGIvV2ViS2l0L2d0ay9DaGFuZ2VMb2cKQEAgLTEsMyArMSwxNyBAQAorMjAwOC0wNC0yMCAg
SmFuIE1pY2hhZWwgQWxvbnpvICA8am1hbG9uem9AdW5wbHVnZ2FibGUuY29tPgorCisgICAgICAg
IFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIGh0dHA6Ly9idWdzLndlYmtp
dC5vcmcvc2hvd19idWcuY2dpP2lkPTE2NTIwCisgICAgICAgIFtHVEtdIEFjaWQyIGhhcyBzY3Jv
bGxiYXI7IGRvZXNuJ3QgcXVpdGUgcGFzcyB0aGUgdGVzdAorCisgICAgICAgIFRoaXMgcGF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2F0aW9uLndpZHRoLAog
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdUS19XSURHRVQoY29udGFpbmluZ1dpbmRv
dyktPmFsbG9jYXRpb24uaGVpZ2h0KTsKICAgICAgICAgZnJhbWVWaWV3ID0gbmV3IEZyYW1lVmll
dyhmcmFtZSwgc2l6ZSk7Ci0gICAgICAgIFdlYktpdFdlYlZpZXdQcml2YXRlKiBwcml2ID0gV0VC
S0lUX1dFQl9WSUVXX0dFVF9QUklWQVRFKGNvbnRhaW5pbmdXaW5kb3cpOwotICAgICAgICBmcmFt
ZVZpZXctPnNldEd0a0FkanVzdG1lbnRzKHByaXYtPmhvcml6b250YWxBZGp1c3RtZW50LCBwcml2
LT52ZXJ0aWNhbEFkanVzdG1lbnQpOwogICAgIH0gZWxzZQogICAgICAgICBmcmFtZVZpZXcgPSBu
ZXcgRnJhbWVWaWV3KGZyYW1lKTsKIAo=
</data>
<flag name="review"
          id="9055"
          type_id="1"
          status="-"
          setter="alp"
    />
          </attachment>
      

    </bug>

</bugzilla>