| Summary: | TouchEvent is not handled after releasing any point among touched points. | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Eunmi Lee <enmi.lee> | ||||||||
| Component: | WebKit2 | Assignee: | Eunmi Lee <enmi.lee> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | benjamin, commit-queue, simon.fraser | ||||||||
| Priority: | P2 | ||||||||||
| Version: | 528+ (Nightly build) | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Eunmi Lee
2014-04-23 00:53:35 PDT
Created attachment 229963 [details]
Patch
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. 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. Created attachment 230055 [details]
Patch
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. 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. Created attachment 230272 [details]
Patch
Comment on attachment 230272 [details] Patch Clearing flags on attachment: 230272 Committed r167867: <http://trac.webkit.org/changeset/167867> All reviewed patches have been landed. Closing bug. This broke the iOS build. |