Changeset 166698 in webkit


Ignore:
Timestamp:
Apr 2, 2014 11:15:51 PM (10 years ago)
Author:
ryuan.choi@samsung.com
Message:

[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):

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/efl/ChangeLog

    r166661 r166698  
     12014-04-02  Ryuan Choi  <ryuan.choi@samsung.com>
     2
     3        [EFL][WK1] Use Evas_Touch_Point_State instead of Ewk_Touch_Point_Type
     4        https://bugs.webkit.org/show_bug.cgi?id=131151
     5
     6        Reviewed by Gyuyoung Kim.
     7
     8        Like ewebkit2, we'd beter to use EFL type instead of WebKit specific type
     9        In addition, changed type of id as int to match with ewebkit2.
     10
     11        * ewk/ewk_frame.h: Replace Ewk_Touch_Point_Type to Evas_Touch_Point_State.
     12        * ewk/ewk_touch_event.cpp:
     13        (toPlatformTouchPointState):
     14
    1152014-04-02  Martin Hock  <mhock@apple.com>
    216
  • trunk/Source/WebKit/efl/ewk/ewk_frame.h

    r141439 r166698  
    234234} Ewk_Touch_Event_Type;
    235235
    236 /// Represents states of touch events.
    237 typedef enum {
    238     EWK_TOUCH_POINT_RELEASED,
    239     EWK_TOUCH_POINT_PRESSED,
    240     EWK_TOUCH_POINT_MOVED,
    241     EWK_TOUCH_POINT_STATIONARY,
    242     EWK_TOUCH_POINT_CANCELLED,
    243     EWK_TOUCH_POINT_END
    244 } Ewk_Touch_Point_Type;
    245 
    246236/// Creates a type name for _Ewk_Touch_Point.
    247237typedef struct _Ewk_Touch_Point Ewk_Touch_Point;
    248238/// Represents a touch point.
    249239struct _Ewk_Touch_Point {
    250     unsigned int id; /**< identifier of the touch event */
     240    int id; /**< identifier of the touch event */
    251241    int x; /**< the horizontal position of the touch event */
    252242    int y; /**< the horizontal position of the touch event */
    253     Ewk_Touch_Point_Type state; /**< state of the touch event */
     243    Evas_Touch_Point_State state; /**< state of the touch event */
    254244};
    255245
  • trunk/Source/WebKit/efl/ewk/ewk_touch_event.cpp

    r163033 r166698  
    4444};
    4545
    46 inline static WebCore::PlatformTouchPoint::State toPlatformTouchPointState(Ewk_Touch_Point_Type type)
     46inline static WebCore::PlatformTouchPoint::State toPlatformTouchPointState(Evas_Touch_Point_State type)
    4747{
    4848    switch (type) {
    49     case EWK_TOUCH_POINT_RELEASED:
     49    case EVAS_TOUCH_POINT_UP:
    5050        return WebCore::PlatformTouchPoint::TouchReleased;
    51     case EWK_TOUCH_POINT_PRESSED:
     51    case EVAS_TOUCH_POINT_DOWN:
    5252        return WebCore::PlatformTouchPoint::TouchPressed;
    53     case EWK_TOUCH_POINT_MOVED:
     53    case EVAS_TOUCH_POINT_MOVE:
    5454        return WebCore::PlatformTouchPoint::TouchMoved;
    55     case EWK_TOUCH_POINT_STATIONARY:
     55    case EVAS_TOUCH_POINT_STILL:
    5656        return WebCore::PlatformTouchPoint::TouchStationary;
    57     case EWK_TOUCH_POINT_CANCELLED:
     57    case EVAS_TOUCH_POINT_CANCEL:
    5858        return WebCore::PlatformTouchPoint::TouchCancelled;
    59     case EWK_TOUCH_POINT_END:
    60         return WebCore::PlatformTouchPoint::TouchStateEnd;
    6159    }
    6260
  • trunk/Tools/ChangeLog

    r166674 r166698  
     12014-04-02  Ryuan Choi  <ryuan.choi@samsung.com>
     2
     3        [EFL][WK1] Use Evas_Touch_Point_State instead of Ewk_Touch_Point_Type
     4        https://bugs.webkit.org/show_bug.cgi?id=131151
     5
     6        Reviewed by Gyuyoung Kim.
     7
     8        * DumpRenderTree/efl/EventSender.cpp: Replace Ewk_Touch_Point_Type to Evas_Touch_Point_State.
     9        (TouchEventInfo::TouchEventInfo):
     10        (sendTouchEvent):
     11        (addTouchPointCallback):
     12        (updateTouchPointCallback):
     13        (cancelTouchPointCallback):
     14        (releaseTouchPointCallback):
     15
    1162014-04-02  David Kilzer  <ddkilzer@apple.com>
    217
  • trunk/Tools/DumpRenderTree/efl/EventSender.cpp

    r165676 r166698  
    154154
    155155struct TouchEventInfo {
    156     TouchEventInfo(unsigned id, Ewk_Touch_Point_Type state, const WebCore::IntPoint& point)
     156    TouchEventInfo(int id, Evas_Touch_Point_State state, const WebCore::IntPoint& point)
    157157        : state(state)
    158158        , point(point)
     
    161161    }
    162162
    163     unsigned id;
    164     Ewk_Touch_Point_Type state;
     163    int id;
     164    Evas_Touch_Point_State state;
    165165    WebCore::IntPoint point;
    166166};
     
    765765
    766766    for (unsigned i = 0; i < touchPointList().size(); ) {
    767         if (touchPointList().at(i).state == EWK_TOUCH_POINT_RELEASED)
     767        if (touchPointList().at(i).state == EVAS_TOUCH_POINT_UP)
    768768            touchPointList().remove(i);
    769769        else {
    770             touchPointList().at(i).state = EWK_TOUCH_POINT_STATIONARY;
     770            touchPointList().at(i).state = EVAS_TOUCH_POINT_STILL;
    771771            ++i;
    772772        }
     
    786786    const WebCore::IntPoint point(x, y);
    787787    const unsigned id = touchPointList().isEmpty() ? 0 : touchPointList().last().id + 1;
    788     TouchEventInfo eventInfo(id, EWK_TOUCH_POINT_PRESSED, point);
     788    TouchEventInfo eventInfo(id, EVAS_TOUCH_POINT_DOWN, point);
    789789    touchPointList().append(eventInfo);
    790790
     
    816816    point.setX(x);
    817817    point.setY(y);
    818     touchPointList().at(index).state = EWK_TOUCH_POINT_MOVED;
     818    touchPointList().at(index).state = EVAS_TOUCH_POINT_MOVE;
    819819
    820820    return JSValueMakeUndefined(context);
     
    837837        return JSValueMakeUndefined(context);
    838838
    839     touchPointList().at(index).state = EWK_TOUCH_POINT_CANCELLED;
     839    touchPointList().at(index).state = EVAS_TOUCH_POINT_CANCEL;
    840840    return JSValueMakeUndefined(context);
    841841}
     
    857857        return JSValueMakeUndefined(context);
    858858
    859     touchPointList().at(index).state = EWK_TOUCH_POINT_RELEASED;
     859    touchPointList().at(index).state = EVAS_TOUCH_POINT_UP;
    860860    return JSValueMakeUndefined(context);
    861861}
Note: See TracChangeset for help on using the changeset viewer.