Skip to content
Permalink
Browse files
[EFL][WK1] Use Evas_Touch_Point_State instead of Ewk_Touch_Point_Type
https://bugs.webkit.org/show_bug.cgi?id=131151

Reviewed by Gyuyoung Kim.

Source/WebKit/efl:

Like ewebkit2, we'd beter to use EFL type instead of WebKit specific type
In addition, changed type of id as int to match with ewebkit2.

* ewk/ewk_frame.h: Replace Ewk_Touch_Point_Type to Evas_Touch_Point_State.
* ewk/ewk_touch_event.cpp:
(toPlatformTouchPointState):

Tools:

* DumpRenderTree/efl/EventSender.cpp: Replace Ewk_Touch_Point_Type to Evas_Touch_Point_State.
(TouchEventInfo::TouchEventInfo):
(sendTouchEvent):
(addTouchPointCallback):
(updateTouchPointCallback):
(cancelTouchPointCallback):
(releaseTouchPointCallback):


Canonical link: https://commits.webkit.org/149201@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Ryuan Choi committed Apr 3, 2014
1 parent 718af8b commit fe92abf282ddd71b648144850f8bc74bc5f0141f
Showing 5 changed files with 46 additions and 29 deletions.
@@ -1,3 +1,17 @@
2014-04-02 Ryuan Choi <ryuan.choi@samsung.com>

[EFL][WK1] Use Evas_Touch_Point_State instead of Ewk_Touch_Point_Type
https://bugs.webkit.org/show_bug.cgi?id=131151

Reviewed by Gyuyoung Kim.

Like ewebkit2, we'd beter to use EFL type instead of WebKit specific type
In addition, changed type of id as int to match with ewebkit2.

* ewk/ewk_frame.h: Replace Ewk_Touch_Point_Type to Evas_Touch_Point_State.
* ewk/ewk_touch_event.cpp:
(toPlatformTouchPointState):

2014-04-02 Martin Hock <mhock@apple.com>

Unify private browsing with sessions.
@@ -233,24 +233,14 @@ typedef enum {
EWK_TOUCH_CANCEL
} Ewk_Touch_Event_Type;

/// Represents states of touch events.
typedef enum {
EWK_TOUCH_POINT_RELEASED,
EWK_TOUCH_POINT_PRESSED,
EWK_TOUCH_POINT_MOVED,
EWK_TOUCH_POINT_STATIONARY,
EWK_TOUCH_POINT_CANCELLED,
EWK_TOUCH_POINT_END
} Ewk_Touch_Point_Type;

/// Creates a type name for _Ewk_Touch_Point.
typedef struct _Ewk_Touch_Point Ewk_Touch_Point;
/// Represents a touch point.
struct _Ewk_Touch_Point {
unsigned int id; /**< identifier of the touch event */
int id; /**< identifier of the touch event */
int x; /**< the horizontal position of the touch event */
int y; /**< the horizontal position of the touch event */
Ewk_Touch_Point_Type state; /**< state of the touch event */
Evas_Touch_Point_State state; /**< state of the touch event */
};

typedef enum {
@@ -43,21 +43,19 @@ class WebKitPlatformTouchPoint : public WebCore::PlatformTouchPoint {
}
};

