Remove PlatformEvent::GestureDoubleTap
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Mar 2013 19:27:19 +0000 (19:27 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Mar 2013 19:27:19 +0000 (19:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=93045

Patch by Yufeng Shen <miletus@chromium.org> on 2013-03-20
Reviewed by Antonio Gomes.

Source/WebCore:

PlatformEvent::GestureDoubleTap is not currently
used in WebCore and replaced by GestureTap with
tap count 2, so remove it.

Test: We are removing something that is not used, so
no new test. All existing tests pass.

* dom/GestureEvent.cpp:
(WebCore::GestureEvent::create):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleGestureEvent):
* platform/PlatformEvent.h:
* platform/chromium/PopupContainer.cpp:
(WebCore::PopupContainer::handleGestureEvent):

Source/WebKit/chromium:

PlatformEvent::GestureDoubleTap is not currently
used in WebCore so remove it.

* src/WebInputEventConversion.cpp:
(WebKit::PlatformGestureEventBuilder::PlatformGestureEventBuilder):

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

Source/WebCore/ChangeLog
Source/WebCore/dom/GestureEvent.cpp
Source/WebCore/page/EventHandler.cpp
Source/WebCore/platform/PlatformEvent.h
Source/WebCore/platform/chromium/PopupContainer.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebInputEventConversion.cpp
Source/WebKit/chromium/src/WebViewImpl.cpp

index 4abc8b1..aabbc2b 100644 (file)
@@ -1,3 +1,25 @@
+2013-03-20  Yufeng Shen  <miletus@chromium.org>
+
+        Remove PlatformEvent::GestureDoubleTap
+        https://bugs.webkit.org/show_bug.cgi?id=93045
+
+        Reviewed by Antonio Gomes.
+
+        PlatformEvent::GestureDoubleTap is not currently
+        used in WebCore and replaced by GestureTap with
+        tap count 2, so remove it.
+
+        Test: We are removing something that is not used, so
+        no new test. All existing tests pass.
+
+        * dom/GestureEvent.cpp:
+        (WebCore::GestureEvent::create):
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::handleGestureEvent):
+        * platform/PlatformEvent.h:
+        * platform/chromium/PopupContainer.cpp:
+        (WebCore::PopupContainer::handleGestureEvent):
+
 2013-03-20  Ojan Vafai  <ojan@chromium.org>
 
         Move repaint methods from RenderObject to RenderBox
index e0671f8..5541ac6 100644 (file)
@@ -53,7 +53,6 @@ PassRefPtr<GestureEvent> GestureEvent::create(PassRefPtr<AbstractView> view, con
         eventType = eventNames().gesturetapEvent; break;
     case PlatformEvent::GestureTapDown:
         eventType = eventNames().gesturetapdownEvent; break;
-    case PlatformEvent::GestureDoubleTap:
     case PlatformEvent::GestureTwoFingerTap:
     case PlatformEvent::GestureLongPress:
     case PlatformEvent::GesturePinchBegin:
index 44e9529..5f83495 100644 (file)
@@ -2454,11 +2454,6 @@ bool EventHandler::handleGestureTapDown()
 
 bool EventHandler::handleGestureEvent(const PlatformGestureEvent& gestureEvent)
 {
-    // We don't use DoubleTap at the moment, it's mostly redundant with tap since tap now contains
-    // a tap count. FIXME: We should probably remove GestureDoubleTap (http://wkb.ug/93045).
-    if (gestureEvent.type() == PlatformEvent::GestureDoubleTap)
-        return false;
-
     Node* eventTarget = 0;
     Scrollbar* scrollbar = 0;
     if (gestureEvent.type() == PlatformEvent::GestureScrollEnd
@@ -2545,7 +2540,6 @@ bool EventHandler::handleGestureEvent(const PlatformGestureEvent& gestureEvent)
         return handleGestureLongTap(gestureEvent);
     case PlatformEvent::GestureTwoFingerTap:
         return handleGestureTwoFingerTap(gestureEvent);
-    case PlatformEvent::GestureDoubleTap:
     case PlatformEvent::GesturePinchBegin:
     case PlatformEvent::GesturePinchEnd:
     case PlatformEvent::GesturePinchUpdate:
index 2547a2e..31af041 100644 (file)
@@ -56,7 +56,6 @@ public:
         GestureTap,
         GestureTapDown,
         GestureTapDownCancel,
-        GestureDoubleTap,
         GestureTwoFingerTap,
         GestureLongPress,
         GestureLongTap,
index 9fb43c3..5b42d86 100644 (file)
@@ -319,8 +319,6 @@ bool PopupContainer::handleGestureEvent(const PlatformGestureEvent& gestureEvent
         handleMouseReleaseEvent(fakeMouseUp);
         return true;
     }
-    case PlatformEvent::GestureDoubleTap:
-        break;
     case PlatformEvent::GestureScrollUpdate:
     case PlatformEvent::GestureScrollUpdateWithoutPropagation: {
         PlatformWheelEvent syntheticWheelEvent(gestureEvent.position(), gestureEvent.globalPosition(), gestureEvent.deltaX(), gestureEvent.deltaY(), gestureEvent.deltaX() / 120.0f, gestureEvent.deltaY() / 120.0f, ScrollByPixelWheelEvent, gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.metaKey());
index ec0ff93..e1062d0 100644 (file)
@@ -1,3 +1,16 @@
+2013-03-20  Yufeng Shen  <miletus@chromium.org>
+
+        Remove PlatformEvent::GestureDoubleTap
+        https://bugs.webkit.org/show_bug.cgi?id=93045
+
+        Reviewed by Antonio Gomes.
+
+        PlatformEvent::GestureDoubleTap is not currently
+        used in WebCore so remove it.
+
+        * src/WebInputEventConversion.cpp:
+        (WebKit::PlatformGestureEventBuilder::PlatformGestureEventBuilder):
+
 2013-03-20  Justin Novosad  <junov@google.com>
 
         [Chromium] Code cleanup: removing support for non-deferred 2d canvas rendering
index 71ee0b6..45340bd 100644 (file)
@@ -186,9 +186,6 @@ PlatformGestureEventBuilder::PlatformGestureEventBuilder(Widget* widget, const W
     case WebInputEvent::GestureTapCancel:
         m_type = PlatformEvent::GestureTapDownCancel;
         break;
-    case WebInputEvent::GestureDoubleTap:
-        m_type = PlatformEvent::GestureDoubleTap;
-        break;
     case WebInputEvent::GestureTwoFingerTap:
         m_type = PlatformEvent::GestureTwoFingerTap;
         m_area = expandedIntSize(FloatSize(e.data.twoFingerTap.firstFingerWidth / scale, e.data.twoFingerTap.firstFingerHeight / scale));
index 4212090..fb44456 100644 (file)
@@ -827,9 +827,11 @@ bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event)
         if (m_webSettings->doubleTapToZoomEnabled() && m_minimumPageScaleFactor != m_maximumPageScaleFactor) {
             m_client->cancelScheduledContentIntents();
             animateZoomAroundPoint(platformEvent.position(), DoubleTap);
-            eventSwallowed = true;
-            break;
         }
+        // GestureDoubleTap is currently only used by Android for zooming. For WebCore,
+        // GestureTap with tap count = 2 is used instead. So we drop GestureDoubleTap here.
+        eventSwallowed = true;
+        break;
     case WebInputEvent::GestureScrollBegin:
     case WebInputEvent::GesturePinchBegin:
         m_client->cancelScheduledContentIntents();