Bug 1147722 - Part 2. Remove keyboardMayHaveIME method. r=wmccloskey
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Mon, 30 Mar 2015 11:58:32 +0900
changeset 266772 30bf6cb70f615d9ffb9a0e55220f8c15075b700e
parent 266771 e519d5609c339341df9682176f0853fcc33246dc
child 266773 6082a98d38613b236758b852ad751b7b454c79c0
child 267948 82485842ed0fb923544fd079b8186871c66dbb2d
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswmccloskey
bugs1147722
milestone39.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 1147722 - Part 2. Remove keyboardMayHaveIME method. r=wmccloskey
toolkit/xre/nsAppRunner.cpp
xpcom/system/nsIXULRuntime.idl
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -579,39 +579,16 @@ CanShowProfileManager()
 {
 #if defined(XP_WIN)
   return XRE_GetWindowsEnvironment() == WindowsEnvironmentType_Desktop;
 #else
   return true;
 #endif
 }
 
-static bool
-KeyboardMayHaveIME()
-{
-#ifdef XP_WIN
-  // http://msdn.microsoft.com/en-us/library/windows/desktop/dd318693%28v=vs.85%29.aspx
-  HKL locales[10];
-  int result = GetKeyboardLayoutList(10, locales);
-  for (int i = 0; i < result; i++) {
-    int kb = (uintptr_t)locales[i] & 0xFFFF;
-    if (kb == 0x0411 ||  // japanese
-        kb == 0x0412 ||  // korean
-        kb == 0x0C04 ||  // HK Chinese
-        kb == 0x0804 || kb == 0x0004 || // Hans Chinese
-        kb == 0x7C04 || kb ==  0x0404)  { //Hant Chinese
-
-      return true;
-    }
-  }
-#endif
-
-  return false;
-}
-
 bool gSafeMode = false;
 
 /**
  * The nsXULAppInfo object implements nsIFactory so that it can be its own
  * singleton.
  */
 class nsXULAppInfo : public nsIXULAppInfo,
 #ifdef NIGHTLY_BUILD
@@ -883,23 +860,16 @@ nsXULAppInfo::GetAccessibilityEnabled(bo
   *aResult = GetAccService() != nullptr;
 #else
   *aResult = false;
 #endif
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsXULAppInfo::GetKeyboardMayHaveIME(bool* aResult)
-{
-  *aResult = KeyboardMayHaveIME();
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 nsXULAppInfo::GetAccessibilityIsUIA(bool* aResult)
 {
   *aResult = false;
 #if defined(ACCESSIBILITY) && defined(XP_WIN)
   // This is the same check the a11y service does to identify uia clients.
   if (GetAccService() != nullptr &&
       (::GetModuleHandleW(L"uiautomation") ||
        ::GetModuleHandleW(L"uiautomationcore"))) {
--- a/xpcom/system/nsIXULRuntime.idl
+++ b/xpcom/system/nsIXULRuntime.idl
@@ -18,17 +18,17 @@ bool BrowserTabsRemoteAutostart();
 
 /**
  * Provides information about the XUL runtime.
  * @status UNSTABLE - This interface is not frozen and will probably change in
  *                    future releases. If you need this functionality to be
  *                    stable/frozen, please contact Benjamin Smedberg.
  */
 
-[scriptable, uuid(5754b56e-f392-426d-aec0-3ba7c49aff32)]
+[scriptable, uuid(c4cd11c4-6e8e-49da-85a8-dad3b7605bc3)]
 interface nsIXULRuntime : nsISupports
 {
   /**
    * Whether the application was launched in safe mode.
    */
   readonly attribute boolean inSafeMode;
 
   /**
@@ -92,23 +92,16 @@ interface nsIXULRuntime : nsISupports
   readonly attribute boolean browserTabsRemoteAutostart;
 
   /**
    * If true, the accessibility service is running.
    */
   readonly attribute boolean accessibilityEnabled;
 
   /**
-   * This returns a very rough approximation of whether IME is likely
-   * to be used for the browser session. DO NOT USE! This is temporary
-   * and will be removed.
-   */
-  readonly attribute boolean keyboardMayHaveIME;
-
-  /**
    * Indicates if the active accessibility client is UIA.
    * DO NOT USE! This is temporary and will be removed.
    */
   readonly attribute boolean accessibilityIsUIA;
 
   /**
    * Indicates whether the current Firefox build is 64-bit.
    */