Add a enum MouseButton to devtools_protocol input domain
Mouse button type are used for both dispatchMouseEvent and emulateTouchFromMouseEvent. They are using separate enum, but same logic converting to WebMouseEvent type. This is not very clean and not good for maintenance. This CL makes both method use a MouseButton type, and the comment for emulateTouchFromMouseEvent (it fires contextmenu for right button, ignores events with middle/forward/back button) Also adds back/forward button to the tests. This change is not going to change the usage for these two function. Change-Id: Ib6d151c7472008cee04aef8792b67a68eb2d44bf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1948827Reviewed-by:Clemens Arbesser <arbesser@google.com> Reviewed-by:
Mathias Bynens <mathias@chromium.org> Reviewed-by:
Andrey Kosyakov <caseq@chromium.org> Commit-Queue: Ella Ge <eirage@chromium.org> Cr-Commit-Position: refs/heads/master@{#724566}
Showing
Please register or sign in to comment