mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1379997 - part2: Remove "intl.tsf.hack.ms_japanese_ime.do_not_associate_imc_on_win10" pref completely r=m_kato
"intl.tsf.hack.ms_japanese_ime.do_not_associate_imc_on_win10" should be unnecessary anymore because it failed to avoid the crash of MS-IME for Japanese but causing other regression. Therefore, this patch removes it completely. MozReview-Commit-ID: 91jjxfIYReW --HG-- extra : rebase_source : d261f5bf77c14c41562495574d87364a7bb2d4fc
This commit is contained in:
parent
c981f975f2
commit
3bbd4cc2d5
@ -3835,13 +3835,6 @@ pref("intl.tsf.hack.ms_traditional_chinese.do_not_return_no_layout_error", true)
|
||||
// ITfContextView::GetTextExt() if the specified range is the first character
|
||||
// of selected clause of composition string.
|
||||
pref("intl.tsf.hack.ms_japanese_ime.do_not_return_no_layout_error_at_first_char", true);
|
||||
// Whether default IMC should be associated with focused window when MS-IME
|
||||
// for Japanese on Win10 is active. MS-IME for Japanese on Win10 has a crash
|
||||
// bug. While restoring default IMC when MS-IME for Japanese is active,
|
||||
// it sometimes crashes after Creators Update. This pref avoid the crash.
|
||||
// Note that making this true causes bug 1379997 and cannot prevent the crash
|
||||
// mentioned above.
|
||||
pref("intl.tsf.hack.ms_japanese_ime.do_not_associate_imc_on_win10", false);
|
||||
// Whether use previous character rect for the result of
|
||||
// ITfContextView::GetTextExt() if the specified range is the caret of
|
||||
// composition string.
|
||||
|
@ -421,19 +421,7 @@ IMEHandler::OnDestroyWindow(nsWindow* aWindow)
|
||||
bool
|
||||
IMEHandler::NeedsToAssociateIMC()
|
||||
{
|
||||
if (sAssociateIMCOnlyWhenIMM_IMEActive) {
|
||||
return IsIMMActive();
|
||||
}
|
||||
|
||||
// Even if IMC should be associated with focused widget with non-IMM-IME,
|
||||
// we need to avoid crash bug of MS-IME for Japanese on Win10. It crashes
|
||||
// while we're associating default IME to a window when it's active.
|
||||
static const bool sDoNotAssociateIMCWhenMSJapaneseIMEActiveOnWin10 =
|
||||
IsWin10OrLater() &&
|
||||
Preferences::GetBool(
|
||||
"intl.tsf.hack.ms_japanese_ime.do_not_associate_imc_on_win10", true);
|
||||
return !sDoNotAssociateIMCWhenMSJapaneseIMEActiveOnWin10 ||
|
||||
!TSFTextStore::IsMSJapaneseIMEActive();
|
||||
return !sAssociateIMCOnlyWhenIMM_IMEActive || !IsIMMActive();
|
||||
}
|
||||
#endif // #ifdef NS_ENABLE_TSF
|
||||
|
||||
@ -566,6 +554,13 @@ IMEHandler::OnKeyboardLayoutChanged()
|
||||
return;
|
||||
}
|
||||
|
||||
// We don't need to do anything when sAssociateIMCOnlyWhenIMM_IMEActive is
|
||||
// false because IMContext won't be associated/disassociated when changing
|
||||
// active keyboard layout/IME.
|
||||
if (!sAssociateIMCOnlyWhenIMM_IMEActive) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If there is no TSFTextStore which has focus, i.e., no editor has focus,
|
||||
// nothing to do here.
|
||||
nsWindowBase* windowBase = TSFTextStore::GetEnabledWindowBase();
|
||||
|
Loading…
Reference in New Issue
Block a user