Chromium Code Reviews
DescriptionRespect 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 #Messages
Total messages: 44 (12 generated)
|