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

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

Issue 13812013: Fix ibus-m17n crash due to wrong parameter from Chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix corrdinate conversion Created 7 years, 8 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 | ui/base/ime/input_method_ibus_unittest.cc » ('j') | ui/base/ime/input_method_ibus_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/input_method_ibus.cc
diff --git a/ui/base/ime/input_method_ibus.cc b/ui/base/ime/input_method_ibus.cc
index cce1f3df04ca479ac372ea4447e5a0e11598b184..d54f55a3f06508a950c167feb58f2f277197ace7 100644
--- a/ui/base/ime/input_method_ibus.cc
+++ b/ui/base/ime/input_method_ibus.cc
@@ -267,13 +267,12 @@ void InputMethodIBus::OnCaretBoundsChanged(const TextInputClient* client) {
previous_selection_range_ = selection_range;
previous_surrounding_text_ = surrounding_text;
- // In the original meaning of SetSurroundingText is not just selection text,
- // but currently there are no way to retrieve surrounding text in
- // TextInputClient.
GetInputContextClient()->SetSurroundingText(
UTF16ToUTF8(surrounding_text),
- selection_range.start(), /* cursor position. */
- selection_range.end()); /* selection anchor position. */
+ // cursor position.
kinaba 2013/04/10 04:30:04 please add a comment that the position has to be g
Seigo Nonaka 2013/04/10 05:15:54 Done.
+ selection_range.start() - text_range.start(),
+ // selection anchor position.
+ selection_range.end() - text_range.start());
}
void InputMethodIBus::CancelComposition(const TextInputClient* client) {
« no previous file with comments | « no previous file | ui/base/ime/input_method_ibus_unittest.cc » ('j') | ui/base/ime/input_method_ibus_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698