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

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

Issue 149153005: Fixes the issue that CharacterComposer always update the composition text (CrOS). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/input_method_chromeos.cc
diff --git a/ui/base/ime/input_method_chromeos.cc b/ui/base/ime/input_method_chromeos.cc
index e12697ea3dd805a84aa2eb4afecac14ef0772598..79062289adf45b360ac64cd74fba03b210f32ec0 100644
--- a/ui/base/ime/input_method_chromeos.cc
+++ b/ui/base/ime/input_method_chromeos.cc
@@ -553,19 +553,21 @@ void InputMethodChromeOS::DeleteSurroundingText(int32 offset, uint32 length) {
}
bool InputMethodChromeOS::ExecuteCharacterComposer(const ui::KeyEvent& event) {
- bool consumed = character_composer_.FilterKeyPress(event);
+ if (!character_composer_.FilterKeyPress(event))
+ return false;
+ // CharacterComposer consumed the key event. Update the composition text.
chromeos::IBusText preedit;
preedit.set_text(
base::UTF16ToUTF8(character_composer_.preedit_string()));
UpdatePreeditText(preedit, preedit.text().size(),
!preedit.text().empty());
- std::string commit_text =
+ std::string commit_text =
base::UTF16ToUTF8(character_composer_.composed_character());
if (!commit_text.empty()) {
CommitText(commit_text);
}
- return consumed;
+ return true;
}
void InputMethodChromeOS::ExtractCompositionText(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698