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

Unified Diff: ui/base/ime/input_method_auralinux.cc

Issue 1801363005: Fix bug of input.ime.onKeyEvent on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/base/ime/input_method_auralinux.cc
diff --git a/ui/base/ime/input_method_auralinux.cc b/ui/base/ime/input_method_auralinux.cc
index 08ec50bdc22f902b1eefda6d94da01f84343ec82..b67cd78b9898304f4eb92b35e82caa8e284f2b34 100644
--- a/ui/base/ime/input_method_auralinux.cc
+++ b/ui/base/ime/input_method_auralinux.cc
@@ -104,16 +104,29 @@ void InputMethodAuraLinux::DispatchKeyEvent(ui::KeyEvent* event) {
if (text_input_type_ != TEXT_INPUT_TYPE_PASSWORD &&
GetEngine() && GetEngine()->IsInterestedInKeyEvent() &&
(!filtered || NeedInsertChar())) {
- ui::IMEEngineHandlerInterface::KeyEventDoneCallback callback =
- base::Bind(&InputMethodAuraLinux::ProcessKeyEventDone,
- weak_ptr_factory_.GetWeakPtr(),
- base::Owned(new ui::KeyEvent(*event)), filtered);
+ ui::IMEEngineHandlerInterface::KeyEventDoneCallback callback = base::Bind(
+ &InputMethodAuraLinux::ProcessKeyEventByEngineDone,
+ weak_ptr_factory_.GetWeakPtr(), base::Owned(new ui::KeyEvent(*event)),
+ filtered, composition_changed_, composition_, result_text_);
Shu Chen 2016/03/17 06:37:08 I think this is wrong. Please consider why the Key
Azure Wei 2016/03/17 07:02:37 Done.
GetEngine()->ProcessKeyEvent(*event, callback);
} else {
ProcessKeyEventDone(event, filtered, false);
}
}
+void InputMethodAuraLinux::ProcessKeyEventByEngineDone(
+ ui::KeyEvent* event,
+ bool filtered,
+ bool composition_changed,
+ const ui::CompositionText& composition,
+ const base::string16& result_text,
+ bool is_handled) {
+ composition_changed_ = composition_changed;
+ composition_.CopyFrom(composition);
+ result_text_ = result_text;
+ ProcessKeyEventDone(event, filtered, is_handled);
+}
+
void InputMethodAuraLinux::ProcessKeyEventDone(ui::KeyEvent* event,
bool filtered,
bool is_handled) {
« ui/base/ime/input_method_auralinux.h ('K') | « ui/base/ime/input_method_auralinux.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698