DescriptionRefactoring for InputMethodAuraLinux.
This basically brings back the original implementation of InputMethodGtk long time ago, which covered most of cases that haven't been covered by the current implementation (e.g. generate keypress event for the accent/dead keys).
Due to limitations of Aura framework, it is hard to get the native window (e.g. XWindow). Therefore, gtk_im_context_set_cursor_position cannot be called at the appropriate time. The current InputMethodAuraLinux implementation workarounds it to leverage the key event, which carries the information about native window, and call set_client_window in DispatchKeyEvent(). The basic scenarios work but some special scenario cannot work. For example, iBus Pinyin IME tries to show the status-bar-UI at the cursor position without typing any keys.
This cl keep the current logics for that and won't fix the issue.
And this cl removes the keyup of 229 keycode, which is unnecessary. Therefore, for 229 keycode, the IMF will not try to pair the keydown and keyup.
This cl adds some tests to avoid future regressions on basic scenarios which consider sync/async modes, ibus hacky behaviors, dead keys, multi-commits, etc.
Note that the tests don't cover all possible scenarios as the worldwide IMEs with different IM modules (xim, ibus, etc.).
TBR=sky@chromium.org
BUG=463491, 474828, 125161, 458179
TEST=Verified on local linux workstation.
Committed: https://crrev.com/fad763a26eb994725004358ffdb622f62b744812
Cr-Commit-Position: refs/heads/master@{#325372}
Patch Set 1 #Patch Set 2 : add more tests. #Patch Set 3 : fixed compiling failure. #
Total comments: 8
Patch Set 4 : addressed nona's comments. #
Total comments: 37
Patch Set 5 : nits per comments. #Patch Set 6 : consider to fix crbug.com/125161 #Patch Set 7 : Removes unexpected 229 keydown for non-IME users. #
Total comments: 16
Patch Set 8 : code-level refactoring and addressed suzhe's comments. #Patch Set 9 : #Patch Set 10 : fixed a bug and add tests. #
Total comments: 18
Patch Set 11 : add more tests and support verify event sequence. #
Total comments: 2
Patch Set 12 : Fixed a bug and update test. #Patch Set 13 : rebased. #Patch Set 14 : #Patch Set 15 : fixed interactive_ui_tests failure. #Messages
Total messages: 52 (12 generated)
|