Revert "Filter out events jittery for single-touch gestures."
authorTomasz Czekala <t.czekala@samsung.com>
Mon, 28 Dec 2015 11:00:23 +0000 (12:00 +0100)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 07:55:23 +0000 (07:55 +0000)
This reverts commit f7f8b960f56cbd66560b7590e24983beb9e63509.

The reverted commit was removing the events which are required for
smoothness. The gesture_detector.cc module handles extra events
received. We just need to pass them to it.

This is a port of the following patch:
http://165.213.202.130/gerrit/#/c/100452/

Reviewed by: a1.gomes, djmix.kim, prashant.n

Change-Id: Iadc6aa67c7178f3b600c2fcf0aa6c7b0907b7a33
Signed-off-by: Tomasz Czekala <t.czekala@samsung.com>
tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc
tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.h

index 98dcc95..2c22eec 100755 (executable)
@@ -194,7 +194,6 @@ RenderWidgetHostViewEfl::RenderWidgetHostViewEfl(RenderWidgetHost* widget,
     surface_id_(0),
     is_modifier_key_(false),
     touch_events_enabled_(false),
-    should_check_move_threshold_(false),
     web_contents_(web_contents),
     compositor_(NULL),
     root_layer_(new ui::Layer(ui::LAYER_SOLID_COLOR)),
@@ -1606,25 +1605,6 @@ void RenderWidgetHostViewEfl::ProcessTouchEvents(unsigned int timestamp) {
     evas_touch_point_list_nth_xy_get(evas_, i, &pt.x, &pt.y);
     state = evas_touch_point_list_nth_state_get(evas_, i);
 
-    // Filter out events jittery for single-touch gestures.
-    if (count == 1) {
-      if (state == EVAS_TOUCH_POINT_DOWN) {
-        should_check_move_threshold_ = true;
-        last_single_press_down_position_ = gfx::Point(pt.x, pt.y);
-      } else if (should_check_move_threshold_ &&
-                 state == EVAS_TOUCH_POINT_MOVE) {
-        gfx::Point current_point(pt.x, pt.y);
-        gfx::Vector2d diff = current_point - last_single_press_down_position_;
-
-        unsigned threshold =
-            elm_config_scroll_thumbscroll_threshold_get();
-        if (diff.LengthSquared() < threshold * threshold)
-          return;
-
-        should_check_move_threshold_ = false;
-      }
-    }
-
     ui::TouchEvent touch_event =
         MakeTouchEvent(pt, state, id, content_image_, timestamp);
     HandleTouchEvent(&touch_event);
index cf36250..b136690 100755 (executable)
@@ -410,9 +410,6 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl
 
   bool touch_events_enabled_;
 
-  gfx::Point last_single_press_down_position_;
-  bool should_check_move_threshold_;
-
   // The last scroll offset of the view.
   gfx::Vector2dF last_scroll_offset_;