2011-03-10 Martin Robinson <mrobinson@igalia.com>
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Mar 2011 23:41:20 +0000 (23:41 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Mar 2011 23:41:20 +0000 (23:41 +0000)
        Reviewed by Xan Lopez.

        [GTK] [Webkit2] There are no scrollbars visible in the MiniBrowser
        https://bugs.webkit.org/show_bug.cgi?id=56125

        No new tests. This functionality will be tested once we have TestRunner
        implementation for WebKit2 with pixel dumping support.

        * GNUmakefile.am: Add a new define with tracks whether or not we are using
        our specialized GTK+ ScrollView.
        * platform/ScrollView.cpp: Only use the GTK+-specific ScrollView if we are compiling
        WebKit1.
        (WebCore::ScrollView::wheelEvent):
        * platform/gtk/ScrollViewGtk.cpp: Ditto.

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

Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.am
Source/WebCore/platform/ScrollView.cpp
Source/WebCore/platform/gtk/ScrollViewGtk.cpp

index 266c937..fb0394b 100644 (file)
@@ -1,3 +1,20 @@
+2011-03-10  Martin Robinson  <mrobinson@igalia.com>
+
+        Reviewed by Xan Lopez.
+
+        [GTK] [Webkit2] There are no scrollbars visible in the MiniBrowser
+        https://bugs.webkit.org/show_bug.cgi?id=56125
+
+        No new tests. This functionality will be tested once we have TestRunner
+        implementation for WebKit2 with pixel dumping support.
+
+        * GNUmakefile.am: Add a new define with tracks whether or not we are using
+        our specialized GTK+ ScrollView.
+        * platform/ScrollView.cpp: Only use the GTK+-specific ScrollView if we are compiling
+        WebKit1.
+        (WebCore::ScrollView::wheelEvent):
+        * platform/gtk/ScrollViewGtk.cpp: Ditto.
+
 2011-03-10  Kent Tamura  <tkent@chromium.org>
 
         Reviewed by Dimitri Glazkov.
index bac0944..c3ce9a5 100644 (file)
@@ -3880,6 +3880,10 @@ webcoregtk_sources += \
        Source/WebCore/platform/text/gtk/TextBreakIteratorGtk.cpp
 endif
 
+if !ENABLE_WEBKIT2
+FEATURE_DEFINES += WTF_USE_NATIVE_GTK_MAIN_FRAME_SCROLLBAR=1
+webcore_cppflags += -DWTF_USE_NATIVE_GTK_MAIN_FRAME_SCROLLBAR=1
+endif # END WEBKIT2
 
 # ---
 # Channel mesaging support
index 0f9c7d7..d765b93 100644 (file)
@@ -124,7 +124,7 @@ void ScrollView::setHasVerticalScrollbar(bool hasBar)
         axObjectCache()->handleScrollbarUpdate(this);
 }
 
-#if !PLATFORM(GTK)
+#if !USE(NATIVE_GTK_MAIN_FRAME_SCROLLBAR)
 PassRefPtr<Scrollbar> ScrollView::createScrollbar(ScrollbarOrientation orientation)
 {
     return Scrollbar::createNativeScrollbar(this, orientation, RegularScrollbar);
@@ -224,7 +224,7 @@ void ScrollView::setDelegatesScrolling(bool delegatesScrolling)
     m_delegatesScrolling = delegatesScrolling;
 }
 
-#if !PLATFORM(GTK)
+#if !USE(NATIVE_GTK_MAIN_FRAME_SCROLLBAR)
 IntRect ScrollView::visibleContentRect(bool includeScrollbars) const
 {
     if (platformWidget())
@@ -1167,7 +1167,7 @@ void ScrollView::setScrollOrigin(const IntPoint& origin, bool updatePositionAtAl
         updateScrollbars(scrollOffset());
 }
 
-#if !PLATFORM(WX) && !PLATFORM(GTK) && !PLATFORM(EFL)
+#if !PLATFORM(WX) && !USE(NATIVE_GTK_MAIN_FRAME_SCROLLBAR) && !PLATFORM(EFL)
 
 void ScrollView::platformInit()
 {
index c5f32f3..53cacf7 100644 (file)
@@ -31,6 +31,8 @@
 #include "config.h"
 #include "ScrollView.h"
 
+#if USE(NATIVE_GTK_MAIN_FRAME_SCROLLBAR)
+
 #include "ChromeClient.h"
 #include "FloatRect.h"
 #include "Frame.h"
@@ -44,7 +46,6 @@
 #include "PlatformMouseEvent.h"
 #include "PlatformWheelEvent.h"
 #include "ScrollbarTheme.h"
-
 #include <gtk/gtk.h>
 
 using namespace std;
@@ -228,3 +229,5 @@ void ScrollView::setScrollbarModes(ScrollbarMode horizontalMode, ScrollbarMode v
 }
 
 }
+
+#endif // USE(NATIVE_GTK_MAIN_FRAME_SCROLLBAR)