Bug 1167105 - Part 1. Set temporary range until OnSelectionChange is called. r=masayuki

This commit is contained in:
Makoto Kato 2015-07-21 21:47:32 +09:00
Родитель c6fe51dba6
Коммит 89466de2cb
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -2925,6 +2925,13 @@ IMEInputHandler::SetMarkedText(NSAttributedString* aAttrString,
if (!str.IsEmpty()) {
OnUpdateIMEComposition([aAttrString string]);
// Set temprary range for Apple Japanese IME with e10s because
// SelectedRange may return invalid range until OnSelectionChange is
// called from content process.
// This value will be updated by OnSelectionChange soon.
mSelectedRange.location = aSelectedRange.location + mMarkedRange.location;
mSelectedRange.length = aSelectedRange.length;
DispatchCompositionChangeEvent(str, aAttrString, aSelectedRange);
if (Destroyed()) {
MOZ_LOG(gLog, LogLevel::Info,