Bug 1372483 - Get rid of the hack for Easy Changjei from TSFTextStore since it isn't available on Firefox anymore r?m_kato draft
authorMasayuki Nakano <masayuki@d-toybox.com>
Wed, 14 Jun 2017 14:20:27 +0900
changeset 593808 48c70f784d4926fadca1dbd4a217beeacaf09a72
parent 593717 b266a8d8fd595b84a7d6218d7b8c6b7af0b5027c
child 593811 e1392ead5a2213a44b298945fdc5b2c9f82aaeb5
push id63813
push usermasayuki@d-toybox.com
push dateWed, 14 Jun 2017 06:03:52 +0000
reviewersm_kato
bugs1372483
milestone56.0a1
Bug 1372483 - Get rid of the hack for Easy Changjei from TSFTextStore since it isn't available on Firefox anymore r?m_kato Easy Changjei, a Traditional Chinese IME, isn't available on Firefox because: * The vendor has gone and nobody keeps maintaining it. * It crashes at first key press since it was built with older Visual Studio and depends on the version's CRT. Therefore, we don't need to support it anymore. MozReview-Commit-ID: LjyAvWsrlJ1
modules/libpref/init/all.js
widget/windows/TSFTextStore.cpp
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -3716,18 +3716,16 @@ pref("intl.tsf.hack.atok.do_not_return_n
 // ITfContextView::GetTextExt() if the specified range is larger than
 // composition start offset.
 // For Free ChangJie 2010
 pref("intl.tsf.hack.free_chang_jie.do_not_return_no_layout_error", true);
 // For Microsoft Pinyin and Microsoft Wubi
 pref("intl.tsf.hack.ms_simplified_chinese.do_not_return_no_layout_error", true);
 // For Microsoft ChangJie and Microsoft Quick
 pref("intl.tsf.hack.ms_traditional_chinese.do_not_return_no_layout_error", true);
-// For Easy Changjei
-pref("intl.tsf.hack.easy_changjei.do_not_return_no_layout_error", true);
 // Whether use previous character rect for the result of
 // 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.
--- a/widget/windows/TSFTextStore.cpp
+++ b/widget/windows/TSFTextStore.cpp
@@ -1093,17 +1093,16 @@ public:
   DECL_AND_IMPL_IS_TIP_ACTIVE(IsATOK2013Active)
   DECL_AND_IMPL_IS_TIP_ACTIVE(IsATOK2014Active)
   DECL_AND_IMPL_IS_TIP_ACTIVE(IsATOK2015Active)
   DECL_AND_IMPL_IS_TIP_ACTIVE(IsATOK2016Active)
 
   DECL_AND_IMPL_IS_TIP_ACTIVE(IsMSChangJieActive)
   DECL_AND_IMPL_IS_TIP_ACTIVE(IsMSQuickQuickActive)
   DECL_AND_IMPL_IS_TIP_ACTIVE(IsFreeChangJieActive)
-  DECL_AND_IMPL_IS_TIP_ACTIVE(IsEasyChangjeiActive)
 
   DECL_AND_IMPL_IS_TIP_ACTIVE(IsMSPinyinActive)
   DECL_AND_IMPL_IS_TIP_ACTIVE(IsMSWubiActive)
 
 #undef DECL_AND_IMPL_IS_TIP_ACTIVE
 
   // Note that ATOK 2011 - 2016 refers native caret position for deciding its
   // popup window position.
@@ -1246,24 +1245,16 @@ private:
   }
 
   bool IsFreeChangJieActiveInternal() const
   {
     // FYI: The TIP name is misspelled...
     return mActiveTIPKeyboardDescription.EqualsLiteral("Free CangJie IME 10");
   }
 
