to handle the wheel event for the scroll view themselves can then
do so there. (Mac lets the underlying NSScrollView do it for now.)
* page/FrameView.cpp:
(WebCore::FrameView::handleWheelEvent):
* platform/ScrollView.h:
(WebCore::ScrollView::wheelEvent):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16485
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-09-20 David Hyatt <hyatt@apple.com>
+
+ Add a new wheelEvent method to ScrollView. Platforms that wish
+ to handle the wheel event for the scroll view themselves can then
+ do so there. (Mac lets the underlying NSScrollView do it for now.)
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::handleWheelEvent):
+ * platform/ScrollView.h:
+ (WebCore::ScrollView::wheelEvent):
+
2006-09-20 Brady Eidson <beidson@apple.com>
Reviewed by Tim Omernick
if (e.deltaY() && node->renderer()->scroll(e.deltaY() < 0 ? ScrollDown : ScrollUp, ScrollByWheel,
e.deltaY() < 0 ? -e.deltaY() : e.deltaY()))
e.accept();
+
+ if (!e.isAccepted())
+ wheelEvent(e);
}
}
}
namespace WebCore {
class FloatRect;
+ class PlatformWheelEvent;
class ScrollView : public Widget {
public:
bool inWindow() const;
+ // 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&) {};
+
#if __APPLE__
NSView* getDocumentView() const;
#endif