Revert "[Tizen] Fixed FeedTouchEvent"
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Tue, 27 Aug 2024 06:41:26 +0000 (15:41 +0900)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Tue, 27 Aug 2024 06:41:26 +0000 (15:41 +0900)
This reverts commit d818a378af37ce7b7afe1bbdb1da6ba275a295a8.

dali-extension/web-engine-chromium/tizen-web-engine-chromium.cpp

index 2c0bbb6..78c3a4c 100644 (file)
@@ -609,55 +609,50 @@ bool TizenWebEngineChromium::FeedTouchEvent(const TouchEvent& touch)
   Ewk_Touch_Event_Type   type  = EWK_TOUCH_START;
   Evas_Touch_Point_State state = EVAS_TOUCH_POINT_DOWN;
 
-  bool fed = false;
-  for(std::size_t i = 0; i < touch.GetPointCount(); i++)
+  std::size_t pointCount = touch.GetPointCount() - 1;
+
+  switch(touch.GetState(pointCount))
   {
-    switch(touch.GetState(i))
+    case PointState::DOWN:
     {
-      case PointState::DOWN:
-      {
-        type  = EWK_TOUCH_START;
-        state = EVAS_TOUCH_POINT_DOWN;
-        break;
-      }
-      case PointState::UP:
-      {
-        type  = EWK_TOUCH_END;
-        state = EVAS_TOUCH_POINT_UP;
-        break;
-      }
-      case PointState::MOTION:
-      {
-        type  = EWK_TOUCH_MOVE;
-        state = EVAS_TOUCH_POINT_MOVE;
-        break;
-      }
-      case PointState::INTERRUPTED:
-      {
-        type  = EWK_TOUCH_CANCEL;
-        state = EVAS_TOUCH_POINT_CANCEL;
-        break;
-      }
-      default:
-      {
-        break;
-      }
+      type  = EWK_TOUCH_START;
+      state = EVAS_TOUCH_POINT_DOWN;
+      break;
     }
-
-    Eina_List*      pointList = 0;
-    Ewk_Touch_Point point;
-    point.id    = i;
-    point.x     = touch.GetScreenPosition(i).x;
-    point.y     = touch.GetScreenPosition(i).y;
-    point.state = state;
-    pointList   = eina_list_append(pointList, &point);
-    fed = ewk_view_feed_touch_event(mWebView, type, pointList, 0);
-    eina_list_free(pointList);
-    if(!fed)
+    case PointState::UP:
+    {
+      type  = EWK_TOUCH_END;
+      state = EVAS_TOUCH_POINT_UP;
+      break;
+    }
+    case PointState::MOTION:
+    {
+      type  = EWK_TOUCH_MOVE;
+      state = EVAS_TOUCH_POINT_MOVE;
+      break;
+    }
+    case PointState::INTERRUPTED:
+    {
+      type  = EWK_TOUCH_CANCEL;
+      state = EVAS_TOUCH_POINT_CANCEL;
+      break;
+    }
+    default:
     {
       break;
     }
   }
+
+  Eina_List*      pointList = 0;
+  Ewk_Touch_Point point;
+  point.id    = pointCount;
+  point.x     = touch.GetScreenPosition(pointCount).x;
+  point.y     = touch.GetScreenPosition(pointCount).y;
+  point.state = state;
+  pointList   = eina_list_append(pointList, &point);
+
+  bool fed = ewk_view_feed_touch_event(mWebView, type, pointList, 0);
+  eina_list_free(pointList);
   return fed;
 }