Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Issue 2387353004: Delay Input.dispatchKeyEvent response until after key event ack. (Closed)

Created:
4 years, 2 months ago by samuong
Modified:
4 years ago
CC:
chromium-reviews, caseq+blink_chromium.org, jam, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, darin-cc_chromium.org, pfeldman, kozyatinskiy+blink_chromium.org, Alexei Svitkine (slow), Charlie Harrison
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Delay Input.dispatchKeyEvent response until after key event ack. BUG=chromedriver:1506 Committed: https://crrev.com/235dd76ed8ea15f62aa1f726d5d451bfe0e96fc4 Cr-Commit-Position: refs/heads/master@{#437706}

Patch Set 1 #

Patch Set 2 : add flag to distinguish synthetic key events from user events, and add InputEventObserver::OnKeyboa… #

Patch Set 3 : OnKeyboardEventAck -> OnInputEventAck #

Patch Set 4 : rebase, make sure that tests build and run #

Total comments: 6

Patch Set 5 : fix some review comments, fix a bug #

Total comments: 6

Patch Set 6 : add test, address review comments about docs #

Total comments: 1

Patch Set 7 : remove |is_synthetic|, fixed bug for mouse acks, add test for mouse events #

Total comments: 4

Patch Set 8 : fix nits #

Total comments: 8

Patch Set 9 : address some review comments #

Patch Set 10 : add call to InputHandler::Detached #

Patch Set 11 : fix test #

Total comments: 8

Patch Set 12 : fix nits #

Patch Set 13 : provide default implementation for InputEventObserver methods #

Patch Set 14 : remove another unneccesary OnInputEventAck override #

Patch Set 15 : rebase, make InputHandler::host_ a weak pointer instead of a raw pointer #

