2007-10-20 Jasper Bryant-Greene <m@ni.ac.nz>
authorbdash <bdash@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 20 Oct 2007 22:54:46 +0000 (22:54 +0000)
committerbdash <bdash@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 20 Oct 2007 22:54:46 +0000 (22:54 +0000)
        Reviewed by Maciej.

        Changed the hard-coded scroll delta in WheelEventGtk from 120 to 0.25,
        as suggested by George Wright in #15108 (which this patch will
        resolve).

        This gives a more sane scrolling behaviour, rather than the
        jumping to the end or start of the document as occurred previously.

        * platform/gtk/WheelEventGtk.cpp:
        (WebCore::PlatformWheelEvent::PlatformWheelEvent):

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

WebCore/ChangeLog
WebCore/platform/gtk/WheelEventGtk.cpp

index 82653fb..48a3bda 100644 (file)
@@ -1,3 +1,17 @@
+2007-10-20  Jasper Bryant-Greene  <m@ni.ac.nz>
+
+        Reviewed by Maciej.
+
+        Changed the hard-coded scroll delta in WheelEventGtk from 120 to 0.25,
+        as suggested by George Wright in #15108 (which this patch will
+        resolve).
+
+        This gives a more sane scrolling behaviour, rather than the
+        jumping to the end or start of the document as occurred previously.
+
+        * platform/gtk/WheelEventGtk.cpp:
+        (WebCore::PlatformWheelEvent::PlatformWheelEvent):
+
 2007-10-20  Alp Toker  <alp@atoker.com>
 
         Reviewed by Eric.
index 3c258d6..6ca981f 100644 (file)
@@ -34,17 +34,19 @@ namespace WebCore {
 
 PlatformWheelEvent::PlatformWheelEvent(GdkEventScroll* event)
 {
+    static const float delta = 0.25f;
+
     m_deltaX = 0;
     m_deltaY = 0;
 
     if (event->direction == GDK_SCROLL_UP)
-        m_deltaY = -120;
+        m_deltaY = -delta;
     else if (event->direction == GDK_SCROLL_LEFT)
-        m_deltaX = -120;
+        m_deltaX = -delta;
     else if (event->direction == GDK_SCROLL_RIGHT)
-        m_deltaX = 120;
+        m_deltaX = delta;
     else
-        m_deltaY = 120;
+        m_deltaY = delta;
 
     m_position = IntPoint((int)event->x, (int)event->y);
     m_globalPosition = IntPoint((int)event->x_root, (int)event->y_root);