| 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 4bf356d7bacd92e7637a0cdb2f62a4120866f38a..64ce74d63ba2e9973248b9577f032f8bfc5843ba 100644
|
| --- a/chrome/browser/ui/input_method/input_method_engine_base.cc
|
| +++ b/chrome/browser/ui/input_method/input_method_engine_base.cc
|
| @@ -160,7 +160,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() {}
|
| @@ -388,19 +390,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);
|
|
|