Bug 1577685 - Move some utility functions from IMEStateManager to widget. r=masayuki
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Fri, 30 Aug 2019 05:56:58 +0000
changeset 554776 10b0a2e34429cb716ae206ff7daf32ac074a57ac
parent 554775 f592a66e8abade2ac052bfdaa598636123d65a91
child 554777 4bed9794caf24942c017d05a0d24c2c7086d3c98
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1577685
milestone70.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 1577685 - Move some utility functions from IMEStateManager to widget. r=masayuki I would like to log `IMEState` and `InputContextAction`in widget. But this utilities are in `IMEStateManager`, so I would like to move it to widget by using `mozilla/ToString.h`. Differential Revision: https://phabricator.services.mozilla.com/D44103
dom/events/IMEStateManager.cpp
widget/IMEData.cpp
widget/IMEData.h
widget/android/GeckoEditableSupport.cpp
widget/moz.build
--- a/dom/events/IMEStateManager.cpp
+++ b/dom/events/IMEStateManager.cpp
@@ -13,16 +13,17 @@
 #include "mozilla/EventListenerManager.h"
 #include "mozilla/EventStates.h"
 #include "mozilla/MouseEvents.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/PresShell.h"
 #include "mozilla/StaticPrefs_dom.h"
 #include "mozilla/TextComposition.h"
 #include "mozilla/TextEvents.h"
+#include "mozilla/ToString.h"
 #include "mozilla/Unused.h"
 #include "mozilla/dom/BrowserBridgeChild.h"
 #include "mozilla/dom/HTMLFormElement.h"
 #include "mozilla/dom/HTMLTextAreaElement.h"
 #include "mozilla/dom/MouseEventBinding.h"
 #include "mozilla/dom/BrowserParent.h"
 
 #include "HTMLInputElement.h"
@@ -58,81 +59,16 @@ using namespace widget;
  * When a method does something only in some situations and it may be important
  * for debug, log the information with LogLevel::Debug.  In this case, the log
  * should start with "  <method name>(),".
  */
 LazyLogModule sISMLog("IMEStateManager");
 
 static const char* GetBoolName(bool aBool) { return aBool ? "true" : "false"; }
 
-static const char* GetActionCauseName(InputContextAction::Cause aCause) {
-  switch (aCause) {
-    case InputContextAction::CAUSE_UNKNOWN:
-      return "CAUSE_UNKNOWN";
-    case InputContextAction::CAUSE_UNKNOWN_CHROME:
-      return "CAUSE_UNKNOWN_CHROME";
-    case InputContextAction::CAUSE_KEY:
-      return "CAUSE_KEY";
-    case InputContextAction::CAUSE_MOUSE:
-      return "CAUSE_MOUSE";
-    case InputContextAction::CAUSE_TOUCH:
-      return "CAUSE_TOUCH";
-    case InputContextAction::CAUSE_LONGPRESS:
-      return "CAUSE_LONGPRESS";
-    default:
-      return "illegal value";
-  }
-}
-
-static const char* GetActionFocusChangeName(
-    InputContextAction::FocusChange aFocusChange) {
-  switch (aFocusChange) {
-    case InputContextAction::FOCUS_NOT_CHANGED:
-      return "FOCUS_NOT_CHANGED";
-    case InputContextAction::GOT_FOCUS:
-      return "GOT_FOCUS";
-    case InputContextAction::LOST_FOCUS:
-      return "LOST_FOCUS";
-    case InputContextAction::MENU_GOT_PSEUDO_FOCUS:
-      return "MENU_GOT_PSEUDO_FOCUS";
-    case InputContextAction::MENU_LOST_PSEUDO_FOCUS:
-      return "MENU_LOST_PSEUDO_FOCUS";
-    default:
-      return "illegal value";
-  }
-}
-
-static const char* GetIMEStateEnabledName(IMEState::Enabled aEnabled) {
-  switch (aEnabled) {
-    case IMEState::DISABLED:
-      return "DISABLED";
-    case IMEState::ENABLED:
-      return "ENABLED";
-    case IMEState::PASSWORD:
-      return "PASSWORD";
-    case IMEState::PLUGIN:
-      return "PLUGIN";
-    default:
-      return "illegal value";
-  }
-}
-
-static const char* GetIMEStateSetOpenName(IMEState::Open aOpen) {
-  switch (aOpen) {
-    case IMEState::DONT_CHANGE_OPEN_STATE:
-      return "DONT_CHANGE_OPEN_STATE";
-    case IMEState::OPEN:
-      return "OPEN";
-    case IMEState::CLOSED:
-      return "CLOSED";
-    default:
-      return "illegal value";
-  }
-}
-
 StaticRefPtr<nsIContent> IMEStateManager::sContent;
 StaticRefPtr<nsPresContext> IMEStateManager::sPresContext;
 nsIWidget* IMEStateManager::sWidget = nullptr;
 nsIWidget* IMEStateManager::sFocusedIMEWidget = nullptr;
 StaticRefPtr<BrowserParent> IMEStateManager::sFocusedIMEBrowserParent;
 nsIWidget* IMEStateManager::sActiveInputContextWidget = nullptr;
 StaticRefPtr<IMEContentObserver> IMEStateManager::sActiveIMEContentObserver;
 TextCompositionArray* IMEStateManager::sTextCompositions = nullptr;