inline static WebCore::PlatformTouchPoint::State toPlatformTouchPointState(Ewk_Touch_Point_Type type)
inline static WebCore::PlatformTouchPoint::State toPlatformTouchPointState(Evas_Touch_Point_State type)
{
switch (type) {
case EWK_TOUCH_POINT_RELEASED:
case EVAS_TOUCH_POINT_UP:
return WebCore::PlatformTouchPoint::TouchReleased;
case EWK_TOUCH_POINT_PRESSED:
case EVAS_TOUCH_POINT_DOWN:
return WebCore::PlatformTouchPoint::TouchPressed;
case EWK_TOUCH_POINT_MOVED:
case EVAS_TOUCH_POINT_MOVE:
return WebCore::PlatformTouchPoint::TouchMoved;
case EWK_TOUCH_POINT_STATIONARY:
case EVAS_TOUCH_POINT_STILL:
return WebCore::PlatformTouchPoint::TouchStationary;
case EWK_TOUCH_POINT_CANCELLED:
case EVAS_TOUCH_POINT_CANCEL:
return WebCore::PlatformTouchPoint::TouchCancelled;
case EWK_TOUCH_POINT_END:
return WebCore::PlatformTouchPoint::TouchStateEnd;
}

ASSERT_NOT_REACHED();
@@ -1,3 +1,18 @@
2014-04-02 Ryuan Choi <ryuan.choi@samsung.com>

[EFL][WK1] Use Evas_Touch_Point_State instead of Ewk_Touch_Point_Type
https://bugs.webkit.org/show_bug.cgi?id=131151

Reviewed by Gyuyoung Kim.

* DumpRenderTree/efl/EventSender.cpp: Replace Ewk_Touch_Point_Type to Evas_Touch_Point_State.
(TouchEventInfo::TouchEventInfo):
(sendTouchEvent):
(addTouchPointCallback):
(updateTouchPointCallback):
(cancelTouchPointCallback):
(releaseTouchPointCallback):

2014-04-02 David Kilzer <ddkilzer@apple.com>

filter-build-webkit: Ignore xcodebuild warnings when compiling with newer builds of clang
@@ -153,15 +153,15 @@ struct DelayedEvent {
};

struct TouchEventInfo {
TouchEventInfo(unsigned id, Ewk_Touch_Point_Type state, const WebCore::IntPoint& point)
TouchEventInfo(int id, Evas_Touch_Point_State state, const WebCore::IntPoint& point)
: state(state)
, point(point)
, id(id)
{
}

unsigned id;
Ewk_Touch_Point_Type state;
int id;
Evas_Touch_Point_State state;
WebCore::IntPoint point;
};

@@ -764,10 +764,10 @@ static void sendTouchEvent(Ewk_Touch_Event_Type type)
}

for (unsigned i = 0; i < touchPointList().size(); ) {
if (touchPointList().at(i).state == EWK_TOUCH_POINT_RELEASED)
if (touchPointList().at(i).state == EVAS_TOUCH_POINT_UP)
touchPointList().remove(i);
else {
touchPointList().at(i).state = EWK_TOUCH_POINT_STATIONARY;
touchPointList().at(i).state = EVAS_TOUCH_POINT_STILL;
++i;
}
}
@@ -785,7 +785,7 @@ static JSValueRef addTouchPointCallback(JSContextRef context, JSObjectRef functi

const WebCore::IntPoint point(x, y);
const unsigned id = touchPointList().isEmpty() ? 0 : touchPointList().last().id + 1;
TouchEventInfo eventInfo(id, EWK_TOUCH_POINT_PRESSED, point);
TouchEventInfo eventInfo(id, EVAS_TOUCH_POINT_DOWN, point);
touchPointList().append(eventInfo);

return JSValueMakeUndefined(context);
@@ -815,7 +815,7 @@ static JSValueRef updateTouchPointCallback(JSContextRef context, JSObjectRef fun
WebCore::IntPoint& point = touchPointList().at(index).point;
point.setX(x);
point.setY(y);
touchPointList().at(index).state = EWK_TOUCH_POINT_MOVED;
touchPointList().at(index).state = EVAS_TOUCH_POINT_MOVE;

return JSValueMakeUndefined(context);
}
@@ -836,7 +836,7 @@ static JSValueRef cancelTouchPointCallback(JSContextRef context, JSObjectRef fun
if (index < 0 || index >= touchPointList().size())
return JSValueMakeUndefined(context);

touchPointList().at(index).state = EWK_TOUCH_POINT_CANCELLED;
touchPointList().at(index).state = EVAS_TOUCH_POINT_CANCEL;
return JSValueMakeUndefined(context);
}

@@ -856,7 +856,7 @@ static JSValueRef releaseTouchPointCallback(JSContextRef context, JSObjectRef fu
if (index < 0 || index >= touchPointList().size())
return JSValueMakeUndefined(context);

touchPointList().at(index).state = EWK_TOUCH_POINT_RELEASED;
touchPointList().at(index).state = EVAS_TOUCH_POINT_UP;
return JSValueMakeUndefined(context);
}

0 comments on commit fe92abf

Please sign in to comment.