Bug 224101 - Web Inspector: add Input domain for emitting keyboard and mouse events
Summary: Web Inspector: add Input domain for emitting keyboard and mouse events
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-02 02:40 PDT by Niek
Modified: 2021-04-12 02:49 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Niek 2021-04-02 02:40:32 PDT
See bug #103530 -  9 years ago the Input domain was added, but at some point it seem to be removed again.

The Playwright team has working patches available that add this functionality: https://github.com/microsoft/playwright/blob/master/browser_patches/webkit/patches/bootstrap.diff

Would it be possible to have this merged upstream?
Comment 1 Radar WebKit Bug Importer 2021-04-07 16:21:20 PDT
<rdar://problem/76370975>
Comment 2 Sam Sneddon [:gsnedders] 2021-04-08 16:53:20 PDT
> at some point it seem to be removed again

see bug 131073
Comment 3 Niek 2021-04-08 21:54:13 PDT
Thanks for providing the reference. I don't really understand the reasoning to remove it though: "It is for a Chrome feature (device screen sharing) we don't have.".

The Input domain is very useful for debugging and automation, right now there's no way to fire mouse or keyboard events using the debugging protocol, that's a severe limitation. I'd be more than happy to prepare a patch to add it again, in case you're open to re-add it of course.
Comment 4 BJ Burg 2021-04-09 13:51:33 PDT
(In reply to Niek from comment #3)
> Thanks for providing the reference. I don't really understand the reasoning
> to remove it though: "It is for a Chrome feature (device screen sharing) we
> don't have.".
> 
> The Input domain is very useful for debugging and automation, right now
> there's no way to fire mouse or keyboard events using the debugging
> protocol, that's a severe limitation. I'd be more than happy to prepare a
> patch to add it again, in case you're open to re-add it of course.

Generally speaking, we remove code that has no ship plan and no test coverage, such as post-fork Chrome features in Web Inspector Protocol.

How do you plan to write tests for the functionality of Input domain? I didn't see a single test in the diff that you linked–hopefully this is just an oversight.
Comment 5 Niek 2021-04-12 02:49:12 PDT
The linked patch is not meant to be merged as-is, I can add tests for the functionality - no problem. But before I start work on this I want to be sure it's something you are willing to merge upstream.

In my opinion the Input domain is not just a "post-fork Chrome feature", it's an essential feature of any remote debugging implementation.