Bug 96903

Summary: [EFL][WK2] Add API to feed touch event.
Product: WebKit Reporter: Eunmi Lee <enmi.lee>
Component: WebKit EFLAssignee: Eunmi Lee <enmi.lee>
Status: RESOLVED FIXED    
Severity: Normal CC: gyuyoung.kim, kenneth, lucas.de.marchi, naginenis, rakuco, ryuan.choi, webkit.review.bot, yael
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 90662    
Bug Blocks: 61838, 96465    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch - rebased
none
Patch none

Eunmi Lee
Reported 2012-09-17 03:18:25 PDT
Add API to feed touch event to the view.
Attachments
Patch (5.81 KB, patch)
2012-09-17 03:50 PDT, Eunmi Lee
no flags
Patch (5.81 KB, patch)
2012-09-18 01:51 PDT, Eunmi Lee
no flags
Patch (6.64 KB, patch)
2012-09-19 02:33 PDT, Eunmi Lee
no flags
Patch (6.69 KB, patch)
2012-09-20 03:21 PDT, Eunmi Lee
no flags
Patch (6.69 KB, patch)
2012-09-20 05:07 PDT, Eunmi Lee
no flags
Patch - rebased (6.65 KB, patch)
2012-09-20 06:07 PDT, Eunmi Lee
no flags
Patch (6.76 KB, patch)
2012-09-20 18:12 PDT, Eunmi Lee
no flags
Eunmi Lee
Comment 1 2012-09-17 03:50:07 PDT
Ryuan Choi
Comment 2 2012-09-17 06:58:29 PDT
Comment on attachment 164364 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=164364&action=review > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:365 > +TEST_F(EWK2UnitTestBase, ewk_view_feed_touch_event) I hope that we have more useful tests for this? Is it possible?
Eunmi Lee
Comment 3 2012-09-18 01:43:49 PDT
Comment on attachment 164364 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=164364&action=review >> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:365 >> +TEST_F(EWK2UnitTestBase, ewk_view_feed_touch_event) > > I hope that we have more useful tests for this? > Is it possible? Do you want to see that touch event is working? The touch event behavior will be tested in the WTR, so I think we don't have to do duplicated tests here. How do you think?
Eunmi Lee
Comment 4 2012-09-18 01:51:27 PDT
Chris Dumez
Comment 5 2012-09-18 05:15:45 PDT
*** Bug 96792 has been marked as a duplicate of this bug. ***
Gyuyoung Kim
Comment 6 2012-09-18 19:33:54 PDT
Comment on attachment 164517 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=164517&action=review Is there any unskip test case by this patch ? > Source/WebKit2/PlatformEfl.cmake:226 > + "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_touch.h" Eunmi, please add public file to EWebKit2.h together when the public file is added to mainline from next time.
Eunmi Lee
Comment 7 2012-09-18 19:38:11 PDT
(In reply to comment #6) > (From update of attachment 164517 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=164517&action=review > > Is there any unskip test case by this patch ? > Yes, this patch is needed to test touch event test cases in Bug 96465. > > Source/WebKit2/PlatformEfl.cmake:226 > > + "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_touch.h" > > Eunmi, please add public file to EWebKit2.h together when the public file is added to mainline from next time. You can see the ewk_touch.h was already added in the patch.
Gyuyoung Kim
Comment 8 2012-09-18 19:54:06 PDT
(In reply to comment #7) > You can see the ewk_touch.h was already added in the patch. I mean ewk_touch.h needed to be added to EWebKit2.h in the bug 90662 together. Because, the file has public API file style. We needed to deal it as public API in the bug.
Gyuyoung Kim
Comment 9 2012-09-18 19:54:27 PDT
Comment on attachment 164517 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=164517&action=review > Source/WebKit2/UIProcess/API/efl/ewk_view.h:672 > + * from the Evas using evas_key_modifier_get() and enable and disable It looks *and enable and disable* is ambiguous statement. > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:596 > + Ewk_Touch_Point point = {0, 0, 0, EVAS_TOUCH_POINT_DOWN}; I think we need to test other touch events as well. EVAS_TOUCH_POINT_UP,EVAS_TOUCH_POINT_MOVE, EVAS_TOUCH_POINT_STILL, EVAS_TOUCH_POINT_CANCEL
Ryuan Choi
Comment 10 2012-09-18 20:21:17 PDT
(In reply to comment #3) > (From update of attachment 164364 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=164364&action=review > > >> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:365 > >> +TEST_F(EWK2UnitTestBase, ewk_view_feed_touch_event) > > > > I hope that we have more useful tests for this? > > Is it possible? > > Do you want to see that touch event is working? > The touch event behavior will be tested in the WTR, so I think we don't have to do duplicated tests here. > How do you think? OK. Although I still want better API tests regardless of layout tests, the reason looks weaker than the cost. So I don't have objection about this.
Eunmi Lee
Comment 11 2012-09-18 20:24:57 PDT
(In reply to comment #8) > (In reply to comment #7) > > > You can see the ewk_touch.h was already added in the patch. > > I mean ewk_touch.h needed to be added to EWebKit2.h in the bug 90662 together. Because, the file has public API file style. We needed to deal it as public API in the bug. OK, I understand. I will do like that next time :)
Eunmi Lee
Comment 12 2012-09-18 20:25:44 PDT
(In reply to comment #9) > (From update of attachment 164517 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=164517&action=review > > > Source/WebKit2/UIProcess/API/efl/ewk_view.h:672 > > + * from the Evas using evas_key_modifier_get() and enable and disable > > It looks *and enable and disable* is ambiguous statement. > OK, I will change the statement. > > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:596 > > + Ewk_Touch_Point point = {0, 0, 0, EVAS_TOUCH_POINT_DOWN}; > > I think we need to test other touch events as well. > > EVAS_TOUCH_POINT_UP,EVAS_TOUCH_POINT_MOVE, EVAS_TOUCH_POINT_STILL, EVAS_TOUCH_POINT_CANCEL Yes, I will add them.
Eunmi Lee
Comment 13 2012-09-18 20:26:41 PDT
(In reply to comment #10) > (In reply to comment #3) > > (From update of attachment 164364 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=164364&action=review > > > > >> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:365 > > >> +TEST_F(EWK2UnitTestBase, ewk_view_feed_touch_event) > > > > > > I hope that we have more useful tests for this? > > > Is it possible? > > > > Do you want to see that touch event is working? > > The touch event behavior will be tested in the WTR, so I think we don't have to do duplicated tests here. > > How do you think? > > OK. > Although I still want better API tests regardless of layout tests, the reason looks weaker than the cost. > So I don't have objection about this. OK, thanks for your comment :)
Eunmi Lee
Comment 14 2012-09-19 02:33:03 PDT
Gyuyoung Kim
Comment 15 2012-09-19 18:55:36 PDT
Comment on attachment 164695 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=164695&action=review Any other opinions for this patch ? > Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:1705 > + Evas_Point position = {smartData->view.x, smartData->view.y}; {smartData->view.x, smartData->view.y} -> { smartData->view.x, smartData->view.y }; ? > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:620 > + Ewk_Touch_Point point1 = {0, 0, 0, EVAS_TOUCH_POINT_DOWN}; ditto. > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:621 > + Ewk_Touch_Point point2 = {1, 0, 0, EVAS_TOUCH_POINT_DOWN}; ditto.
Jinwoo Song
Comment 16 2012-09-19 20:11:39 PDT
Comment on attachment 164695 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=164695&action=review > Source/WebKit2/UIProcess/API/efl/ewk_view.h:671 > + * @param modifiers modifiers state of touch event. Users can get the Evas_Modifier 'the list of modifier keys for touch event' seems to be correct rather than 'modifiers state of touch event'. Is that right?
Eunmi Lee
Comment 17 2012-09-19 21:45:21 PDT
(In reply to comment #15) > (From update of attachment 164695 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=164695&action=review > > Any other opinions for this patch ? > > > Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:1705 > > + Evas_Point position = {smartData->view.x, smartData->view.y}; > > {smartData->view.x, smartData->view.y} -> { smartData->view.x, smartData->view.y }; ? > > > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:620 > > + Ewk_Touch_Point point1 = {0, 0, 0, EVAS_TOUCH_POINT_DOWN}; > > ditto. > > > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:621 > > + Ewk_Touch_Point point2 = {1, 0, 0, EVAS_TOUCH_POINT_DOWN}; > > ditto. Thanks, I will modify as your comment.
Eunmi Lee
Comment 18 2012-09-19 21:49:07 PDT
(In reply to comment #16) > (From update of attachment 164695 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=164695&action=review > > > Source/WebKit2/UIProcess/API/efl/ewk_view.h:671 > > + * @param modifiers modifiers state of touch event. Users can get the Evas_Modifier > > 'the list of modifier keys for touch event' seems to be correct rather than 'modifiers state of touch event'. Is that right? I agree that 'modifiers state' is ambiguous, but I don't think 'the list of modifier keys' is good sentence. so, I will change sentence to 'a handle to the list of modifier keys registered' which is referred from the Evas document.
Eunmi Lee
Comment 19 2012-09-20 03:21:06 PDT
Kenneth Rohde Christiansen
Comment 20 2012-09-20 03:23:58 PDT
Comment on attachment 164878 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=164878&action=review > Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:1699 > +Eina_Bool ewk_view_feed_touch_event(Evas_Object* ewkView, Ewk_Touch_Event_Type type, const Eina_List* points, const Evas_Modifier* modifiers) > +{ This seems way too simple to me. How can you determine which finger was pressed before and now released/moved etc? I hope the touch support in EFL is not that broken. Qt does this quite nicely.
Kenneth Rohde Christiansen
Comment 21 2012-09-20 03:40:23 PDT
(In reply to comment #20) > (From update of attachment 164878 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=164878&action=review > > > Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:1699 > > +Eina_Bool ewk_view_feed_touch_event(Evas_Object* ewkView, Ewk_Touch_Event_Type type, const Eina_List* points, const Evas_Modifier* modifiers) > > +{ > > This seems way too simple to me. How can you determine which finger was pressed before and now released/moved etc? > > I hope the touch support in EFL is not that broken. Qt does this quite nicely. Apparently evas supports this just fine there are even methods for feeding events evas_feed_multi* etc. I guess you just have to send all the touches using the same timestamp.
Kenneth Rohde Christiansen
Comment 22 2012-09-20 03:42:12 PDT
Comment on attachment 164878 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=164878&action=review > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:631 > + ASSERT_TRUE(ewk_view_feed_touch_event(webView(), EWK_TOUCH_START, points, evas_key_modifier_get(evas_object_evas_get(webView())))); > + > + point1.state = EVAS_TOUCH_POINT_STILL; > + point2.x = 100; > + point2.y = 100; > + point2.state = EVAS_TOUCH_POINT_MOVE; > + ASSERT_TRUE(ewk_view_feed_touch_event(webView(), EWK_TOUCH_MOVE, points, evas_key_modifier_get(evas_object_evas_get(webView())))); > + I dont get why it is not possible to place two fingers and then remove just one. Then the resulting event should contain two points (one released and one stationary)
Eunmi Lee
Comment 23 2012-09-20 04:14:51 PDT
Comment on attachment 164878 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=164878&action=review >>> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:1699 >>> +{ >> >> This seems way too simple to me. How can you determine which finger was pressed before and now released/moved etc? >> >> I hope the touch support in EFL is not that broken. Qt does this quite nicely. > > Apparently evas supports this just fine there are even methods for feeding events > > evas_feed_multi* etc. I guess you just have to send all the touches using the same timestamp. We can determine each finger's state by "const Eina_List* points" parameter, because the type of each point is Ewk_Touch_Point which has id, x, y and state (Evas_Touch_Point_Sate). I know there are APIs in the Evas for feeding events but I could not use that, because I can not send multiple points using that API. We need API to feed touch event with multiple points at a time, especially in the WTR, we can not pass the test cases without this API. In the Qt port, we can feed touch events with multiple points because QTouchEvent can have multiple points, but there is no API and type like that in the Evas. >> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:631 >> + > > I dont get why it is not possible to place two fingers and then remove just one. Then the resulting event should contain two points (one released and one stationary) Why not? it is possible. Do you want to add such test case?
Kenneth Rohde Christiansen
Comment 24 2012-09-20 04:17:18 PDT
Comment on attachment 164878 [details] Patch Yes thanks please add such a test case!
Eunmi Lee
Comment 25 2012-09-20 05:07:42 PDT
Eunmi Lee
Comment 26 2012-09-20 06:07:12 PDT
Created attachment 164905 [details] Patch - rebased
Kenneth Rohde Christiansen
Comment 27 2012-09-20 06:22:48 PDT
Comment on attachment 164905 [details] Patch - rebased View in context: https://bugs.webkit.org/attachment.cgi?id=164905&action=review > Source/WebKit2/ChangeLog:8 > + This API will be used by applications to feed touch event to the view Could you explain the use-case?
Eunmi Lee
Comment 28 2012-09-20 18:12:44 PDT
Eunmi Lee
Comment 29 2012-09-20 18:13:36 PDT
(In reply to comment #27) > (From update of attachment 164905 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=164905&action=review > > > Source/WebKit2/ChangeLog:8 > > + This API will be used by applications to feed touch event to the view > > Could you explain the use-case? I've modified ChangeLog, please review again :)
Kenneth Rohde Christiansen
Comment 30 2012-09-20 23:08:56 PDT
Comment on attachment 165028 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=165028&action=review > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:740 > + point2.state = EVAS_TOUCH_POINT_MOVE; > + ASSERT_TRUE(ewk_view_feed_touch_event(webView(), EWK_TOUCH_MOVE, points, evas_key_modifier_get(evas_object_evas_get(webView())))); > + Wouldnt it be better to actually test that it gets the points? like load a page with a touch event handler and query the state with evaluatejavascript or similar (Qt has the option to do so)
WebKit Review Bot
Comment 31 2012-09-20 23:23:13 PDT
Comment on attachment 165028 [details] Patch Clearing flags on attachment: 165028 Committed r129196: <http://trac.webkit.org/changeset/129196>
WebKit Review Bot
Comment 32 2012-09-20 23:23:18 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.