Patch Set 16 : undo weakptr change, rebase to pull in dgozman's fix (crrev.com/437658) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+189 lines, -17 lines) Patch
M content/browser/devtools/protocol/devtools_protocol_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +78 lines, -10 lines 0 comments Download
M content/browser/devtools/protocol/devtools_protocol_handler_generator.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/devtools/protocol/input_handler.h View 1 2 3 4 5 6 7 8 15 5 chunks +23 lines, -4 lines 0 comments Download
M content/browser/devtools/protocol/input_handler.cc View 1 2 3 4 5 6 7 8 15 7 chunks +65 lines, -0 lines 0 comments Download
M content/browser/devtools/render_frame_devtools_agent_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +10 lines, -0 lines 0 comments Download
M content/public/browser/render_widget_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -2 lines 0 comments Download
M content/public/test/browser_test_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/test/browser_test_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 52 (17 generated)
samuong
As discussed, I've added a bool NativeWebKeyboardEvent::is_synthetic and InputEventObserver::OnInputEventAck, and make InputHandler an InputEventObserver. PTAL?
4 years, 2 months ago (2016-10-11 18:42:12 UTC) #2
tdresser
Can we add a test for this? https://codereview.chromium.org/2387353004/diff/60001/content/browser/devtools/protocol/input_handler.cc File content/browser/devtools/protocol/input_handler.cc (right): https://codereview.chromium.org/2387353004/diff/60001/content/browser/devtools/protocol/input_handler.cc#newcode141 content/browser/devtools/protocol/input_handler.cc:141: bool was_synthetic) ...
4 years, 2 months ago (2016-10-12 19:49:36 UTC) #3
samuong
While retesting this in Forge, I did notice that I introduced a regression in ps2 ...
4 years, 2 months ago (2016-10-13 22:59:10 UTC) #4
dtapuska
https://codereview.chromium.org/2387353004/diff/80001/content/browser/devtools/protocol/input_handler.cc File content/browser/devtools/protocol/input_handler.cc (right): https://codereview.chromium.org/2387353004/diff/80001/content/browser/devtools/protocol/input_handler.cc#newcode228 content/browser/devtools/protocol/input_handler.cc:228: host_->AddInputEventObserver(this); So is it possible to call this API ...
4 years, 2 months ago (2016-10-14 19:06:29 UTC) #5
dtapuska
On 2016/10/14 19:06:29, dtapuska wrote: > https://codereview.chromium.org/2387353004/diff/80001/content/browser/devtools/protocol/input_handler.cc > File content/browser/devtools/protocol/input_handler.cc (right): > > https://codereview.chromium.org/2387353004/diff/80001/content/browser/devtools/protocol/input_handler.cc#newcode228 > ...
4 years, 2 months ago (2016-10-14 19:16:42 UTC) #6
samuong
Sorry I got sidetracked with some other high-priority bugs, and only got back to this ...
4 years, 2 months ago (2016-10-20 23:36:18 UTC) #7
samuong
I've removed the is_synthetic property, since I don't have a good way to do this ...
4 years, 1 month ago (2016-11-18 22:14:50 UTC) #8
dtapuska
lgtm % nits https://codereview.chromium.org/2387353004/diff/120001/content/browser/devtools/protocol/input_handler.cc File content/browser/devtools/protocol/input_handler.cc (right): https://codereview.chromium.org/2387353004/diff/120001/content/browser/devtools/protocol/input_handler.cc#newcode169 content/browser/devtools/protocol/input_handler.cc:169: host->AddInputEventObserver(this); I'd expect host_ = host ...
4 years, 1 month ago (2016-11-21 14:49:45 UTC) #9
samuong
+dgozman@ for devtools changes https://codereview.chromium.org/2387353004/diff/120001/content/browser/devtools/protocol/input_handler.cc File content/browser/devtools/protocol/input_handler.cc (right): https://codereview.chromium.org/2387353004/diff/120001/content/browser/devtools/protocol/input_handler.cc#newcode169 content/browser/devtools/protocol/input_handler.cc:169: host->AddInputEventObserver(this); On 2016/11/21 14:49:44, dtapuska ...
4 years, 1 month ago (2016-11-21 18:05:35 UTC) #11
dgozman
Looks very good! https://codereview.chromium.org/2387353004/diff/140001/content/browser/devtools/protocol/input_handler.cc File content/browser/devtools/protocol/input_handler.cc (right): https://codereview.chromium.org/2387353004/diff/140001/content/browser/devtools/protocol/input_handler.cc#newcode158 content/browser/devtools/protocol/input_handler.cc:158: for (const DevToolsCommandId& command_id : pending_key_command_ids_) ...
4 years, 1 month ago (2016-11-21 19:14:39 UTC) #12
samuong
https://codereview.chromium.org/2387353004/diff/140001/content/browser/devtools/protocol/input_handler.cc File content/browser/devtools/protocol/input_handler.cc (right): https://codereview.chromium.org/2387353004/diff/140001/content/browser/devtools/protocol/input_handler.cc#newcode158 content/browser/devtools/protocol/input_handler.cc:158: for (const DevToolsCommandId& command_id : pending_key_command_ids_) On 2016/11/21 19:14:39, ...
4 years, 1 month ago (2016-11-21 22:28:44 UTC) #13
dgozman
> I've added an InputHandler::Detached method, but there's no superclass Detached > method that I'm ...
4 years, 1 month ago (2016-11-21 22:34:01 UTC) #14
samuong
https://codereview.chromium.org/2387353004/diff/140001/content/browser/devtools/protocol/input_handler.cc File content/browser/devtools/protocol/input_handler.cc (right): https://codereview.chromium.org/2387353004/diff/140001/content/browser/devtools/protocol/input_handler.cc#newcode158 content/browser/devtools/protocol/input_handler.cc:158: for (const DevToolsCommandId& command_id : pending_key_command_ids_) On 2016/11/21 22:28:43, ...
4 years, 1 month ago (2016-11-23 00:37:48 UTC) #15
dgozman
lgtm https://codereview.chromium.org/2387353004/diff/200001/content/browser/devtools/render_frame_devtools_agent_host.cc File content/browser/devtools/render_frame_devtools_agent_host.cc (right): https://codereview.chromium.org/2387353004/diff/200001/content/browser/devtools/render_frame_devtools_agent_host.cc#newcode583 content/browser/devtools/render_frame_devtools_agent_host.cc:583: if (input_handler_) I think it's never null (created ...
4 years, 1 month ago (2016-11-23 02:03:53 UTC) #16
tdresser
LGTM https://codereview.chromium.org/2387353004/diff/200001/content/browser/devtools/protocol/devtools_protocol_browsertest.cc File content/browser/devtools/protocol/devtools_protocol_browsertest.cc (right): https://codereview.chromium.org/2387353004/diff/200001/content/browser/devtools/protocol/devtools_protocol_browsertest.cc#newcode488 content/browser/devtools/protocol/devtools_protocol_browsertest.cc:488: // event ack, adn the subsequent command response ...
4 years ago (2016-11-23 13:38:13 UTC) #17
samuong
+mpearson@ for: chrome/browser/metrics/desktop_session_duration/desktop_session_duration_observer.h +csharrison@ for: chrome/browser/page_load_metrics/metrics_web_contents_observer.h +pfeldman@ for: content/browser/site_per_process_browsertest.cc content/public/browser/render_widget_host.h content/public/test/browser_test_utils.cc content/public/test/browser_test_utils.h https://codereview.chromium.org/2387353004/diff/200001/content/browser/devtools/protocol/devtools_protocol_browsertest.cc File content/browser/devtools/protocol/devtools_protocol_browsertest.cc ...
4 years ago (2016-11-23 18:40:48 UTC) #19
tdresser
https://codereview.chromium.org/2387353004/diff/200001/content/browser/devtools/render_frame_devtools_agent_host.cc File content/browser/devtools/render_frame_devtools_agent_host.cc (right): https://codereview.chromium.org/2387353004/diff/200001/content/browser/devtools/render_frame_devtools_agent_host.cc#newcode583 content/browser/devtools/render_frame_devtools_agent_host.cc:583: if (input_handler_) On 2016/11/23 18:40:48, samuong wrote: > On ...
4 years ago (2016-11-23 18:52:46 UTC) #20
Mark P
On 2016/11/23 18:40:48, samuong wrote: > +mpearson@ for: > chrome/browser/metrics/desktop_session_duration/desktop_session_duration_observer.h I am not familiar with ...
4 years ago (2016-11-23 19:08:16 UTC) #21
samuong
-mpearson@ +asvitkine@, are you able to do an owner review for desktop_session_duration_observer.h? I've added a ...
4 years ago (2016-11-23 19:34:24 UTC) #23
Alexei Svitkine (slow)
Why not have the base class provide the empty implementation so you don't need to ...
4 years ago (2016-11-23 20:03:47 UTC) #24
Charlie Harrison
+1 to asvitkine. FYI I will be OOO from about now to Monday, so you ...
4 years ago (2016-11-23 20:10:14 UTC) #25
samuong
OK, I've added a default empty implementation for InputEventObserver::OnInputEventAck. For consistency, I've done the same ...
4 years ago (2016-11-23 20:57:39 UTC) #27
pfeldman
lgtm
4 years ago (2016-11-23 21:22:29 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2387353004/260001
4 years ago (2016-11-23 21:29:47 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/343770)
4 years ago (2016-11-24 02:16:06 UTC) #33
tdresser
Still LGTM.
4 years ago (2016-11-24 14:43:32 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2387353004/260001
4 years ago (2016-11-28 17:36:01 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/345379)
4 years ago (2016-11-28 21:52:59 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2387353004/260001
4 years ago (2016-11-28 22:14:47 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/345890)
4 years ago (2016-11-29 02:13:45 UTC) #42
samuong
The try job failures (which unfortunately don't reproduce on my local machine) happen because the ...
4 years ago (2016-12-01 00:08:44 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2387353004/300001
4 years ago (2016-12-09 21:58:40 UTC) #46
commit-bot: I haz the power
Committed patchset #16 (id:300001)
4 years ago (2016-12-10 01:06:38 UTC) #49
gab
A revert of this CL (patchset #16 id:300001) has been created in https://codereview.chromium.org/2565313002/ by gab@chromium.org. ...
4 years ago (2016-12-12 05:45:38 UTC) #50
commit-bot: I haz the power
4 years ago (2016-12-12 14:59:01 UTC) #52
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/235dd76ed8ea15f62aa1f726d5d451bfe0e96fc4
Cr-Commit-Position: refs/heads/master@{#437706}

Powered by Google App Engine
This is Rietveld 408576698