RESOLVED FIXED 132043
TouchEvent is not handled after releasing any point among touched points.
https://bugs.webkit.org/show_bug.cgi?id=132043
Summary TouchEvent is not handled after releasing any point among touched points.
Eunmi Lee
Reported 2014-04-23 00:53:35 PDT
m_isTrackingTouchEvents is set to false when we release any touched point, so we can not process rest of touched points. In the EFL port's unit test, we test as follows and it fails because #5 and #6 is not processed. 1. first touch start -> 2. second touch start -> 3. second touch move -> 4. second touch end -> 5. first touch move -> 6. first touch end So, I will modify code to set m_isTrackingTouchEvents to false when all touched points are released.
Attachments
Patch (1.51 KB, patch)
2014-04-23 01:12 PDT, Eunmi Lee
no flags
Patch (3.52 KB, patch)
2014-04-24 00:06 PDT, Eunmi Lee
no flags
Patch (2.93 KB, patch)
2014-04-27 17:45 PDT, Eunmi Lee
no flags
Eunmi Lee
Comment 1 2014-04-23 01:12:35 PDT
Benjamin Poulain
Comment 2 2014-04-23 20:36:33 PDT
Comment on attachment 229963 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=229963&action=review > Source/WebKit2/UIProcess/WebPageProxy.cpp:1532 > - if (event.type() == WebEvent::TouchEnd || event.type() == WebEvent::TouchCancel) > + if ((event.touchPoints().size() <= 1 && event.type() == WebEvent::TouchEnd) || event.type() == WebEvent::TouchCancel) You are right, I completely mishandled multitouch here. :( Unfortunately checking for the size of touchPoints() is not enough. You could have two touch points simultaneously in touchEnd or touchCancel. You will need to loop over the touch points and find if they are all released or canceled. Can you please do that in a little utility function? I separated the iOS touch event dispatch recently and the same bug exist in there.
Eunmi Lee
Comment 3 2014-04-23 21:15:37 PDT
Comment on attachment 229963 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=229963&action=review >> Source/WebKit2/UIProcess/WebPageProxy.cpp:1532 >> + if ((event.touchPoints().size() <= 1 && event.type() == WebEvent::TouchEnd) || event.type() == WebEvent::TouchCancel) > > You are right, I completely mishandled multitouch here. :( > > Unfortunately checking for the size of touchPoints() is not enough. You could have two touch points simultaneously in touchEnd or touchCancel. You will need to loop over the touch points and find if they are all released or canceled. > > Can you please do that in a little utility function? I separated the iOS touch event dispatch recently and the same bug exist in there. Thanks for review :) I will update new patch.
Eunmi Lee
Comment 4 2014-04-24 00:06:27 PDT
Benjamin Poulain
Comment 5 2014-04-25 14:43:16 PDT
Comment on attachment 230055 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=230055&action=review Thanks for fixing this! > Source/WebKit2/UIProcess/WebPageProxy.cpp:1496 > +bool WebPageProxy::areAllTouchPointsReleased(const WebTouchEvent& event) const This should not be a member of WebPageProxy, the function does not need to access any of the states of WebPageProxy, it should be an utility static function in the implementation file.
Eunmi Lee
Comment 6 2014-04-27 17:33:49 PDT
Comment on attachment 230055 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=230055&action=review >> Source/WebKit2/UIProcess/WebPageProxy.cpp:1496 >> +bool WebPageProxy::areAllTouchPointsReleased(const WebTouchEvent& event) const > > This should not be a member of WebPageProxy, the function does not need to access any of the states of WebPageProxy, it should be an utility static function in the implementation file. yes, right. I will update new patch for that.
Eunmi Lee
Comment 7 2014-04-27 17:45:21 PDT
WebKit Commit Bot
Comment 8 2014-04-27 19:09:33 PDT
Comment on attachment 230272 [details] Patch Clearing flags on attachment: 230272 Committed r167867: <http://trac.webkit.org/changeset/167867>
WebKit Commit Bot
Comment 9 2014-04-27 19:09:42 PDT
All reviewed patches have been landed. Closing bug.
Simon Fraser (smfr)
Comment 10 2014-04-28 09:22:43 PDT
This broke the iOS build.
Note You need to log in before you can comment on or make changes to this bug.