2010-07-06 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
authorkov@webkit.org <kov@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Jul 2010 22:32:21 +0000 (22:32 +0000)
committerkov@webkit.org <kov@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Jul 2010 22:32:21 +0000 (22:32 +0000)
        Reviewed by Xan Lopez.

        [GTK] Scrollbars sometimes go dead and stop scrolling the view
        https://bugs.webkit.org/show_bug.cgi?id=41711

        Fixes GtkScrolledWindow scrollbars not actually scrolling the page
        in certain conditions. No tests because it is hard to reproduce,
        and depends on interaction with a widget that is outside of the
        WebView, which is tricky.

        * platform/gtk/ScrollViewGtk.cpp:
        (WebCore::ScrollView::setGtkAdjustments):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@62598 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/gtk/ScrollViewGtk.cpp

index 8c11618..fe3994c 100644 (file)
@@ -1,3 +1,18 @@
+2010-07-06  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
+
+        Reviewed by Xan Lopez.
+
+        [GTK] Scrollbars sometimes go dead and stop scrolling the view
+        https://bugs.webkit.org/show_bug.cgi?id=41711
+
+        Fixes GtkScrolledWindow scrollbars not actually scrolling the page
+        in certain conditions. No tests because it is hard to reproduce,
+        and depends on interaction with a widget that is outside of the
+        WebView, which is tricky.
+
+        * platform/gtk/ScrollViewGtk.cpp:
+        (WebCore::ScrollView::setGtkAdjustments):
+
 2010-07-06  Darin Adler  <darin@apple.com>
 
         Reviewed by Geoffrey Garen.
index 3edc7b0..e170bc3 100644 (file)
@@ -108,13 +108,16 @@ void ScrollView::setGtkAdjustments(GtkAdjustment* hadj, GtkAdjustment* vadj, boo
 
     // Reset the adjustments to a sane default
     if (m_horizontalAdjustment) {
+        // We may be lacking scrollbars when returning to a cached
+        // page, this kicks the page to recreate the scrollbars.
+        setHasVerticalScrollbar(true);
+        setHasHorizontalScrollbar(true);
+
         ScrollbarGtk* hScrollbar = reinterpret_cast<ScrollbarGtk*>(horizontalScrollbar());
-        if (hScrollbar)
-            hScrollbar->attachAdjustment(m_horizontalAdjustment);
+        hScrollbar->attachAdjustment(m_horizontalAdjustment);
 
         ScrollbarGtk* vScrollbar = reinterpret_cast<ScrollbarGtk*>(verticalScrollbar());
-        if (vScrollbar)
-            vScrollbar->attachAdjustment(m_verticalAdjustment);
+        vScrollbar->attachAdjustment(m_verticalAdjustment);
 
         // We used to reset everything to 0 here, but when page cache
         // is enabled we reuse FrameViews that are cached. Since their