Skip to content
Snippets Groups Projects
Commit 5fc97f8e authored by Robert Lord's avatar Robert Lord Committed by CQ bot account: commit-bot@chromium.org
Browse files

[text] Always forward hard key events to clients

This change implement's Viktar's idea to forward key events to legacy
input method editor clients, even if a new TextField-style input method
is connected.

Previously, if a new TextField-style input method was connected, key
events sent to ImeService would only be forwarded to that. Now, key
events are forwarded twice in these cases — once to the input method, so
it can determine any state changes, and once as a `forward_event` call
to any legacy ImeClients, so they can still get legacy key press
information that is not provided by the new TextField interface.

This change also makes inject_input on an Ime never send keystrokes
through DidUpdateState.

This means instead of a single DidUpdateState(new_state, key_event)
call, legacy text fields will get an initial DidUpdateState(old_state,
key_event) call followed by a DidUpdateState(new_state, None) call.

Change-Id: I557b7884618690f25e883e73ee2ad4c356a7fdd3
parent a8c5ea1a
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment