Bug 1481153 - part 3: Make TSFTextStore::MaybeHackNoErrorLayoutBugs() hack even on Win10 build 17643 or later when Microsoft Pinyin or Microsoft Wubi is active r=m_kato
authorMasayuki Nakano <masayuki@d-toybox.com>
Tue, 07 Aug 2018 15:09:31 +0900
changeset 485922 e89afaa8173de68496ac1737b5244a91c0cb25a5
parent 485921 5d8f6ac00e4ff90c664591abd9615cc5107280e2
child 485923 1c2151fe7f760e68770178466ad7bf7a1cdce819
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersm_kato
bugs1481153, 17643
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1481153 - part 3: Make TSFTextStore::MaybeHackNoErrorLayoutBugs() hack even on Win10 build 17643 or later when Microsoft Pinyin or Microsoft Wubi is active r=m_kato Microsoft Pinyin and Microsoft Wubi (Simplified Chinese TIPs) work better on Windows 10 Build 17643 or later (i.e., TS_E_NOLAYOUT bug is fixed). However, they sometimes do not show candidate window, perhaps, the reason is something stateful bug in them. Therefore, we still need to hack the result of GetTextExt() until they fix this bug.
widget/windows/TSFTextStore.cpp
--- a/widget/windows/TSFTextStore.cpp
+++ b/widget/windows/TSFTextStore.cpp
@@ -4913,21 +4913,24 @@ TSFTextStore::MaybeHackNoErrorLayoutBugs
           !TSFPrefs::DoNotReturnNoLayoutErrorToMSTraditionalTIP()) {
         return false;
       }
       aACPEnd = mContentForTSF.LatestCompositionStartOffset();
       aACPStart = std::min(aACPStart, aACPEnd);
       break;
     // Some Simplified Chinese TIPs of Microsoft don't show candidate window
     // in e10s mode on Win8 or later.
+    // FYI: Only Simplified Chinese TIPs of Microsoft still require this hack
+    //      because they sometimes do not show candidate window when we return
+    //      TS_E_NOLAYOUT for first query.  Note that even when they show
+    //      candidate window properly, we return TS_E_NOLAYOUT and following
+    //      log looks same as when they don't show candidate window.  Perhaps,
+    //      there is stateful cause or race in them.
     case TextInputProcessorID::eMicrosoftPinyin:
     case TextInputProcessorID::eMicrosoftWubi:
-      if (!sTSFHasTheBug) {
-        return false;
-      }
       if (!IsWin8OrLater() ||
           !TSFPrefs::DoNotReturnNoLayoutErrorToMSSimplifiedTIP()) {
         return false;
       }
       aACPEnd = mContentForTSF.LatestCompositionStartOffset();
       aACPStart = std::min(aACPStart, aACPEnd);
       break;
     default: