Reviewed by Alice and Tim.
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Jan 2008 00:58:41 +0000 (00:58 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Jan 2008 00:58:41 +0000 (00:58 +0000)
        - try to fix GTK and Qt builds

        * platform/win/ScrollViewWin.cpp:
        (WebCore::ScrollView::scroll): Improve logic slightly for the case of
        vertical scrolling when there's no vertical scroll bar.

        * platform/gtk/ScrollViewGtk.cpp:
        (WebCore::ScrollView::scroll): Copy the code from Windows. Maybe this
        should be factored differently.
        * platform/qt/ScrollViewQt.cpp:
        (WebCore::ScrollView::scroll): Ditto.

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

WebCore/ChangeLog
WebCore/platform/gtk/ScrollViewGtk.cpp
WebCore/platform/qt/ScrollViewQt.cpp
WebCore/platform/win/ScrollViewWin.cpp

index 9f56e164969ab577dfdb28eae218d67c98d1a098..d8208dbda138f866a7038f7bf8262eff05660d4a 100644 (file)
@@ -1,3 +1,19 @@
+2008-01-02  Darin Adler  <darin@apple.com>
+
+        Reviewed by Alice and Tim.
+
+        - try to fix GTK and Qt builds
+
+        * platform/win/ScrollViewWin.cpp:
+        (WebCore::ScrollView::scroll): Improve logic slightly for the case of
+        vertical scrolling when there's no vertical scroll bar.
+
+        * platform/gtk/ScrollViewGtk.cpp:
+        (WebCore::ScrollView::scroll): Copy the code from Windows. Maybe this
+        should be factored differently.
+        * platform/qt/ScrollViewQt.cpp:
+        (WebCore::ScrollView::scroll): Ditto.
+
 2008-01-02  Darin Adler  <darin@apple.com>
 
         Reviewed by Anders.
index 96a7f52a5e7526acdf98e062c86023ade0cef4ff..0b0cddac97fae9cd4a363c29eba369cd53f526e9 100644 (file)
@@ -774,12 +774,16 @@ void ScrollView::geometryChanged() const
         (*current)->geometryChanged();
 }
 
-void ScrollView::scroll(ScrollDirection direction, ScrollGranularity granularity)
+bool ScrollView::scroll(ScrollDirection direction, ScrollGranularity granularity)
 {
-    if  ((direction == ScrollUp || direction == ScrollDown) && m_data->vBar)
-        m_data->vBar->scroll(direction, granularity);
-    else if (m_data->hBar)
-        m_data->hBar->scroll(direction, granularity);
+    if (direction == ScrollUp || direction == ScrollDown) {
+        if (m_data->vBar)
+            return m_data->vBar->scroll(direction, granularity);
+    } else {
+        if (m_data->hBar)
+            return m_data->hBar->scroll(direction, granularity);
+    }
+    return false;
 }
 
 void ScrollView::addToDirtyRegion(const IntRect& containingWindowRect)
index 61ebdc0cd9aa911164107a229bc4ef9dfeca0558..341216924a8f575f7bc98b1310503339a9ecd787 100644 (file)
@@ -700,12 +700,16 @@ void ScrollView::wheelEvent(PlatformWheelEvent& e)
     scrollBy(-e.deltaX() * LINE_STEP, -e.deltaY() * LINE_STEP);
 }
 
-void ScrollView::scroll(ScrollDirection direction, ScrollGranularity granularity)
+bool ScrollView::scroll(ScrollDirection direction, ScrollGranularity granularity)
 {
-    if  ((direction == ScrollUp || direction == ScrollDown) && m_data->m_vBar)
-        m_data->m_vBar->scroll(direction, granularity);
-    else if (m_data->m_hBar)
-        m_data->m_hBar->scroll(direction, granularity);
+    if (direction == ScrollUp || direction == ScrollDown) {
+        if (m_data->m_vBar)
+            return m_data->m_vBar->scroll(direction, granularity);
+    } else {
+        if (m_data->m_hBar)
+            return m_data->m_hBar->scroll(direction, granularity);
+    }
+    return false;
 }
 
 IntRect ScrollView::windowResizerRect()
index 893696dab905525d75c4d9acb4f7578ec63f03f3..c7b191f27fad40e3f1bdae60ce6a909296e4d67c 100644 (file)
@@ -691,10 +691,14 @@ void ScrollView::geometryChanged() const
 
 bool ScrollView::scroll(ScrollDirection direction, ScrollGranularity granularity)
 {
-    if  ((direction == ScrollUp || direction == ScrollDown) && m_data->m_vBar)
-        return m_data->m_vBar->scroll(direction, granularity);
-    else if (m_data->m_hBar)
-        return m_data->m_hBar->scroll(direction, granularity);
+    if (direction == ScrollUp || direction == ScrollDown) {
+        if (m_data->m_vBar)
+            return m_data->m_vBar->scroll(direction, granularity);
+    } else {
+        if (m_data->m_hBar)
+            return m_data->m_hBar->scroll(direction, granularity);
+    }
+    return false;
 }
 
 IntRect ScrollView::windowResizerRect()