-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[WPE] Extract common logic from EventSenderProxyClientWPE touch event handling #45692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
EWS run on previous version of this PR (hash 8f09b45) |
@carlosgcampos , this is a follow-up to #45156. I haven't tested it yet, just wanted to try it out quickly to understand if you'd be happy with this direction |
8f09b45
to
bea49a4
Compare
EWS run on previous version of this PR (hash bea49a4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I think it better if @carlosgcampos could also take a look. I left a small suggestion.
bea49a4
to
9af98fe
Compare
EWS run on previous version of this PR (hash 9af98fe) |
… handling https://bugs.webkit.org/show_bug.cgi?id=293352 Reviewed by NOBODY (OOPS!). Extract the common logic from touchStart, touchMove, touchEnd and touchCancel into a lambda-generating function. As these 4 methods transverse the m_touchPoints, they can all invoke the lambda on each point: two in a range-based for loop, two in removeAllMatching. The return value in the lambda is ignored in the range-based case, and used by removeAllMatching in the other, and a context structure is used to keep all arguments together. * Tools/WebKitTestRunner/wpe/EventSenderProxyClientWPE.cpp: (WTR::std::function<bool): (WTR::EventSenderProxyClientWPE::touchStart): (WTR::EventSenderProxyClientWPE::touchMove): (WTR::EventSenderProxyClientWPE::touchEnd): (WTR::EventSenderProxyClientWPE::touchCancel): * Tools/WebKitTestRunner/wpe/EventSenderProxyClientWPE.h:
9af98fe
to
c53cb8a
Compare
EWS run on current version of this PR (hash c53cb8a) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge this, patch LGTM.
c53cb8a
c53cb8a