Unreviewed, rolling out r107774.
authornoel.gordon@gmail.com <noel.gordon@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Feb 2012 06:00:36 +0000 (06:00 +0000)
committernoel.gordon@gmail.com <noel.gordon@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Feb 2012 06:00:36 +0000 (06:00 +0000)
http://trac.webkit.org/changeset/107774
https://bugs.webkit.org/show_bug.cgi?id=78661

Broke Chromium build

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

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

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

index ab47f07..4cd9a82 100644 (file)
@@ -1,3 +1,28 @@
+2012-02-14  Noel Gordon  <noel.gordon@gmail.com>
+
+        Unreviewed, rolling out r107774.
+        http://trac.webkit.org/changeset/107774
+        https://bugs.webkit.org/show_bug.cgi?id=78661
+
+        Broke Chromium build
+
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::handleGestureEvent):
+        * platform/ScrollAnimator.cpp:
+        (WebCore):
+        (WebCore::ScrollAnimator::handleGestureEvent):
+        * platform/ScrollAnimator.h:
+        (ScrollAnimator):
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::wheelEvent):
+        * platform/ScrollView.h:
+        (ScrollView):
+        * platform/ScrollableArea.cpp:
+        (WebCore):
+        (WebCore::ScrollableArea::handleGestureEvent):
+        * platform/ScrollableArea.h:
+        (ScrollableArea):
+
 2012-02-14  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r107766.
index 8520fc6..abcc517 100644 (file)
@@ -2362,9 +2362,16 @@ bool EventHandler::handleGestureEvent(const PlatformGestureEvent& gestureEvent)
         return true;
     }
     case PlatformEvent::GestureDoubleTap:
-    case PlatformEvent::GestureScrollBegin:
-    case PlatformEvent::GestureScrollEnd:
         break;
+    case PlatformEvent::GestureScrollBegin:
+    case PlatformEvent::GestureScrollEnd: {
+        FrameView* view = m_frame->view();
+        if (!view)
+            return false;
+
+        view->handleGestureEvent(gestureEvent);
+        return true;
+    }
     default:
         ASSERT_NOT_REACHED();
     }
index d4ded34..942363e 100644 (file)
@@ -122,6 +122,12 @@ 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 814d674..2d1e9a3 100644 (file)
@@ -64,6 +64,9 @@ public:
     virtual void setIsActive() { }
 
     virtual bool handleWheelEvent(const PlatformWheelEvent&);
+#if ENABLE(GESTURE_EVENTS)
+    virtual void handleGestureEvent(const PlatformGestureEvent&);
+#endif
 
     FloatPoint currentPosition() const;
 
index 6a67140..738c9e0 100644 (file)
@@ -859,6 +859,16 @@ 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 8560e0d..cb6ab4e 100644 (file)
@@ -239,6 +239,9 @@ 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 58ad242..e61bb0a 100644 (file)
@@ -158,6 +158,13 @@ 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 8244ce8..0a2a164 100644 (file)
@@ -56,6 +56,9 @@ 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; }