New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 754440 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 5
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , All
Pri: 2
Type: Bug



Sign in to add a comment

DevTools: make Input domain convenient to use and close to real user input

Project Member Reported by dgozman@chromium.org, Aug 10 2017

Issue description

Problems observed:

- Touch events are just emitting JS events. We should instead dispatch them from browser and route through gesture recognition pipeline.
- There is no way to send a mouse wheel event.
- Perhaps we should provide convenient wrappers on top of raw events:
  - gesture on top of touch: tap, scroll, pinch, etc;
  - typing text on top of keyboard;
  - something else?
- In the future, we'll also need pointer events.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c0211f7955d6a1b8e1f4f811ec25d67f91d439e1

commit c0211f7955d6a1b8e1f4f811ec25d67f91d439e1
Author: Dmitry Gozman <dgozman@chromium.org>
Date: Tue Aug 15 19:14:46 2017

[chromedriver] Use dispatchTouchEvent polyfill

The reason is that underlying DevTools protocol command
"Input.dispatchTouchEvent" does not produce a real enough touch event
with gesture processing, taps, scrolls, etc. Instead it just does dispatch
a TouchEvent in the page.

To make dispatchTouchEvent resemble real input, we'll have to break
backwards compatibility, so I am updating chromedriver to preserve existing
behavior. At some point later, it could make sense to switch back
for more faithful touch events, depending on what is expected by
WebDriver spec.

Bug:  754440 
Change-Id: Iefb5dd8582ae040e54df5ff223b0b9bb7994fd98
Reviewed-on: https://chromium-review.googlesource.com/611155
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Shuotao Gao <stgao@chromium.org>
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494483}
[modify] https://crrev.com/c0211f7955d6a1b8e1f4f811ec25d67f91d439e1/chrome/test/chromedriver/BUILD.gn
[modify] https://crrev.com/c0211f7955d6a1b8e1f4f811ec25d67f91d439e1/chrome/test/chromedriver/chrome/web_view_impl.cc
[add] https://crrev.com/c0211f7955d6a1b8e1f4f811ec25d67f91d439e1/chrome/test/chromedriver/js/dispatch_touch_event.js
[add] https://crrev.com/c0211f7955d6a1b8e1f4f811ec25d67f91d439e1/chrome/test/chromedriver/js/dispatch_touch_event_test.html

Project Member

Comment 2 by bugdroid1@chromium.org, Aug 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1e8fae3c708a90acded15e4c652e269120d59877

commit 1e8fae3c708a90acded15e4c652e269120d59877
Author: Dmitry Gozman <dgozman@chromium.org>
Date: Wed Aug 16 00:04:41 2017

[DevTools] Support mouse wheel event in Input.dispatchMouseEvent

Bug:  754440 
Change-Id: I6be28b95bf483773ee40be00f4b7aa975009a703
Reviewed-on: https://chromium-review.googlesource.com/616119
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494618}
[modify] https://crrev.com/1e8fae3c708a90acded15e4c652e269120d59877/content/browser/devtools/protocol/input_handler.cc
[modify] https://crrev.com/1e8fae3c708a90acded15e4c652e269120d59877/content/browser/devtools/protocol/input_handler.h
[modify] https://crrev.com/1e8fae3c708a90acded15e4c652e269120d59877/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchMouseEvent-expected.txt
[modify] https://crrev.com/1e8fae3c708a90acded15e4c652e269120d59877/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchMouseEvent.js
[modify] https://crrev.com/1e8fae3c708a90acded15e4c652e269120d59877/third_party/WebKit/LayoutTests/platform/linux/inspector-protocol/input/dispatchMouseEvent-expected.txt
[modify] https://crrev.com/1e8fae3c708a90acded15e4c652e269120d59877/third_party/WebKit/LayoutTests/platform/win/inspector-protocol/input/dispatchMouseEvent-expected.txt
[modify] https://crrev.com/1e8fae3c708a90acded15e4c652e269120d59877/third_party/WebKit/Source/core/inspector/browser_protocol.json

Cc: dgozman@chromium.org
 Issue 755485  has been merged into this issue.
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/95bab29803f610d9e3cb14abe4e6e81086dcbc8e

