Bug 1435701 - Make TSFStaticSink::IsATOKActiveInternal() aware of ATOK Passport r?m_kato draft
authorMasayuki Nakano <masayuki@d-toybox.com>
Mon, 05 Feb 2018 22:29:03 +0900
changeset 751146 0cc089010f8a62e11015848a8b0dc40005ab31ee
parent 751145 ede53263cc5d849bbd3b5cd255d9dfbb1eaf0e7a
push id97875
push usermasayuki@d-toybox.com
push dateMon, 05 Feb 2018 14:57:24 +0000
reviewersm_kato
bugs1435701
milestone60.0a1
Bug 1435701 - Make TSFStaticSink::IsATOKActiveInternal() aware of ATOK Passport r?m_kato TIP name of ATOK Passport's ATOK 31.1.2 is just "ATOK", not "ATOK " + release year. Therefore, TSFStaticSink::IsATOKActiveInternal() returns false when new ATOK is active. This patch updates it. Additionally, this patch adds GUID list of new Japanese TIPs with comment. They should be useful when somebody needs to add hack for them. MozReview-Commit-ID: 6L5SjWEK6i0
widget/windows/TSFTextStore.cpp
--- a/widget/windows/TSFTextStore.cpp
+++ b/widget/windows/TSFTextStore.cpp
@@ -1170,19 +1170,21 @@ private:
       0x773EB24E, 0xCA1D, 0x4B1B,
         { 0xB4, 0x20, 0xFA, 0x98, 0x5B, 0xB0, 0xB8, 0x0D }
     };
     return mActiveTIPGUID == kGUID;
   }
 
   bool IsATOKActiveInternal() const
   {
-    // FYI: Name of ATOK includes the release year like "ATOK 2015".
+    // FYI: Name of packaged ATOK includes the release year like "ATOK 2015".
+    //      Name of ATOK Passport (subscription) equals "ATOK".
     return StringBeginsWith(mActiveTIPKeyboardDescription,
-                            NS_LITERAL_STRING("ATOK "));
+                            NS_LITERAL_STRING("ATOK ")) ||
+           mActiveTIPKeyboardDescription.EqualsLiteral("ATOK");
   }
 
   bool IsATOK2011ActiveInternal() const
   {
     // {F9C24A5C-8A53-499D-9572-93B2FF582115}
     static const GUID kGUID = {
       0xF9C24A5C, 0x8A53, 0x499D,
         { 0x95, 0x72, 0x93, 0xB2, 0xFF, 0x58, 0x21, 0x15 }
@@ -1237,16 +1239,21 @@ private:
       0x0B557B4C, 0x5740, 0x4110,
         { 0xA6, 0x0A, 0x14, 0x93, 0xFA, 0x10, 0xBF, 0x2B }
     };
     return mActiveTIPGUID == kGUID;
   }
 
   // * ATOK 2017
   //   - {6DBFD8F5-701D-11E6-920F-782BCBA6348F}
+  // * ATOK Passport (confirmed with version 31.1.2)
+  //   - {A38F2FD9-7199-45E1-841C-BE0313D8052F}
+
+  // * Japanist 10
+  //   - {E6D66705-1EDA-4373-8D01-1D0CB2D054C7}
 
   /****************************************************************************
    * Traditional Chinese TIP
    ****************************************************************************/
 
   bool IsMSBopomofoActiveInternal() const
   {
     // {B2F9C502-1742-11D4-9790-0080C882687E} (Win8.1, Win10)