Remove ScrollableArea::handleGestureEvent
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Feb 2012 18:53:50 +0000 (18:53 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Feb 2012 18:53:50 +0000 (18:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=78661

Reviewed by Adam Roben.

Source/WebCore:

ScrollableArea::handleGestureEvent ends up being a no-op so remove it and the related code.

* page/EventHandler.cpp:
(WebCore::EventHandler::handleGestureEvent):
* platform/ScrollAnimator.cpp:
* platform/ScrollAnimator.h:
(ScrollAnimator):
* platform/ScrollView.cpp:
(WebCore::ScrollView::wheelEvent):
* platform/ScrollView.h:
(ScrollView):
* platform/ScrollableArea.cpp:
* platform/ScrollableArea.h:
(ScrollableArea):

Source/WebKit/chromium:

Update for WebCore changes.

* src/WebPluginContainerImpl.cpp:
* src/WebPluginContainerImpl.h:
(WebPluginContainerImpl):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::gestureEvent):

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

12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/EventHandler.cpp
Source/WebCore/platform/ScrollAnimator.cpp
Source/WebCore/platform/ScrollAnimator.h
Source/WebCore/platform/ScrollView.cpp
Source/WebCore/platform/ScrollView.h
Source/WebCore/platform/ScrollableArea.cpp
Source/WebCore/platform/ScrollableArea.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
Source/WebKit/chromium/src/WebPluginContainerImpl.h
Source/WebKit/chromium/src/WebViewImpl.cpp

index 7cd8615..90bdc9a 100644 (file)
@@ -1,3 +1,25 @@
+2012-02-15  Anders Carlsson  <andersca@apple.com>
+
+        Remove ScrollableArea::handleGestureEvent
+        https://bugs.webkit.org/show_bug.cgi?id=78661
+
+        Reviewed by Adam Roben.
+
+        ScrollableArea::handleGestureEvent ends up being a no-op so remove it and the related code.
+
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::handleGestureEvent):
+        * platform/ScrollAnimator.cpp:
+        * platform/ScrollAnimator.h:
+        (ScrollAnimator):
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::wheelEvent):
+        * platform/ScrollView.h:
+        (ScrollView):
+        * platform/ScrollableArea.cpp:
+        * platform/ScrollableArea.h:
+        (ScrollableArea):
+
 2012-02-14  Stephen White  <senorblanco@chromium.org>
 
         Fix for incorrect/offset image in CSS filters (non-composited path)
index abcc517..8520fc6 100644 (file)
@@ -2362,16 +2362,9 @@ bool EventHandler::handleGestureEvent(const PlatformGestureEvent& gestureEvent)
         return true;
     }
     case PlatformEvent::GestureDoubleTap:
-        break;
     case PlatformEvent::GestureScrollBegin:
-    case PlatformEvent::GestureScrollEnd: {
-        FrameView* view = m_frame->view();
-        if (!view)
-            return false;
-
-        view->handleGestureEvent(gestureEvent);
-        return true;
-    }
+    case PlatformEvent::GestureScrollEnd:
+        break;
     default:
         ASSERT_NOT_REACHED();
     }
index 942363e..d4ded34 100644 (file)
@@ -122,12 +122,6 @@ bool ScrollAnimator::handleWheelEvent(const PlatformWheelEvent& e)
     return handled;
 }
 
-#if ENABLE(GESTURE_EVENTS)
-void ScrollAnimator::handleGestureEvent(const PlatformGestureEvent&)
-{
-}
-#endif
-
 FloatPoint ScrollAnimator::currentPosition() const
 {
     return FloatPoint(m_currentPosX, m_currentPosY);
index 2d1e9a3..814d674 100644 (file)
@@ -64,9 +64,6 @@ public:
     virtual void setIsActive() { }
 
     virtual bool handleWheelEvent(const PlatformWheelEvent&);
-#if ENABLE(GESTURE_EVENTS)
-    virtual void handleGestureEvent(const PlatformGestureEvent&);
-#endif
 
     FloatPoint currentPosition() const;
 
index 738c9e0..6a67140 100644 (file)
@@ -859,16 +859,6 @@ bool ScrollView::wheelEvent(const PlatformWheelEvent& e)
     return ScrollableArea::handleWheelEvent(e);
 }
 
