Unreviewed; fix the build with ENABLE(TOUCH_EVENTS) after r103167.
authorkubo@profusion.mobi <kubo@profusion.mobi@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Dec 2011 20:00:45 +0000 (20:00 +0000)
committerkubo@profusion.mobi <kubo@profusion.mobi@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Dec 2011 20:00:45 +0000 (20:00 +0000)
This partly reverts r102297: the Touch{Start,Move,End,Cancel} events
are not in a separate enum anymore (they are part of
WebCore::PlatformEvent), so the assertions in AssertMatchingEnums.cpp
always fail. Setting EWK_TOUCH_START to TouchStart feels even more
hackish, so we just convert the types manually again for now.

* WebCoreSupport/AssertMatchingEnums.cpp:
* ewk/ewk_frame.cpp:
(ewk_frame_feed_touch_event):

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

Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/AssertMatchingEnums.cpp
Source/WebKit/efl/ewk/ewk_frame.cpp

index 0011e24f28684077144c14575af33cee3e153dc8..0d4e3550e31d603c75300851d3e80e5c8afac6b0 100644 (file)
@@ -1,3 +1,17 @@
+2011-12-19  Raphael Kubo da Costa  <kubo@profusion.mobi>
+
+        Unreviewed; fix the build with ENABLE(TOUCH_EVENTS) after r103167.
+
+        This partly reverts r102297: the Touch{Start,Move,End,Cancel} events
+        are not in a separate enum anymore (they are part of
+        WebCore::PlatformEvent), so the assertions in AssertMatchingEnums.cpp
+        always fail. Setting EWK_TOUCH_START to TouchStart feels even more
+        hackish, so we just convert the types manually again for now.
+
+        * WebCoreSupport/AssertMatchingEnums.cpp:
+        * ewk/ewk_frame.cpp:
+        (ewk_frame_feed_touch_event):
+
 2011-12-17  Sam Weinig  <sam@webkit.org>
 
         Make PlatformTouchEvent inherit from PlatformEvent
index 6dc86d9bc2825129845eaeb5d2e51ebe35329736..bff2fcd3ba6ded7ccbf9c173f5a6357a425eeb3f 100644 (file)
@@ -48,11 +48,6 @@ COMPILE_ASSERT_MATCHING_ENUM(EWK_TEXT_SELECTION_CARET, VisibleSelection::CaretSe
 COMPILE_ASSERT_MATCHING_ENUM(EWK_TEXT_SELECTION_RANGE, VisibleSelection::RangeSelection);
 
 #if ENABLE(TOUCH_EVENTS)
-COMPILE_ASSERT_MATCHING_ENUM(EWK_TOUCH_START, TouchStart);
-COMPILE_ASSERT_MATCHING_ENUM(EWK_TOUCH_MOVE, TouchMove);
-COMPILE_ASSERT_MATCHING_ENUM(EWK_TOUCH_END, TouchEnd);
-COMPILE_ASSERT_MATCHING_ENUM(EWK_TOUCH_CANCEL, TouchCancel);
-
 COMPILE_ASSERT_MATCHING_ENUM(EWK_TOUCH_POINT_RELEASED, PlatformTouchPoint::TouchReleased);
 COMPILE_ASSERT_MATCHING_ENUM(EWK_TOUCH_POINT_PRESSED, PlatformTouchPoint::TouchPressed);
 COMPILE_ASSERT_MATCHING_ENUM(EWK_TOUCH_POINT_MOVED, PlatformTouchPoint::TouchMoved);
index c25b98203afca93508bc2fb8217ad5e7c5278a79..ce20811750c5ce2d12f33b8b1223474bb07e08fa 100644 (file)
@@ -24,6 +24,7 @@
 #include "config.h"
 #include "ewk_frame.h"
 
+#include "Assertions.h"
 #include "DocumentLoader.h"
 #include "DocumentMarkerController.h"
 #include "EventHandler.h"
@@ -39,6 +40,7 @@
 #include "HitTestResult.h"
 #include "IntSize.h"
 #include "KURL.h"
+#include "PlatformEvent.h"
 #include "PlatformKeyboardEvent.h"
 #include "PlatformMouseEvent.h"
 #include "PlatformTouchEvent.h"
@@ -946,7 +948,27 @@ Eina_Bool ewk_frame_feed_touch_event(Evas_Object* ewkFrame, Ewk_Touch_Event_Type
     Evas_Coord x, y;
     evas_object_geometry_get(smartData->view, &x, &y, 0, 0);
 
-    WebCore::PlatformTouchEvent touchEvent(points, WebCore::IntPoint(x, y), static_cast<WebCore::PlatformEvent::Type>(action), metaState);
+    WebCore::PlatformEvent::Type type;
+    switch (action)
+    {
+    case EWK_TOUCH_START:
+        type = WebCore::PlatformEvent::TouchStart;
+        break;
+    case EWK_TOUCH_MOVE:
+        type = WebCore::PlatformEvent::TouchMove;
+        break;
+    case EWK_TOUCH_END:
+        type = WebCore::PlatformEvent::TouchEnd;
+        break;
+    case EWK_TOUCH_CANCEL:
+        type = WebCore::PlatformEvent::TouchCancel;
+        break;
+    default:
+        ASSERT_NOT_REACHED();
+        return false;
+    }
+
+    WebCore::PlatformTouchEvent touchEvent(points, WebCore::IntPoint(x, y), type, metaState);
     return smartData->frame->eventHandler()->handleTouchEvent(touchEvent);
 #else
     return false;