Wheel scrolling prep for win32.
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Sep 2006 07:18:47 +0000 (07:18 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Sep 2006 07:18:47 +0000 (07:18 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16493 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/PlatformWheelEvent.h
WebCore/platform/ScrollBar.h
WebCore/platform/ScrollView.h
WebCore/platform/mac/ScrollViewMac.mm
WebCore/rendering/RenderLayer.cpp

index acfe3fc44b5c7dc3fd2dbe7dbf35dc88fa881469..af3b54a1e07716dc934344aa01202e1f73c638f6 100644 (file)
@@ -1,3 +1,16 @@
+2006-09-21  David Hyatt <hyatt@apple.com>
+
+        Wheel scrolling prep for Win32.
+
+        WARNING: NO TEST CASES ADDED OR CHANGED
+
+        * platform/PlatformWheelEvent.h:
+        * platform/ScrollBar.h:
+        * platform/ScrollView.h:
+        * platform/mac/ScrollViewMac.mm:
+        (WebCore::ScrollView::wheelEvent):
+        * rendering/RenderLayer.cpp:
+
 2006-09-20  Timothy Hatcher  <timothy@apple.com>
 
         Reviewed by Hyatt.
index 357f02759f1e21e6bd6d43f17e6a5f45b85b94bb..dc8c2dbebf6859fb2317ab035f09cbf9d2798dc3 100644 (file)
@@ -36,6 +36,12 @@ class NSEvent;
 #endif
 #endif
 
+#if PLATFORM(WIN)
+typedef struct HWND__* HWND;
+typedef unsigned WPARAM;
+typedef long LPARAM;
+#endif
+
 #if PLATFORM(GDK)
 typedef union _GdkEvent GdkEvent;
 #endif
@@ -46,6 +52,7 @@ namespace WebCore {
     public:
         const IntPoint& pos() const { return m_position; }
         const IntPoint& globalPos() const { return m_globalPosition; }
+
         float deltaX() const { return m_deltaX; }
         float deltaY() const { return m_deltaY; }
 
@@ -66,7 +73,9 @@ namespace WebCore {
 #ifdef __APPLE__
         PlatformWheelEvent(NSEvent*);
 #endif
-
+#if PLATFORM(WIN)
+        PlatformWheelEvent(HWND, WPARAM, LPARAM);
+#endif
 #if PLATFORM(GDK)
         PlatformWheelEvent(GdkEvent*);
 #endif
index 01dbfa49d7e1bf83e9d5bf8d9e2bb96f8f2a801e..19660a5aa0f8837dde2353b0bc3e6c5fd859dd55 100644 (file)
@@ -32,6 +32,10 @@ class GraphicsContext;
 class IntRect;
 class ScrollBar;
 
+// These match the numbers we use over in WebKit (WebFrameView.m).
+#define LINE_STEP   40
+#define PAGE_KEEP   40
+
 enum ScrollDirection {
     ScrollUp,
     ScrollDown,
index fc02ecd03166a362f4053a97cd465cfefe0a969b..eeb236ccebc8bf65061d34a1d7b0a18df65c647b 100644 (file)
@@ -81,7 +81,7 @@ namespace WebCore {
         // This method exists for scrollviews that need to handle wheel events manually.
         // On Mac the underlying NSScrollView just does the scrolling, but on other platforms
         // (like Windows), we need this method in order to do the scroll ourselves.
-        void wheelEvent(PlatformWheelEvent&) {};
+        void wheelEvent(PlatformWheelEvent&);
 
 #if __APPLE__
         NSView* getDocumentView() const;
index af3808db7259d2679174d9b2a1710479ada3e4ef..21a530dd4c12773849794ef127d739a11f2b2a13 100644 (file)
@@ -422,4 +422,9 @@ bool ScrollView::inWindow() const
     return [getView() window];
 }
 
+void ScrollView::wheelEvent(PlatformWheelEvent&)
+{
+    // Do nothing.  NSScrollView handles doing the scroll for us.
+}
+
 }
index 97f434ba24706d3b24e97702db0cd9b85f6a18ab..4aa29432e7305eb77b53d7c1dfe315600a9b9e7d 100644 (file)
 #include "SVGNames.h"
 #endif
 
-// These match the numbers we use over in WebKit (WebFrameView.m).
-#define LINE_STEP   40
-#define PAGE_KEEP   40
-
 #define MIN_INTERSECT_FOR_REVEAL 32
 
 using namespace std;