-#if ENABLE(GESTURE_EVENTS)
-void ScrollView::gestureEvent(const PlatformGestureEvent& gestureEvent)
-{
-    if (platformWidget())
-        return;
-
-    ScrollableArea::handleGestureEvent(gestureEvent);
-}
-#endif
-
 void ScrollView::setFrameRect(const IntRect& newRect)
 {
     IntRect oldRect = frameRect();
index cb6ab4e..8560e0d 100644 (file)
@@ -239,9 +239,6 @@ public:
     // On Mac the underlying NSScrollView just does the scrolling, but on other platforms
     // (like Windows), we need this function in order to do the scroll ourselves.
     bool wheelEvent(const PlatformWheelEvent&);
-#if ENABLE(GESTURE_EVENTS)
-    void gestureEvent(const PlatformGestureEvent&);
-#endif
 
     IntPoint convertChildToSelf(const Widget* child, const IntPoint& point) const
     {
index e61bb0a..58ad242 100644 (file)
@@ -158,13 +158,6 @@ bool ScrollableArea::handleWheelEvent(const PlatformWheelEvent& wheelEvent)
     return scrollAnimator()->handleWheelEvent(wheelEvent);
 }
 
-#if ENABLE(GESTURE_EVENTS)
-void ScrollableArea::handleGestureEvent(const PlatformGestureEvent& gestureEvent)
-{
-    scrollAnimator()->handleGestureEvent(gestureEvent);
-}
-#endif
-
 // NOTE: Only called from Internals for testing.
 void ScrollableArea::setScrollOffsetFromInternals(const IntPoint& offset)
 {
index 0a2a164..8244ce8 100644 (file)
@@ -56,9 +56,6 @@ public:
     virtual bool requestScrollPositionUpdate(const IntPoint&) { return false; }
 
     bool handleWheelEvent(const PlatformWheelEvent&);
-#if ENABLE(GESTURE_EVENTS)
-    void handleGestureEvent(const PlatformGestureEvent&);
-#endif
 
     // Functions for controlling if you can scroll past the end of the document.
     bool constrainsScrollingToContentEdge() const { return m_constrainsScrollingToContentEdge; }
index a2db929..53adb7c 100644 (file)
@@ -1,3 +1,18 @@
+2012-02-15  Anders Carlsson  <andersca@apple.com>
+
+        Remove ScrollableArea::handleGestureEvent
+        https://bugs.webkit.org/show_bug.cgi?id=78661
+
+        Reviewed by Adam Roben.
+
+        Update for WebCore changes.
+
+        * src/WebPluginContainerImpl.cpp:
+        * src/WebPluginContainerImpl.h:
+        (WebPluginContainerImpl):
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::gestureEvent):
+
 2012-02-14  Takashi Toyoshima  <toyoshim@chromium.org>
 
         Provide SocketStreamHandleInternal::toWebSocketStreamHandle(SocketStreamHandle*).
index 129088e..d50f46d 100644 (file)
@@ -519,17 +519,6 @@ bool WebPluginContainerImpl::paintCustomOverhangArea(GraphicsContext* context, c
     return true;
 }
 
-#if ENABLE(GESTURE_EVENTS)
-bool WebPluginContainerImpl::handleGestureEvent(const WebCore::PlatformGestureEvent& gestureEvent)
-{
-    if (m_scrollbarGroup) {
-        m_scrollbarGroup->handleGestureEvent(gestureEvent);
-        return true;
-    }
-    return false;
-}
-#endif
-
 // Private methods -------------------------------------------------------------
 
 WebPluginContainerImpl::WebPluginContainerImpl(WebCore::HTMLPlugInElement* element, WebPlugin* webPlugin)
index 8d6794d..a2bdfe3 100644 (file)
@@ -150,10 +150,6 @@ public:
 
     bool paintCustomOverhangArea(WebCore::GraphicsContext*, const WebCore::IntRect&, const WebCore::IntRect&, const WebCore::IntRect&);
 
-#if ENABLE(GESTURE_EVENTS)
-    bool handleGestureEvent(const WebCore::PlatformGestureEvent&);
-#endif
-
 private:
     WebPluginContainerImpl(WebCore::HTMLPlugInElement* element, WebPlugin* webPlugin);
     ~WebPluginContainerImpl();
index 55b9a1d..3acf924 100644 (file)
@@ -612,14 +612,7 @@ bool WebViewImpl::mouseWheel(const WebMouseWheelEvent& event)
 bool WebViewImpl::gestureEvent(const WebGestureEvent& event)
 {
     PlatformGestureEventBuilder platformEvent(mainFrameImpl()->frameView(), event);
-    bool handled = mainFrameImpl()->frame()->eventHandler()->handleGestureEvent(platformEvent);
-
-    Frame* frame = mainFrameImpl()->frame();
-    WebPluginContainerImpl* pluginContainer = WebFrameImpl::pluginContainerFromFrame(frame);
-    if (pluginContainer)
-        handled |= pluginContainer->handleGestureEvent(platformEvent);
-
-    return handled;
+    return mainFrameImpl()->frame()->eventHandler()->handleGestureEvent(platformEvent);
 }
 
 void WebViewImpl::startPageScaleAnimation(const IntPoint& scroll, bool useAnchor, float newScale, double durationSec)