Bug 1234120 part.1 IMEHandler should request all notifications which are requested by either IMMHander or TSFTextStore when IMM is available in TSF mode r=m_kato

This commit is contained in:
Masayuki Nakano 2015-12-22 14:58:48 +09:00
Родитель 2fdd9a1152
Коммит 6c313126b6
2 изменённых файлов: 15 добавлений и 1 удалений

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

@ -71,6 +71,11 @@ struct nsIMEUpdatePreference final
{
}
nsIMEUpdatePreference operator|(const nsIMEUpdatePreference& aOther) const
{
return nsIMEUpdatePreference(aOther.mWantUpdates | mWantUpdates);
}
void DontNotifyChangesCausedByComposition()
{
mWantUpdates &= ~DEFAULT_CONDITIONS_OF_NOTIFYING_CHANGES;

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

@ -334,7 +334,16 @@ IMEHandler::GetUpdatePreference()
#ifdef NS_ENABLE_TSF
if (IsTSFAvailable()) {
return TSFTextStore::GetIMEUpdatePreference();
if (!sIsIMMEnabled) {
return TSFTextStore::GetIMEUpdatePreference();
}
// Even if TSF is available, the active IME may be an IMM-IME.
// Unfortunately, changing the result of GetUpdatePreference() while an
// editor has focus isn't supported by IMEContentObserver nor
// ContentCacheInParent. Therefore, we need to request whole notifications
// which are necessary either IMMHandler or TSFTextStore.
return IMMHandler::GetIMEUpdatePreference() |
TSFTextStore::GetIMEUpdatePreference();
}
#endif //NS_ENABLE_TSF