@@ -427,17 +363,17 @@ bool IMEStateManager::CanHandleWith(nsPr
 }
 
 // static
 nsresult IMEStateManager::OnChangeFocus(nsPresContext* aPresContext,
                                         nsIContent* aContent,
                                         InputContextAction::Cause aCause) {
   MOZ_LOG(sISMLog, LogLevel::Info,
           ("OnChangeFocus(aPresContext=0x%p, aContent=0x%p, aCause=%s)",
-           aPresContext, aContent, GetActionCauseName(aCause)));
+           aPresContext, aContent, ToString(aCause).c_str()));
 
   InputContextAction action(aCause);
   return OnChangeFocusInternal(aPresContext, aContent, action);
 }
 
 // static
 nsresult IMEStateManager::OnChangeFocusInternal(nsPresContext* aPresContext,
                                                 nsIContent* aContent,
@@ -448,18 +384,18 @@ nsresult IMEStateManager::OnChangeFocusI
   MOZ_LOG(sISMLog, LogLevel::Info,
           ("OnChangeFocusInternal(aPresContext=0x%p (available: %s), "
            "aContent=0x%p (remote: %s), aAction={ mCause=%s, "
            "mFocusChange=%s }), "
            "sPresContext=0x%p (available: %s), sContent=0x%p, "
            "sWidget=0x%p (available: %s), BrowserParent::GetFocused()=0x%p, "
            "sActiveIMEContentObserver=0x%p, sInstalledMenuKeyboardListener=%s",
            aPresContext, GetBoolName(CanHandleWith(aPresContext)), aContent,
-           GetBoolName(remoteHasFocus), GetActionCauseName(aAction.mCause),
-           GetActionFocusChangeName(aAction.mFocusChange), sPresContext.get(),
+           GetBoolName(remoteHasFocus), ToString(aAction.mCause).c_str(),
+           ToString(aAction.mFocusChange).c_str(), sPresContext.get(),
            GetBoolName(CanHandleWith(sPresContext)), sContent.get(), sWidget,
            GetBoolName(sWidget && !sWidget->Destroyed()),
            BrowserParent::GetFocused(), sActiveIMEContentObserver.get(),
            GetBoolName(sInstalledMenuKeyboardListener)));
 
   // If new aPresShell has been destroyed, this should handle the focus change
   // as nobody is getting focus.
   if (NS_WARN_IF(aPresContext && !CanHandleWith(aPresContext))) {
@@ -668,18 +604,18 @@ void IMEStateManager::OnInstalledMenuKey
       sISMLog, LogLevel::Info,
       ("OnInstalledMenuKeyboardListener(aInstalling=%s), "
        "sInstalledMenuKeyboardListener=%s, BrowserParent::GetFocused()=0x%p, "
        "sActiveChildInputContext={ mIMEState={ mEnabled=%s, mOpen=%s }, "
        "mHTMLInputType=\"%s\", mHTMLInputInputmode=\"%s\", mActionHint=\"%s\", "
        "mInPrivateBrowsing=%s }",
        GetBoolName(aInstalling), GetBoolName(sInstalledMenuKeyboardListener),
        BrowserParent::GetFocused(),
-       GetIMEStateEnabledName(sActiveChildInputContext.mIMEState.mEnabled),
-       GetIMEStateSetOpenName(sActiveChildInputContext.mIMEState.mOpen),
+       ToString(sActiveChildInputContext.mIMEState.mEnabled).c_str(),
+       ToString(sActiveChildInputContext.mIMEState.mOpen).c_str(),
        NS_ConvertUTF16toUTF8(sActiveChildInputContext.mHTMLInputType).get(),
        NS_ConvertUTF16toUTF8(sActiveChildInputContext.mHTMLInputInputmode)
            .get(),
        NS_ConvertUTF16toUTF8(sActiveChildInputContext.mActionHint).get(),
        GetBoolName(sActiveChildInputContext.mInPrivateBrowsing)));
 
   sInstalledMenuKeyboardListener = aInstalling;
 
@@ -877,18 +813,18 @@ void IMEStateManager::UpdateIMEState(con
                                      nsIContent* aContent,
                                      EditorBase* aEditorBase) {
   MOZ_LOG(
       sISMLog, LogLevel::Info,
       ("UpdateIMEState(aNewIMEState={ mEnabled=%s, "
        "mOpen=%s }, aContent=0x%p, aEditorBase=0x%p), "
        "sPresContext=0x%p, sContent=0x%p, sWidget=0x%p (available: %s), "
        "sActiveIMEContentObserver=0x%p, sIsGettingNewIMEState=%s",
-       GetIMEStateEnabledName(aNewIMEState.mEnabled),
-       GetIMEStateSetOpenName(aNewIMEState.mOpen), aContent, aEditorBase,
+       ToString(aNewIMEState.mEnabled).c_str(),
+       ToString(aNewIMEState.mOpen).c_str(), aContent, aEditorBase,
        sPresContext.get(), sContent.get(), sWidget,
        GetBoolName(sWidget && !sWidget->Destroyed()),
        sActiveIMEContentObserver.get(), GetBoolName(sIsGettingNewIMEState)));
 
   if (sIsGettingNewIMEState) {
     MOZ_LOG(sISMLog, LogLevel::Debug,
             ("  UpdateIMEState(), "
              "does nothing because of called while getting new IME state"));
@@ -1081,18 +1017,18 @@ IMEState IMEStateManager::GetNewIMEState
   // For avoiding such nested IME state updates, we should set
   // sIsGettingNewIMEState here and UpdateIMEState() should check it.
   GettingNewIMEStateBlocker blocker;
 
   IMEState newIMEState = aContent->GetDesiredIMEState();
   MOZ_LOG(sISMLog, LogLevel::Debug,
           ("  GetNewIMEState() returns { mEnabled=%s, "
            "mOpen=%s }",
-           GetIMEStateEnabledName(newIMEState.mEnabled),
-           GetIMEStateSetOpenName(newIMEState.mOpen)));
+           ToString(newIMEState.mEnabled).c_str(),
+           ToString(newIMEState.mOpen).c_str()));
   return newIMEState;
 }
 
 static bool MayBeIMEUnawareWebApp(nsINode* aNode) {
   bool haveKeyEventsListener = false;
 
   while (aNode) {
     EventListenerManager* const mgr = aNode->GetExistingListenerManager();
@@ -1125,25 +1061,24 @@ void IMEStateManager::SetInputContextFor
   MOZ_LOG(
       sISMLog, LogLevel::Info,
       ("SetInputContextForChildProcess(aBrowserParent=0x%p, "
        "aInputContext={ mIMEState={ mEnabled=%s, mOpen=%s }, "
        "mHTMLInputType=\"%s\", mHTMLInputInputmode=\"%s\", mActionHint=\"%s\", "
        "mInPrivateBrowsing=%s }, aAction={ mCause=%s, mAction=%s }), "
        "sPresContext=0x%p (available: %s), sWidget=0x%p (available: %s), "
        "BrowserParent::GetFocused()=0x%p, sInstalledMenuKeyboardListener=%s",
-       aBrowserParent, GetIMEStateEnabledName(aInputContext.mIMEState.mEnabled),
-       GetIMEStateSetOpenName(aInputContext.mIMEState.mOpen),
+       aBrowserParent, ToString(aInputContext.mIMEState.mEnabled).c_str(),
+       ToString(aInputContext.mIMEState.mOpen).c_str(),
        NS_ConvertUTF16toUTF8(aInputContext.mHTMLInputType).get(),
        NS_ConvertUTF16toUTF8(aInputContext.mHTMLInputInputmode).get(),
        NS_ConvertUTF16toUTF8(aInputContext.mActionHint).get(),
        GetBoolName(aInputContext.mInPrivateBrowsing),
-       GetActionCauseName(aAction.mCause),
-       GetActionFocusChangeName(aAction.mFocusChange), sPresContext.get(),
-       GetBoolName(CanHandleWith(sPresContext)), sWidget,
+       ToString(aAction.mCause).c_str(), ToString(aAction.mFocusChange).c_str(),
+       sPresContext.get(), GetBoolName(CanHandleWith(sPresContext)), sWidget,
        GetBoolName(sWidget && !sWidget->Destroyed()),
        BrowserParent::GetFocused(),
        GetBoolName(sInstalledMenuKeyboardListener)));
 
   if (aBrowserParent != BrowserParent::GetFocused()) {
     MOZ_LOG(sISMLog, LogLevel::Error,
             ("  SetInputContextForChildProcess(), FAILED, "
              "because non-focused tab parent tries to set input context"));
@@ -1310,21 +1245,20 @@ void IMEStateManager::SetIMEState(const 
                                   nsIContent* aContent, nsIWidget* aWidget,
                                   InputContextAction aAction,
                                   InputContext::Origin aOrigin) {
   MOZ_LOG(
       sISMLog, LogLevel::Info,
       ("SetIMEState(aState={ mEnabled=%s, mOpen=%s }, "
        "aContent=0x%p (BrowserParent=0x%p), aWidget=0x%p, aAction={ mCause=%s, "
        "mFocusChange=%s }, aOrigin=%s)",
-       GetIMEStateEnabledName(aState.mEnabled),
-       GetIMEStateSetOpenName(aState.mOpen), aContent,
-       BrowserParent::GetFrom(aContent), aWidget,
-       GetActionCauseName(aAction.mCause),
-       GetActionFocusChangeName(aAction.mFocusChange), ToChar(aOrigin)));
+       ToString(aState.mEnabled).c_str(), ToString(aState.mOpen).c_str(),
+       aContent, BrowserParent::GetFrom(aContent), aWidget,
+       ToString(aAction.mCause).c_str(), ToString(aAction.mFocusChange).c_str(),
+       ToChar(aOrigin)));
 
   NS_ENSURE_TRUE_VOID(aWidget);
 
   InputContext context;
   context.mIMEState = aState;
   context.mOrigin = aOrigin;
   context.mMayBeIMEUnaware = context.mIMEState.IsEditable() &&
                              sCheckForIMEUnawareWebApps &&
@@ -1399,24 +1333,23 @@ void IMEStateManager::SetInputContext(ns
                                       const InputContextAction& aAction) {
   MOZ_LOG(
       sISMLog, LogLevel::Info,
       ("SetInputContext(aWidget=0x%p, aInputContext={ "
        "mIMEState={ mEnabled=%s, mOpen=%s }, mHTMLInputType=\"%s\", "
        "mHTMLInputInputmode=\"%s\", mActionHint=\"%s\", "
        "mInPrivateBrowsing=%s }, "
        "aAction={ mCause=%s, mAction=%s }), BrowserParent::GetFocused()=0x%p",
-       aWidget, GetIMEStateEnabledName(aInputContext.mIMEState.mEnabled),
-       GetIMEStateSetOpenName(aInputContext.mIMEState.mOpen),
+       aWidget, ToString(aInputContext.mIMEState.mEnabled).c_str(),
+       ToString(aInputContext.mIMEState.mOpen).c_str(),
        NS_ConvertUTF16toUTF8(aInputContext.mHTMLInputType).get(),
        NS_ConvertUTF16toUTF8(aInputContext.mHTMLInputInputmode).get(),
        NS_ConvertUTF16toUTF8(aInputContext.mActionHint).get(),
        GetBoolName(aInputContext.mInPrivateBrowsing),
-       GetActionCauseName(aAction.mCause),
-       GetActionFocusChangeName(aAction.mFocusChange),
+       ToString(aAction.mCause).c_str(), ToString(aAction.mFocusChange).c_str(),
        BrowserParent::GetFocused()));
 
   MOZ_RELEASE_ASSERT(aWidget);
 
   nsCOMPtr<nsIWidget> widget(aWidget);
   widget->SetInputContext(aInputContext, aAction);
   sActiveInputContextWidget = widget;
 }
new file mode 100644
--- /dev/null
+++ b/widget/IMEData.cpp
@@ -0,0 +1,116 @@
+/* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "IMEData.h"
+#include <sstream>
+
+namespace mozilla {
+
+namespace widget {
+
+std::ostream& operator<<(std::ostream& aStream,
+                         const IMEState::Enabled& aEnabled) {
+  switch (aEnabled) {
+    case IMEState::DISABLED:
+      aStream << "DISABLED";
+      break;
+    case IMEState::ENABLED:
+      aStream << "ENABLED";
+      break;
+    case IMEState::PASSWORD:
+      aStream << "PASSWORD";
+      break;
+    case IMEState::PLUGIN:
+      aStream << "PLUGIN";
+      break;
+    default:
+      aStream << "illegal value";
+      break;
+  }
+  return aStream;
+}
+
+std::ostream& operator<<(std::ostream& aStream, const IMEState::Open& aOpen) {
+  switch (aOpen) {
+    case IMEState::DONT_CHANGE_OPEN_STATE:
+      aStream << "DONT_CHANGE_OPEN_STATE";
+      break;
+    case IMEState::OPEN:
+      aStream << "OPEN";
+      break;
+    case IMEState::CLOSED:
+      aStream << "CLOSED";
+      break;
+    default:
+      aStream << "illegal value";
+      break;
+  }
+  return aStream;
+}
+
+std::ostream& operator<<(std::ostream& aStream,
+                         const InputContextAction::Cause& aCause) {
+  switch (aCause) {
+    case InputContextAction::CAUSE_UNKNOWN:
+      aStream << "CAUSE_UNKNOWN";
+      break;
+    case InputContextAction::CAUSE_UNKNOWN_CHROME:
+      aStream << "CAUSE_UNKNOWN_CHROME";
+      break;
+    case InputContextAction::CAUSE_KEY:
+      aStream << "CAUSE_KEY";
+      break;
+    case InputContextAction::CAUSE_MOUSE:
+      aStream << "CAUSE_MOUSE";
+      break;
+    case InputContextAction::CAUSE_TOUCH:
+      aStream << "CAUSE_TOUCH";
+      break;
+    case InputContextAction::CAUSE_LONGPRESS:
+      aStream << "CAUSE_LONGPRESS";
+      break;
+    case InputContextAction::CAUSE_UNKNOWN_DURING_NON_KEYBOARD_INPUT:
+      aStream << "CAUSE_UNKNOWN_DURING_NON_KEYBOARD_INPUT";
+      break;
+    case InputContextAction::CAUSE_UNKNOWN_DURING_KEYBOARD_INPUT:
+      aStream << "CAUSE_UNKNOWN_DURING_KEYBOARD_INPUT";
+      break;
+    default:
+      aStream << "illegal value";
+      break;
+  }
+  return aStream;
+}
+
+std::ostream& operator<<(std::ostream& aStream,
+                         const InputContextAction::FocusChange& aFocusChange) {
+  switch (aFocusChange) {
+    case InputContextAction::FOCUS_NOT_CHANGED:
+      aStream << "FOCUS_NOT_CHANGED";
+      break;
+    case InputContextAction::GOT_FOCUS:
+      aStream << "GOT_FOCUS";
+      break;
+    case InputContextAction::LOST_FOCUS:
+      aStream << "LOST_FOCUS";
+      break;
+    case InputContextAction::MENU_GOT_PSEUDO_FOCUS:
+      aStream << "MENU_GOT_PSEUDO_FOCUS";
+      break;
+    case InputContextAction::MENU_LOST_PSEUDO_FOCUS:
+      aStream << "MENU_LOST_PSEUDO_FOCUS";
+      break;
+    case InputContextAction::WIDGET_CREATED:
+      aStream << "WIDGET_CREATED";
+      break;
+    default:
+      aStream << "illegal value";
+      break;
+  }
+  return aStream;
+}
+
+}  // namespace widget
+}  // namespace mozilla
--- a/widget/IMEData.h
+++ b/widget/IMEData.h
@@ -799,12 +799,20 @@ struct CandidateWindowPosition {
   LayoutDeviceIntPoint mPoint;
   // Rect which shouldn't be overlapped with the candidate window.
   // This is valid only when mExcludeRect is true.
   LayoutDeviceIntRect mRect;
   // See explanation of mPoint and mRect.
   bool mExcludeRect;
 };
 
+std::ostream& operator<<(std::ostream& aStream,
+                         const IMEState::Enabled& aEnabled);
+std::ostream& operator<<(std::ostream& aStream, const IMEState::Open& aOpen);
+std::ostream& operator<<(std::ostream& aStream,
+                         const InputContextAction::Cause& aCause);
+std::ostream& operator<<(std::ostream& aStream,
+                         const InputContextAction::FocusChange& aFocusChange);
+
 }  // namespace widget
 }  // namespace mozilla
 
 #endif  // #ifndef mozilla_widget_IMEData_h_
--- a/widget/android/GeckoEditableSupport.cpp
+++ b/widget/android/GeckoEditableSupport.cpp
@@ -13,16 +13,17 @@
 
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/IMEStateManager.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/StaticPrefs_intl.h"
 #include "mozilla/TextComposition.h"
 #include "mozilla/TextEventDispatcherListener.h"
 #include "mozilla/TextEvents.h"
+#include "mozilla/ToString.h"
 #include "mozilla/dom/BrowserChild.h"
 
 #include <android/api-level.h>
 #include <android/input.h>
 #include <android/log.h>
 
 #ifdef DEBUG_ANDROID_IME
 #  define ALOGIME(args...) \
@@ -1488,19 +1489,22 @@ NS_IMETHODIMP_(IMENotificationRequests)
 GeckoEditableSupport::GetIMENotificationRequests() {
   return IMENotificationRequests(IMENotificationRequests::NOTIFY_TEXT_CHANGE);
 }
 
 void GeckoEditableSupport::SetInputContext(const InputContext& aContext,
                                            const InputContextAction& aAction) {
   MOZ_ASSERT(mEditable);
 
-  ALOGIME("IME: SetInputContext: s=0x%X, 0x%X, action=0x%X, 0x%X",
-          aContext.mIMEState.mEnabled, aContext.mIMEState.mOpen, aAction.mCause,
-          aAction.mFocusChange);
+  ALOGIME(
+      "IME: SetInputContext: aContext.mIMEState={mEnabled=%s, mOpen=%s}, "
+      "aAction={mCause=%s, mFocusChange=%s}",
+      ToString(aContext.mIMEState.mEnabled).c_str(),
+      ToString(aContext.mIMEState.mOpen).c_str(),
+      ToString(aAction.mCause).c_str(), ToString(aAction.mFocusChange).c_str());
 
   mInputContext = aContext;
 
   if (mInputContext.mIMEState.mEnabled != IMEState::DISABLED &&
       aAction.UserMightRequestOpenVKB()) {
     // Don't reset keyboard when we should simply open the vkb
     mEditable->NotifyIME(EditableListener::NOTIFY_IME_OPEN_VKB);
     return;
--- a/widget/moz.build
+++ b/widget/moz.build
@@ -181,16 +181,17 @@ EXPORTS.mozilla.widget += [
 ]
 
 UNIFIED_SOURCES += [
     'CompositorWidget.cpp',
     'ContentCache.cpp',
     'GfxDriverInfo.cpp',
     'GfxInfoBase.cpp',
     'GfxInfoCollector.cpp',
+    'IMEData.cpp',
     'InProcessCompositorWidget.cpp',
     'InputData.cpp',
     'nsAutoRollup.cpp',
     'nsBaseAppShell.cpp',
     'nsBaseScreen.cpp',
     'nsClipboardHelper.cpp',
     'nsClipboardProxy.cpp',
     'nsColorPickerProxy.cpp',