Bug 1037330 Don't enable TSF mode on WinXP nor WinServer 2003 with "intl.tsf.enable" r=jimm

This commit is contained in:
Masayuki Nakano 2014-07-12 02:09:59 +09:00
parent 63ab183605
commit 3ff4a8413a
2 changed files with 9 additions and 12 deletions

View File

@ -2747,8 +2747,11 @@ pref("network.autodial-helper.enabled", true);
pref("intl.keyboard.per_window_layout", false);
#ifdef NS_ENABLE_TSF
// Enable/Disable TSF support
// Enable/Disable TSF support on Vista or later.
pref("intl.tsf.enable", false);
// Force enable TSF even on WinXP or WinServer 2003.
// Be aware, TSF framework on prior to Vista is not enough stable.
pref("intl.tsf.force_enable", false);
// Support IMEs implemented with IMM in TSF mode.
pref("intl.tsf.support_imm", true);

View File

@ -28,9 +28,8 @@
using namespace mozilla;
using namespace mozilla::widget;
static const char* kPrefNameTSFEnabled = "intl.tsf.enable";
static const char* kLegacyPrefNameTSFEnabled = "intl.enable_tsf_support";
static const char* kPrefNameEnableTSF = "intl.tsf.enable";
static const char* kPrefNameForceEnableTSF = "intl.tsf.force_enable";
#ifdef PR_LOGGING
/**
@ -3710,14 +3709,9 @@ nsTextStore::Initialize()
return;
}
bool enableTsf = Preferences::GetBool(kPrefNameTSFEnabled, false);
// Migrate legacy TSF pref to new pref. This should be removed in next
// release cycle or later.
if (!enableTsf && Preferences::GetBool(kLegacyPrefNameTSFEnabled, false)) {
enableTsf = true;
Preferences::SetBool(kPrefNameTSFEnabled, true);
Preferences::ClearUser(kLegacyPrefNameTSFEnabled);
}
bool enableTsf =
Preferences::GetBool(kPrefNameForceEnableTSF, false) ||
(IsVistaOrLater() && Preferences::GetBool(kPrefNameEnableTSF, false));
PR_LOG(sTextStoreLog, PR_LOG_ALWAYS,
("TSF: nsTextStore::Initialize(), TSF is %s",
enableTsf ? "enabled" : "disabled"));