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

Issue 1877073003: Respect the order of input messages from browser to renderer (Closed)

Created:
4 years, 8 months ago by Changwan Ryu
Modified:
4 years, 6 months ago
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dtapuska+chromiumwatch_chromium.org, dtapuska, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, yabinh
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Respect the order of input messages from browser to renderer When we call InputConnection#setSelection and other methods together, the order sometimes does not get kept. The reason is that SetEditableSelectionOffsets is a frame message while all the others are input messages, and they go to different message queues. In addition, RenderViewImpl is the only who registers its routing ID through InputHandlerManager::AddInputHandler() call. RenderFrameImpl, on the other hand, does not register itself. Once routing ID is registered, InputEventFilter will post input messages to compositor impl thread first (such that scrolling can happen inside compositor impl thread and keep in line with other input message handling order). We fix this by 1) Changing SetEditableSelectionOffsets from FrameMsg to InputMsg. (Now there is no remaining frame messages in ime_adapter_android.cc.) 2) Change DidAddInputHandler() and DidRemoveInputHandler() names to RegisterRoutingID() and UnregisterRoutingID(), respectively. 3) Register RenderFrame's routing ID at InputEventFilter. BUG=601707 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/d659e20ed5d564cca67934147b481a32a59f3f6a Cr-Commit-Position: refs/heads/master@{#399404}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : rebased #

Patch Set 6 : fixed OOPIF case #

Patch Set 7 : rebased #

Total comments: 9

Patch Set 8 : unregister, updated comments, removed if #

Patch Set 9 : rebased #

Patch Set 10 : moved DCHECK inside if scope #

Total comments: 4

Patch Set 11 : add DCHECKs for thread #

Unified diffs Side-by-side diffs Delta from patch set Stats (+141 lines, -37 lines) Patch
M content/browser/frame_host/interstitial_page_impl_browsertest.cc View 1 2 3 4 5 6 7 8 9 4 chunks +13 lines, -0 lines 0 comments Download
M content/browser/renderer_host/ime_adapter_android.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -3 lines 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -6 lines 0 comments Download
M content/common/input_messages.h View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java View 1 2 3 4 5 6 7 8 1 chunk +24 lines, -0 lines 0 comments Download
M content/public/renderer/render_view.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/input/input_event_filter.h View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M content/renderer/input/input_event_filter.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M content/renderer/input/input_event_filter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +5 lines, -5 lines 0 comments Download
M content/renderer/input/input_handler_manager.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -0 lines 0 comments Download
M content/renderer/input/input_handler_manager.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +35 lines, -2 lines 0 comments Download
M content/renderer/input/input_handler_manager_client.h View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M content/renderer/mus/compositor_mus_connection_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +19 lines, -2 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +18 lines, -11 lines 0 comments Download

Messages

