| Index: chrome/browser/ui/input_method/input_method_engine_base.cc
|
| diff --git a/chrome/browser/ui/input_method/input_method_engine_base.cc b/chrome/browser/ui/input_method/input_method_engine_base.cc
|
| index 6d7a6f5a8967573d0bce3ed8f1092e355cc10fc0..322d596a752897421e376fcb686e925787ab75e5 100644
|
| --- a/chrome/browser/ui/input_method/input_method_engine_base.cc
|
| +++ b/chrome/browser/ui/input_method/input_method_engine_base.cc
|
| @@ -163,7 +163,9 @@ InputMethodEngineBase::InputMethodEngineBase()
|
| sent_key_event_(nullptr),
|
| profile_(nullptr),
|
| next_request_id_(1),
|
| + composition_changed_(false),
|
| text_(""),
|
| + commit_text_changed_(false),
|
| handling_key_event_(false) {}
|
|
|
| InputMethodEngineBase::~InputMethodEngineBase() {}
|
| @@ -391,19 +393,21 @@ void InputMethodEngineBase::KeyEventHandled(const std::string& extension_id,
|
| // and setComposition calls.
|
| ui::IMEInputContextHandlerInterface* input_context =
|
| ui::IMEBridge::Get()->GetInputContextHandler();
|
| - if (!text_.empty()) {
|
| + if (commit_text_changed_) {
|
| if (input_context) {
|
| input_context->CommitText(text_);
|
| }
|
| text_ = "";
|
| + commit_text_changed_ = false;
|
| }
|
|
|
| - if (!composition_.text.empty()) {
|
| + if (composition_changed_) {
|
| if (input_context) {
|
| input_context->UpdateCompositionText(
|
| composition_, composition_.selection.start(), true);
|
| }
|
| composition_.Clear();
|
| + composition_changed_ = false;
|
| }
|
|
|
| RequestMap::iterator request = request_map_.find(request_id);
|
|
|