Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / ui / events / gesture_event_details.h
index f1c592f..fb897b2 100644 (file)
@@ -17,9 +17,6 @@ struct EVENTS_BASE_EXPORT GestureEventDetails {
  public:
   GestureEventDetails();
   GestureEventDetails(EventType type, float delta_x, float delta_y);
-  GestureEventDetails(EventType type,
-                      float delta_x, float delta_y,
-                      float delta_x_ordinal, float delta_y_ordinal);
 
   EventType type() const { return type_; }
 
@@ -37,9 +34,6 @@ struct EVENTS_BASE_EXPORT GestureEventDetails {
 
   void set_bounding_box(const gfx::RectF& box) { bounding_box_ = box; }
 
-  void SetScrollVelocity(float velocity_x, float velocity_y,
-                         float velocity_x_ordinal, float velocity_y_ordinal);
-
   float scroll_x_hint() const {
     DCHECK_EQ(ui::ET_GESTURE_SCROLL_BEGIN, type_);
     return data.scroll_begin.x_hint;
@@ -61,49 +55,13 @@ struct EVENTS_BASE_EXPORT GestureEventDetails {
   }
 
   float velocity_x() const {
-    DCHECK(type_ == ui::ET_GESTURE_SCROLL_UPDATE ||
-          type_ == ui::ET_SCROLL_FLING_START);
-    return type_ == ui::ET_SCROLL_FLING_START ? data.fling_velocity.x :
-                                                data.scroll_update.velocity_x;
+    DCHECK(type_ == ui::ET_SCROLL_FLING_START);
+    return data.fling_velocity.x;
   }
 
   float velocity_y() const {
-    DCHECK(type_ == ui::ET_GESTURE_SCROLL_UPDATE ||
-          type_ == ui::ET_SCROLL_FLING_START);
-    return type_ == ui::ET_SCROLL_FLING_START ? data.fling_velocity.y :
-                                                data.scroll_update.velocity_y;
-  }
-
-  // *_ordinal values are unmodified by rail based clamping.
-  float scroll_x_ordinal() const {
-    DCHECK_EQ(ui::ET_GESTURE_SCROLL_UPDATE, type_);
-    return data.scroll_update.x_ordinal;
-  }
-
-  float scroll_y_ordinal() const {
-    DCHECK_EQ(ui::ET_GESTURE_SCROLL_UPDATE, type_);
-    return data.scroll_update.y_ordinal;
-  }
-
-  float velocity_x_ordinal() const {
-    DCHECK(type_ == ui::ET_GESTURE_SCROLL_UPDATE ||
-          type_ == ui::ET_SCROLL_FLING_START);
-    return type_ == ui::ET_SCROLL_FLING_START ?
-        data.fling_velocity.x_ordinal :
-        data.scroll_update.velocity_x_ordinal;
-  }
-
-  float velocity_y_ordinal() const {
-    DCHECK(type_ == ui::ET_GESTURE_SCROLL_UPDATE ||
-          type_ == ui::ET_SCROLL_FLING_START);
-    return type_ == ui::ET_SCROLL_FLING_START ?
-        data.fling_velocity.y_ordinal :
-        data.scroll_update.velocity_y_ordinal;
-  }
-
-  int touch_id() const {
-    DCHECK_EQ(ui::ET_GESTURE_LONG_PRESS, type_);
-    return data.touch_id;
+    DCHECK(type_ == ui::ET_SCROLL_FLING_START);
+    return data.fling_velocity.y;
   }
 
   float first_finger_width() const {
@@ -162,12 +120,6 @@ struct EVENTS_BASE_EXPORT GestureEventDetails {
     struct {  // SCROLL delta.
       float x;
       float y;
-      float velocity_x;
-      float velocity_y;
-      float x_ordinal;
-      float y_ordinal;
-      float velocity_x_ordinal;
-      float velocity_y_ordinal;
     } scroll_update;
 
     float scale;  // PINCH scale.
@@ -175,12 +127,8 @@ struct EVENTS_BASE_EXPORT GestureEventDetails {
     struct {  // FLING velocity.
       float x;
       float y;
-      float x_ordinal;
-      float y_ordinal;
     } fling_velocity;
 
-    int touch_id;  // LONG_PRESS touch-id.
-
     // Dimensions of the first finger's enclosing rectangle for
     // TWO_FINGER_TAP.
     struct {