-  bool IsEasyChangjeiActiveInternal() const
-  {
-    return
-      mActiveTIPKeyboardDescription.Equals(
-        NS_LITERAL_STRING(
-          u"\x4E2D\x6587 (\x7E41\x9AD4) - \x6613\x9821\x8F38\x5165\x6CD5"));
-  }
-
   /****************************************************************************
    * Simplified Chinese TIP
    ****************************************************************************/
 
   bool IsMSPinyinActiveInternal() const
   {
     return mActiveTIPKeyboardDescription.EqualsLiteral("Microsoft Pinyin") ||
       mActiveTIPKeyboardDescription.Equals(
@@ -1573,19 +1564,16 @@ public:
     DoNotReturnNoLayoutErrorToMSSimplifiedTIP, true)
   DECL_AND_IMPL_BOOL_PREF(
     "intl.tsf.hack.ms_traditional_chinese.do_not_return_no_layout_error",
     DoNotReturnNoLayoutErrorToMSTraditionalTIP, true)
   DECL_AND_IMPL_BOOL_PREF(
     "intl.tsf.hack.free_chang_jie.do_not_return_no_layout_error",
     DoNotReturnNoLayoutErrorToFreeChangJie, true)
   DECL_AND_IMPL_BOOL_PREF(
-    "intl.tsf.hack.easy_changjei.do_not_return_no_layout_error",
-    DoNotReturnNoLayoutErrorToEasyChangjei, true)
-  DECL_AND_IMPL_BOOL_PREF(
     "intl.tsf.hack.ms_japanese_ime.do_not_return_no_layout_error_at_first_char",
     DoNotReturnNoLayoutErrorToMSJapaneseIMEAtFirstChar, true)
   DECL_AND_IMPL_BOOL_PREF(
     "intl.tsf.hack.ms_japanese_ime.do_not_return_no_layout_error_at_caret",
     DoNotReturnNoLayoutErrorToMSJapaneseIMEAtCaret, true)
   DECL_AND_IMPL_BOOL_PREF(
     "intl.tsf.hack.ms_simplified_chinese.query_insert_result",
     NeedToHackQueryInsertForMSSimplifiedTIP, true)
@@ -4142,24 +4130,21 @@ TSFTextStore::GetTextExt(TsViewCookie vc
     else if (TSFPrefs::DoNotReturnNoLayoutErrorToATOKOfCompositionString() &&
              TSFStaticSink::IsATOKActive() &&
              (!TSFStaticSink::IsATOKReferringNativeCaretActive() ||
               !TSFPrefs::NeedToCreateNativeCaretForLegacyATOK()) &&
              mComposition.mStart == acpStart &&
              mComposition.EndOffset() == acpEnd) {
       dontReturnNoLayoutError = true;
     }
-    // Free ChangJie 2010 and Easy Changjei 1.0.12.0 doesn't handle
-    // ITfContextView::GetTextExt() properly.  Prehaps, it's due to the bug of
-    // TSF.  We need to check if this is necessary on Windows 10 before
-    // disabling this on Windows 10.
-    else if ((TSFPrefs::DoNotReturnNoLayoutErrorToFreeChangJie() &&
-              TSFStaticSink::IsFreeChangJieActive()) ||
-             (TSFPrefs::DoNotReturnNoLayoutErrorToEasyChangjei() &&
-              TSFStaticSink::IsEasyChangjeiActive())) {
+    // Free ChangJie 2010 doesn't handle ITfContextView::GetTextExt() properly.
+    // Prehaps, it's due to the bug of TSF.  We need to check if this is
+    // necessary on Windows 10 before disabling this on Windows 10.
+    else if (TSFPrefs::DoNotReturnNoLayoutErrorToFreeChangJie() &&
+             TSFStaticSink::IsFreeChangJieActive()) {
       acpEnd = mComposition.mStart;
       acpStart = std::min(acpStart, acpEnd);
       dontReturnNoLayoutError = true;
     }
     // Some Chinese TIPs of Microsoft doesn't show candidate window in e10s
     // mode on Win8 or later.
     else if (
       IsWin8OrLater() &&