Total messages: 44 (12 generated)
Changwan Ryu
4 years, 8 months ago (2016-04-15 00:29:06 UTC) #4
aelias_OOO_until_Jul13
lgtm, but please wait for tdresser@ to double-check the routing ID change in content/renderer/input/input_handler_manager.cc before ...
4 years, 8 months ago (2016-04-15 00:42:49 UTC) #6
tdresser
content/renderer/input/input_handler_manager.cc LGTM
4 years, 8 months ago (2016-04-18 14:12:25 UTC) #7
Changwan Ryu
sievers@, could you take a look?
4 years, 8 months ago (2016-04-19 04:58:09 UTC) #9
Changwan Ryu
palmer@chromium.org: Please review changes in content/common/.
4 years, 8 months ago (2016-04-19 05:00:14 UTC) #11
no sievers
This is subtle, and overall it looks like we are (and probably have been) using ...
4 years, 8 months ago (2016-04-19 21:27:50 UTC) #13
nasko
kenrb@ is our expert on input events, so I'll defer to him for reviewing this.
4 years, 8 months ago (2016-04-20 17:31:47 UTC) #15
kenrb
On 2016/04/19 21:27:50, sievers wrote: > This is subtle, and overall it looks like we ...
4 years, 8 months ago (2016-04-20 20:47:07 UTC) #16
kenrb
Hmm, to fill that thought out a bit more... Registering RenderFrameImpl's routing ID might just ...
4 years, 8 months ago (2016-04-20 20:59:21 UTC) #17
Changwan Ryu
On 2016/04/20 20:59:21, kenrb wrote: > Hmm, to fill that thought out a bit more... ...
4 years, 8 months ago (2016-04-25 08:21:51 UTC) #18
kenrb
On 2016/04/25 08:21:51, Changwan Ryu wrote: > On 2016/04/20 20:59:21, kenrb wrote: > > Hmm, ...
4 years, 8 months ago (2016-04-25 15:56:17 UTC) #19
Changwan Ryu
On 2016/04/25 15:56:17, kenrb wrote: > On 2016/04/25 08:21:51, Changwan Ryu wrote: > > On ...
4 years, 8 months ago (2016-04-25 16:44:52 UTC) #20
kenrb
On 2016/04/25 16:44:52, Changwan Ryu wrote: > The purpose of registering the routing ID (as ...
4 years, 8 months ago (2016-04-26 18:29:24 UTC) #21
Changwan Ryu
On 2016/04/26 18:29:24, kenrb wrote: > On 2016/04/25 16:44:52, Changwan Ryu wrote: > > The ...
4 years, 7 months ago (2016-04-28 04:43:18 UTC) #22
kenrb
lgtm (overall, and as owner for IPC files) On 2016/04/28 04:43:18, Changwan Ryu wrote: > ...
4 years, 7 months ago (2016-04-28 15:07:45 UTC) #23
Changwan Ryu
On 2016/04/28 15:07:45, kenrb wrote: > lgtm (overall, and as owner for IPC files) > ...
4 years, 7 months ago (2016-04-29 00:11:34 UTC) #24
Changwan Ryu
On 2016/04/29 00:11:34, Changwan Ryu wrote: > On 2016/04/28 15:07:45, kenrb wrote: > > lgtm ...
4 years, 7 months ago (2016-05-03 01:37:36 UTC) #25
Ken Rockot(use gerrit already)
On 2016/05/03 at 01:37:36, changwan wrote: > On 2016/04/29 00:11:34, Changwan Ryu wrote: > > ...
4 years, 7 months ago (2016-05-03 01:46:58 UTC) #26
Changwan Ryu
On 2016/05/03 01:46:58, Ken Rockot wrote: > On 2016/05/03 at 01:37:36, changwan wrote: > > ...
4 years, 7 months ago (2016-05-23 03:07:37 UTC) #27
Changwan Ryu
On 2016/05/23 03:07:37, Changwan Ryu wrote: > On 2016/05/03 01:46:58, Ken Rockot wrote: > > ...
4 years, 7 months ago (2016-05-26 00:25:12 UTC) #28
Changwan Ryu
On 2016/05/26 00:25:12, Changwan Ryu wrote: > On 2016/05/23 03:07:37, Changwan Ryu wrote: > > ...
4 years, 6 months ago (2016-06-01 06:17:33 UTC) #29
no sievers
https://codereview.chromium.org/1877073003/diff/120001/content/public/renderer/render_view.h File content/public/renderer/render_view.h (right): https://codereview.chromium.org/1877073003/diff/120001/content/public/renderer/render_view.h#newcode154 content/public/renderer/render_view.h:154: // Whether we have added input handler or not. ...
4 years, 6 months ago (2016-06-01 22:14:47 UTC) #30
Changwan Ryu
https://codereview.chromium.org/1877073003/diff/120001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1877073003/diff/120001/content/renderer/render_frame_impl.cc#newcode1228 content/renderer/render_frame_impl.cc:1228: if (render_view_ && render_view_->HasAddedInputHandler()) { On 2016/06/01 22:14:47, sievers ...
4 years, 6 months ago (2016-06-02 10:49:06 UTC) #31
no sievers
On 2016/06/02 10:49:06, Changwan Ryu wrote: > https://codereview.chromium.org/1877073003/diff/120001/content/renderer/render_frame_impl.cc > File content/renderer/render_frame_impl.cc (right): > > https://codereview.chromium.org/1877073003/diff/120001/content/renderer/render_frame_impl.cc#newcode1228 ...
4 years, 6 months ago (2016-06-02 17:16:09 UTC) #32
Changwan Ryu
https://codereview.chromium.org/1877073003/diff/120001/content/public/renderer/render_view.h File content/public/renderer/render_view.h (right): https://codereview.chromium.org/1877073003/diff/120001/content/public/renderer/render_view.h#newcode154 content/public/renderer/render_view.h:154: // Whether we have added input handler or not. ...
4 years, 6 months ago (2016-06-03 06:48:29 UTC) #33
Changwan Ryu
On 2016/06/03 06:48:29, Changwan Ryu wrote: > https://codereview.chromium.org/1877073003/diff/120001/content/public/renderer/render_view.h > File content/public/renderer/render_view.h (right): > > https://codereview.chromium.org/1877073003/diff/120001/content/public/renderer/render_view.h#newcode154 ...
4 years, 6 months ago (2016-06-09 04:26:08 UTC) #34
no sievers
lgtm https://codereview.chromium.org/1877073003/diff/180001/content/renderer/input/input_handler_manager.cc File content/renderer/input/input_handler_manager.cc (right): https://codereview.chromium.org/1877073003/diff/180001/content/renderer/input/input_handler_manager.cc#newcode143 content/renderer/input/input_handler_manager.cc:143: void InputHandlerManager::RegisterRoutingIDOnCompositorThread(int routing_id) { nit: DCHECK(task_runner_->BelongsToCurrentThread()); https://codereview.chromium.org/1877073003/diff/180001/content/renderer/input/input_handler_manager.cc#newcode160 content/renderer/input/input_handler_manager.cc:160: ...
4 years, 6 months ago (2016-06-10 19:58:30 UTC) #35
palmer
lgtm
4 years, 6 months ago (2016-06-10 20:44:24 UTC) #36
Changwan Ryu
https://codereview.chromium.org/1877073003/diff/180001/content/renderer/input/input_handler_manager.cc File content/renderer/input/input_handler_manager.cc (right): https://codereview.chromium.org/1877073003/diff/180001/content/renderer/input/input_handler_manager.cc#newcode143 content/renderer/input/input_handler_manager.cc:143: void InputHandlerManager::RegisterRoutingIDOnCompositorThread(int routing_id) { On 2016/06/10 19:58:30, sievers wrote: ...
4 years, 6 months ago (2016-06-13 01:20:59 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1877073003/200001
4 years, 6 months ago (2016-06-13 01:21:19 UTC) #40
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 6 months ago (2016-06-13 02:39:29 UTC) #42
commit-bot: I haz the power
4 years, 6 months ago (2016-06-13 02:40:48 UTC) #44
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/d659e20ed5d564cca67934147b481a32a59f3f6a
Cr-Commit-Position: refs/heads/master@{#399404}

Powered by Google App Engine
This is Rietveld 408576698