RESOLVED FIXED103530
Web Inspector: Introduce new "Input" domain for emitting keyboard / mouse events.
https://bugs.webkit.org/show_bug.cgi?id=103530
Summary Web Inspector: Introduce new "Input" domain for emitting keyboard / mouse eve...
Pavel Feldman
Reported 2012-11-28 09:09:55 PST
We'd like to be able to emit events via remote debugging protocol. Lets add new (hidden for now) domain and put initial implementation there.
Attachments
Patch (21.47 KB, patch)
2012-11-28 15:43 PST, Ken Kania
no flags
Patch (23.98 KB, patch)
2012-11-29 09:16 PST, Ken Kania
no flags
Patch (29.33 KB, patch)
2012-11-30 11:52 PST, Ken Kania
no flags
Patch (29.44 KB, patch)
2012-11-30 16:30 PST, Ken Kania
no flags
Patch (30.41 KB, patch)
2012-11-30 16:59 PST, Ken Kania
no flags
Patch (30.42 KB, patch)
2012-12-03 15:56 PST, Ken Kania
no flags
Ken Kania
Comment 1 2012-11-28 15:43:00 PST
Build Bot
Comment 2 2012-11-28 15:52:00 PST
Early Warning System Bot
Comment 3 2012-11-28 15:52:54 PST
Early Warning System Bot
Comment 4 2012-11-28 15:55:58 PST
Build Bot
Comment 5 2012-11-28 16:01:51 PST
EFL EWS Bot
Comment 6 2012-11-28 16:36:33 PST
Ken Kania
Comment 7 2012-11-29 09:16:35 PST
Yury Semikhatsky
Comment 8 2012-11-29 10:24:27 PST
Comment on attachment 176745 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=176745&action=review > Source/WebCore/inspector/Inspector.json:1942 > + { "name": "nodeId", "$ref": "DOM.NodeId" } Please provide description for the parameter. > Source/WebCore/inspector/Inspector.json:3261 > + { "name": "type", "type": "string", "enum": ["keyDown", "keyUp", "rawKeyDown", "char"] }, Description is missing for this ans a few other parameters. > Source/WebCore/inspector/InspectorInputAgent.h:17 > + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY This is a wrong copyright header. Google contributors use a bit different one. See InspectorMemoryAgent.cpp for example. > Source/WebCore/inspector/InspectorInputAgent.h:40 > +class InstrumentingAgents; No need to declare it here as it is already provided by InspectorBaseAgent. > LayoutTests/inspector-protocol/dom-focus.html:1 > +<html> Let's move "Input" domain tests under LayoutTests/inspector-protocol/input. We should eventually do the same for other tests under LayoutTests/inspector-protocol/. > LayoutTests/inspector-protocol/dom-focus.html:7 > + document.querySelector("#second").addEventListener("focus", function() { We usually use named functions even if they are used as callbacks. Same thing with other anonymous functions in this patch.
Yury Semikhatsky
Comment 9 2012-11-29 10:27:07 PST
(In reply to comment #8) > Let's move "Input" domain tests under LayoutTests/inspector-protocol/input. We should eventually do the same for other tests under LayoutTests/inspector-protocol/. > Ok, this particular one seems to be from DOM domain.
Build Bot
Comment 10 2012-11-29 14:24:47 PST
Ken Kania
Comment 11 2012-11-30 11:52:05 PST
Build Bot
Comment 12 2012-11-30 12:48:40 PST
Yury Semikhatsky
Comment 13 2012-11-30 13:42:18 PST
(In reply to comment #12) > (From update of attachment 177003 [details]) > Attachment 177003 [details] did not pass mac-ews (mac): > Output: http://queues.webkit.org/results/15083080 /Volumes/Data/EWS/WebKit/Source/WebCore/inspector/InspectorInputAgent.cpp:58:57: error: unused parameter 'error' [-Werror,-Wunused-parameter] Just omit the name of the parameter if it is unused.
Ken Kania
Comment 14 2012-11-30 16:30:52 PST
Build Bot
Comment 15 2012-11-30 16:57:27 PST
Comment on attachment 177048 [details] Patch Attachment 177048 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/15061550 New failing tests: inspector-protocol/input/dispatchKeyEvent.html
Ken Kania
Comment 16 2012-11-30 16:59:18 PST
Build Bot
Comment 17 2012-11-30 20:44:26 PST
Comment on attachment 177056 [details] Patch Attachment 177056 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/15086085 New failing tests: inspector-protocol/input/dispatchKeyEvent.html
Ken Kania
Comment 18 2012-12-03 15:56:38 PST
Yury Semikhatsky
Comment 19 2012-12-03 17:48:39 PST
I'm wondering why it crashed on Mac and passed on other platforms?
Nat Duca
Comment 20 2012-12-03 18:03:33 PST
Comment on attachment 177360 [details] Patch Should this be formulated such that it can asynchronou? E.g. what's the execution order of page.dispatchKeyEvent('x') runtime.Evaluate('window.didGetX'); for some page that sets didGetX in a keyHandler on the main page... If I push them onto the websocket right away? I think this is less important for keys, but for mouse events, its definitely important that we think through the ordering of things.
WebKit Review Bot
Comment 21 2012-12-03 22:08:43 PST
Comment on attachment 177360 [details] Patch Attachment 177360 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15121591 New failing tests: inspector-protocol/debugger-terminate-dedicated-worker-while-paused.html
Ken Kania
Comment 22 2012-12-04 09:37:11 PST
Nat, The dispatchKeyEvent command processes the key event synchronously, although some effects may be asynchronous (such as if the key stroke submitted a form which later causes a navigation). For your example, as long as the commands are sent in order, things will behave as you expect.
Yury Semikhatsky
Comment 23 2012-12-04 09:43:28 PST
(In reply to comment #21) > (From update of attachment 177360 [details]) > Attachment 177360 [details] did not pass chromium-ews (chromium-xvfb): > Output: http://queues.webkit.org/results/15121591 > > New failing tests: > inspector-protocol/debugger-terminate-dedicated-worker-while-paused.html Looks like a flakiness unrelated to the change.
WebKit Review Bot
Comment 24 2012-12-04 10:05:17 PST
Comment on attachment 177360 [details] Patch Clearing flags on attachment: 177360 Committed r136521: <http://trac.webkit.org/changeset/136521>
WebKit Review Bot
Comment 25 2012-12-04 10:05:24 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.