commit 95bab29803f610d9e3cb14abe4e6e81086dcbc8e
Author: Dmitry Gozman <dgozman@chromium.org>
Date: Wed Aug 16 22:48:58 2017

[DevTools] Move Input.dispatchTouchEvent implementation to browser

This allows to dispatch result only after event was ACK'ed, and
includes the whole input pipeline for much more fair event injection.

Specific changes:
- New mode in TouchEmulator for injecting events instead of transforming
mouse events into touches.
- Wiring up injected touch events to gesture detection through TouchEmulator.
- Extensive test coverage.
- Removing old implementation in blink.
- Reworked Input.dispathTouchEvent contract. Now user sends a set
of touch points, and we automatically emit events for any changed ones.
This ensures touch stream consistency and hopefully makes the API easier
to use.

Bug:  754440 
Change-Id: Ifc931e52bac14f24c1b05df38dbd54f005c0c4ad
Reviewed-on: https://chromium-review.googlesource.com/601175
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494986}
[modify] https://crrev.com/95bab29803f610d9e3cb14abe4e6e81086dcbc8e/content/browser/devtools/protocol/emulation_handler.cc
[modify] https://crrev.com/95bab29803f610d9e3cb14abe4e6e81086dcbc8e/content/browser/devtools/protocol/input_handler.cc
[modify] https://crrev.com/95bab29803f610d9e3cb14abe4e6e81086dcbc8e/content/browser/devtools/protocol/input_handler.h
[modify] https://crrev.com/95bab29803f610d9e3cb14abe4e6e81086dcbc8e/content/browser/devtools/protocol_config.json
[modify] https://crrev.com/95bab29803f610d9e3cb14abe4e6e81086dcbc8e/content/browser/renderer_host/input/touch_emulator.cc
[modify] https://crrev.com/95bab29803f610d9e3cb14abe4e6e81086dcbc8e/content/browser/renderer_host/input/touch_emulator.h
[modify] https://crrev.com/95bab29803f610d9e3cb14abe4e6e81086dcbc8e/content/browser/renderer_host/input/touch_emulator_unittest.cc
[modify] https://crrev.com/95bab29803f610d9e3cb14abe4e6e81086dcbc8e/content/browser/renderer_host/render_widget_host_impl.cc
[modify] https://crrev.com/95bab29803f610d9e3cb14abe4e6e81086dcbc8e/content/browser/renderer_host/render_widget_host_impl.h
[modify] https://crrev.com/95bab29803f610d9e3cb14abe4e6e81086dcbc8e/content/browser/renderer_host/render_widget_host_unittest.cc
[modify] https://crrev.com/95bab29803f610d9e3cb14abe4e6e81086dcbc8e/content/public/browser/render_widget_host.h
[modify] https://crrev.com/95bab29803f610d9e3cb14abe4e6e81086dcbc8e/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchTouchEvent-expected.txt
[modify] https://crrev.com/95bab29803f610d9e3cb14abe4e6e81086dcbc8e/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchTouchEvent.js
[modify] https://crrev.com/95bab29803f610d9e3cb14abe4e6e81086dcbc8e/third_party/WebKit/LayoutTests/inspector-protocol/input/eventTimestamp.js
[modify] https://crrev.com/95bab29803f610d9e3cb14abe4e6e81086dcbc8e/third_party/WebKit/Source/core/exported/WebDevToolsAgentImpl.cpp
[modify] https://crrev.com/95bab29803f610d9e3cb14abe4e6e81086dcbc8e/third_party/WebKit/Source/core/inspector/BUILD.gn
[delete] https://crrev.com/1af38255f69ec0ed596f2b2994d38795a473aaf2/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp
[delete] https://crrev.com/1af38255f69ec0ed596f2b2994d38795a473aaf2/third_party/WebKit/Source/core/inspector/InspectorInputAgent.h
[modify] https://crrev.com/95bab29803f610d9e3cb14abe4e6e81086dcbc8e/third_party/WebKit/Source/core/inspector/browser_protocol.json
[modify] https://crrev.com/95bab29803f610d9e3cb14abe4e6e81086dcbc8e/third_party/WebKit/Source/core/inspector/inspector_protocol_config.json

Status: Fixed (was: Assigned)

Sign in to add a comment