Bug 1284422 part.3 Remove "IMM: " from log of IMMHandler.cpp r?m_kato draft
authorMasayuki Nakano <masayuki@d-toybox.com>
Tue, 05 Jul 2016 18:35:43 +0900
changeset 384517 c743ddfc745a407b6d684dfda241f0f24f766fc5
parent 384516 6bcf89b0fd406043a59146ee41852f8ab9cb7ebd
child 384518 c6806cd54f61cea6e1ec5ce86a88e5235e68f8f2
push id22289
push usermasayuki@d-toybox.com
push dateWed, 06 Jul 2016 14:02:00 +0000
reviewersm_kato
bugs1284422
milestone50.0a1
Bug 1284422 part.3 Remove "IMM: " from log of IMMHandler.cpp r?m_kato MozReview-Commit-ID: IfPneGddBfR
widget/windows/IMMHandler.cpp
--- a/widget/windows/IMMHandler.cpp
+++ b/widget/windows/IMMHandler.cpp
@@ -370,17 +370,17 @@ IMMHandler::InitKeyboardLayout(nsWindow*
   // Whether the IME supports vertical writing mode might be changed or
   // some IMEs may need specific font for their UI.  Therefore, we should
   // update composition font forcibly here.
   if (aWindow) {
     MaybeAdjustCompositionFont(aWindow, sWritingModeOfCompositionFont, true);
   }
 
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: InitKeyboardLayout, aKeyboardLayout=%08x (\"%s\"), sCodePage=%lu, "
+    ("InitKeyboardLayout, aKeyboardLayout=%08x (\"%s\"), sCodePage=%lu, "
      "sIMEProperty=%s, sIMEUIProperty=%s",
      aKeyboardLayout, NS_ConvertUTF16toUTF8(sIMEName).get(),
      sCodePage, GetIMEGeneralPropertyName(sIMEProperty).get(),
      GetIMEUIPropertyName(sIMEUIProperty).get()));
 }
 
 // static
 UINT
@@ -409,26 +409,26 @@ IMMHandler::GetIMEUpdatePreference()
 IMMHandler::IMMHandler()
   : mComposingWindow(nullptr)
   , mCursorPosition(NO_IME_CARET)
   , mCompositionStart(0)
   , mIsComposing(false)
   , mIsComposingOnPlugin(false)
   , mNativeCaretIsCreated(false)
 {
-  MOZ_LOG(gIMMLog, LogLevel::Debug, ("IMM: IMMHandler is created"));
+  MOZ_LOG(gIMMLog, LogLevel::Debug, ("IMMHandler is created"));
 }
 
 IMMHandler::~IMMHandler()
 {
   if (mIsComposing) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: ~IMMHandler, ERROR, the instance is still composing"));
+      ("~IMMHandler, ERROR, the instance is still composing"));
   }
-  MOZ_LOG(gIMMLog, LogLevel::Debug, ("IMM: IMMHandler is destroyed"));
+  MOZ_LOG(gIMMLog, LogLevel::Debug, ("IMMHandler is destroyed"));
 }
 
 nsresult
 IMMHandler::EnsureClauseArray(int32_t aCount)
 {
   NS_ENSURE_ARG_MIN(aCount, 0);
   mClauseArray.SetCapacity(aCount + 32);
   return NS_OK;
@@ -442,31 +442,31 @@ IMMHandler::EnsureAttributeArray(int32_t
   return NS_OK;
 }
 
 // static
 void
 IMMHandler::CommitComposition(nsWindow* aWindow, bool aForce)
 {
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: CommitComposition, aForce=%s, aWindow=%p, hWnd=%08x, "
+    ("CommitComposition, aForce=%s, aWindow=%p, hWnd=%08x, "
      "mComposingWindow=%p%s",
      GetBoolName(aForce), aWindow, aWindow->GetWindowHandle(),
      gIMMHandler ? gIMMHandler->mComposingWindow : nullptr,
      gIMMHandler && gIMMHandler->mComposingWindow ?
        IsComposingOnOurEditor() ? " (composing on editor)" :
                                   " (composing on plug-in)" : ""));
   if (!aForce && !IsComposingWindow(aWindow)) {
     return;
   }
 
   IMEContext context(aWindow);
   bool associated = context.AssociateDefaultContext();
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: CommitComposition, associated=%s",
+    ("CommitComposition, associated=%s",
      GetBoolName(associated)));
 
   if (context.IsValid()) {
     ::ImmNotifyIME(context.get(), NI_COMPOSITIONSTR, CPS_COMPLETE, 0);
     ::ImmNotifyIME(context.get(), NI_COMPOSITIONSTR, CPS_CANCEL, 0);
   }
 
   if (associated) {
@@ -474,48 +474,48 @@ IMMHandler::CommitComposition(nsWindow* 
   }
 }
 
 // static
 void
 IMMHandler::CancelComposition(nsWindow* aWindow, bool aForce)
 {
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: CancelComposition, aForce=%s, aWindow=%p, hWnd=%08x, "
+    ("CancelComposition, aForce=%s, aWindow=%p, hWnd=%08x, "
      "mComposingWindow=%p%s",
      GetBoolName(aForce), aWindow, aWindow->GetWindowHandle(),
      gIMMHandler ? gIMMHandler->mComposingWindow : nullptr,
      gIMMHandler && gIMMHandler->mComposingWindow ?
        IsComposingOnOurEditor() ? " (composing on editor)" :
                                   " (composing on plug-in)" : ""));
   if (!aForce && !IsComposingWindow(aWindow)) {
     return;
   }
 
   IMEContext context(aWindow);
   bool associated = context.AssociateDefaultContext();
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: CancelComposition, associated=%s",
+    ("CancelComposition, associated=%s",
      GetBoolName(associated)));
 
   if (context.IsValid()) {
     ::ImmNotifyIME(context.get(), NI_COMPOSITIONSTR, CPS_CANCEL, 0);
   }
 
   if (associated) {
     context.Disassociate();
   }
 }
 
 // static
 void
 IMMHandler::OnFocusChange(bool aFocus, nsWindow* aWindow)
 {
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: OnFocusChange(aFocus=%s, aWindow=%p), sHasFocus=%s, "
+    ("OnFocusChange(aFocus=%s, aWindow=%p), sHasFocus=%s, "
      "IsComposingWindow(aWindow)=%s, aWindow->Destroyed()=%s, "
      "sNativeCaretIsCreatedForPlugin=%s",
      GetBoolName(aFocus), aWindow, GetBoolName(sHasFocus),
      GetBoolName(IsComposingWindow(aWindow)),
      GetBoolName(aWindow->Destroyed()),
      GetBoolName(sNativeCaretIsCreatedForPlugin)));
 
   if (!aFocus) {
@@ -728,17 +728,17 @@ IMMHandler::ProcessMessageForPlugin(nsWi
 
 void
 IMMHandler::OnInputLangChange(nsWindow* aWindow,
                               WPARAM wParam,
                               LPARAM lParam,
                               MSGResult& aResult)
 {
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: OnInputLangChange, hWnd=%08x, wParam=%08x, lParam=%08x",
+    ("OnInputLangChange, hWnd=%08x, wParam=%08x, lParam=%08x",
      aWindow->GetWindowHandle(), wParam, lParam));
 
   aWindow->NotifyIME(REQUEST_TO_COMMIT_COMPOSITION);
   NS_ASSERTION(!mIsComposing, "ResetInputState failed");
 
   if (mIsComposing) {
     HandleEndComposition(aWindow);
   }
@@ -746,17 +746,17 @@ IMMHandler::OnInputLangChange(nsWindow* 
   aResult.mConsumed = false;
 }
 
 bool
 IMMHandler::OnIMEStartComposition(nsWindow* aWindow,
                                   MSGResult& aResult)
 {
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: OnIMEStartComposition, hWnd=%08x, mIsComposing=%s",
+    ("OnIMEStartComposition, hWnd=%08x, mIsComposing=%s",
      aWindow->GetWindowHandle(), GetBoolName(mIsComposing)));
   aResult.mConsumed = ShouldDrawCompositionStringOurselves();
   if (mIsComposing) {
     NS_WARNING("Composition has been already started");
     return true;
   }
 
   IMEContext context(aWindow);
@@ -766,17 +766,17 @@ IMMHandler::OnIMEStartComposition(nsWind
 
 bool
 IMMHandler::OnIMEComposition(nsWindow* aWindow,
                              WPARAM wParam,
                              LPARAM lParam,
                              MSGResult& aResult)
 {
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: OnIMEComposition, hWnd=%08x, lParam=%08x, mIsComposing=%s, "
+    ("OnIMEComposition, hWnd=%08x, lParam=%08x, mIsComposing=%s, "
      "GCS_RESULTSTR=%s, GCS_COMPSTR=%s, GCS_COMPATTR=%s, GCS_COMPCLAUSE=%s, "
      "GCS_CURSORPOS=%s,",
      aWindow->GetWindowHandle(), lParam, GetBoolName(mIsComposing),
      GetBoolName(lParam & GCS_RESULTSTR), GetBoolName(lParam & GCS_COMPSTR),
      GetBoolName(lParam & GCS_COMPATTR), GetBoolName(lParam & GCS_COMPCLAUSE),
      GetBoolName(lParam & GCS_CURSORPOS)));
 
   IMEContext context(aWindow);
@@ -784,17 +784,17 @@ IMMHandler::OnIMEComposition(nsWindow* a
   return true;
 }
 
 bool
 IMMHandler::OnIMEEndComposition(nsWindow* aWindow,
                                 MSGResult& aResult)
 {
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: OnIMEEndComposition, hWnd=%08x, mIsComposing=%s",
+    ("OnIMEEndComposition, hWnd=%08x, mIsComposing=%s",
      aWindow->GetWindowHandle(), GetBoolName(mIsComposing)));
 
   aResult.mConsumed = ShouldDrawCompositionStringOurselves();
   if (!mIsComposing) {
     return true;
   }
 
   // Korean IME posts WM_IME_ENDCOMPOSITION first when we hit space during
@@ -802,46 +802,46 @@ IMMHandler::OnIMEEndComposition(nsWindow
   // string at following WM_IME_COMPOSITION.
   MSG compositionMsg;
   if (WinUtils::PeekMessage(&compositionMsg, aWindow->GetWindowHandle(),
                             WM_IME_STARTCOMPOSITION, WM_IME_COMPOSITION,
                             PM_NOREMOVE) &&
       compositionMsg.message == WM_IME_COMPOSITION &&
       IS_COMMITTING_LPARAM(compositionMsg.lParam)) {
     MOZ_LOG(gIMMLog, LogLevel::Info,
-      ("IMM: OnIMEEndComposition, WM_IME_ENDCOMPOSITION is followed by "
+      ("OnIMEEndComposition, WM_IME_ENDCOMPOSITION is followed by "
        "WM_IME_COMPOSITION, ignoring the message..."));
     return true;
   }
 
   // Otherwise, e.g., ChangJie doesn't post WM_IME_COMPOSITION before
   // WM_IME_ENDCOMPOSITION when composition string becomes empty.
   // Then, we should dispatch a compositionupdate event, a compositionchange
   // event and a compositionend event.
   // XXX Shouldn't we dispatch the compositionchange event with actual or
   //     latest composition string?
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: OnIMEEndComposition, mCompositionString=\"%s\"%s",
+    ("OnIMEEndComposition, mCompositionString=\"%s\"%s",
      NS_ConvertUTF16toUTF8(mCompositionString).get(),
      mCompositionString.IsEmpty() ? "" : ", but canceling it..."));
 
   HandleEndComposition(aWindow, &EmptyString());
 
   return true;
 }
 
 // static
 bool
 IMMHandler::OnIMEChar(nsWindow* aWindow,
                       WPARAM wParam,
                       LPARAM lParam,
                       MSGResult& aResult)
 {
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: OnIMEChar, hWnd=%08x, char=%08x",
+    ("OnIMEChar, hWnd=%08x, char=%08x",
      aWindow->GetWindowHandle(), wParam));
 
   // We don't need to fire any compositionchange events from here. This method
   // will be called when the composition string of the current IME is not drawn
   // by us and some characters are committed. In that case, the committed
   // string was processed in nsWindow::OnIMEComposition already.
 
   // We need to consume the message so that Windows don't send two WM_CHAR msgs
@@ -850,17 +850,17 @@ IMMHandler::OnIMEChar(nsWindow* aWindow,
 }
 
 // static
 bool
 IMMHandler::OnIMECompositionFull(nsWindow* aWindow,
                                  MSGResult& aResult)
 {
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: OnIMECompositionFull, hWnd=%08x",
+    ("OnIMECompositionFull, hWnd=%08x",
      aWindow->GetWindowHandle()));
 
   // not implement yet
   aResult.mConsumed = false;
   return true;
 }
 
 // static
@@ -868,82 +868,82 @@ bool
 IMMHandler::OnIMENotify(nsWindow* aWindow,
                         WPARAM wParam,
                         LPARAM lParam,
                         MSGResult& aResult)
 {
   switch (wParam) {
     case IMN_CHANGECANDIDATE:
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: OnIMENotify, hWnd=%08x, IMN_CHANGECANDIDATE, lParam=%08x",
+        ("OnIMENotify, hWnd=%08x, IMN_CHANGECANDIDATE, lParam=%08x",
          aWindow->GetWindowHandle(), lParam));
       break;
     case IMN_CLOSECANDIDATE:
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: OnIMENotify, hWnd=%08x, IMN_CLOSECANDIDATE, lParam=%08x",
+        ("OnIMENotify, hWnd=%08x, IMN_CLOSECANDIDATE, lParam=%08x",
          aWindow->GetWindowHandle(), lParam));
       break;
     case IMN_CLOSESTATUSWINDOW:
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: OnIMENotify, hWnd=%08x, IMN_CLOSESTATUSWINDOW",
+        ("OnIMENotify, hWnd=%08x, IMN_CLOSESTATUSWINDOW",
          aWindow->GetWindowHandle()));
       break;
     case IMN_GUIDELINE:
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: OnIMENotify, hWnd=%08x, IMN_GUIDELINE",
+        ("OnIMENotify, hWnd=%08x, IMN_GUIDELINE",
          aWindow->GetWindowHandle()));
       break;
     case IMN_OPENCANDIDATE:
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: OnIMENotify, hWnd=%08x, IMN_OPENCANDIDATE, lParam=%08x",
+        ("OnIMENotify, hWnd=%08x, IMN_OPENCANDIDATE, lParam=%08x",
          aWindow->GetWindowHandle(), lParam));
       break;
     case IMN_OPENSTATUSWINDOW:
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: OnIMENotify, hWnd=%08x, IMN_OPENSTATUSWINDOW",
+        ("OnIMENotify, hWnd=%08x, IMN_OPENSTATUSWINDOW",
          aWindow->GetWindowHandle()));
       break;
     case IMN_SETCANDIDATEPOS:
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: OnIMENotify, hWnd=%08x, IMN_SETCANDIDATEPOS, lParam=%08x",
+        ("OnIMENotify, hWnd=%08x, IMN_SETCANDIDATEPOS, lParam=%08x",
          aWindow->GetWindowHandle(), lParam));
       break;
     case IMN_SETCOMPOSITIONFONT:
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: OnIMENotify, hWnd=%08x, IMN_SETCOMPOSITIONFONT",
+        ("OnIMENotify, hWnd=%08x, IMN_SETCOMPOSITIONFONT",
          aWindow->GetWindowHandle()));
       break;
     case IMN_SETCOMPOSITIONWINDOW:
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: OnIMENotify, hWnd=%08x, IMN_SETCOMPOSITIONWINDOW",
+        ("OnIMENotify, hWnd=%08x, IMN_SETCOMPOSITIONWINDOW",
          aWindow->GetWindowHandle()));
       break;
     case IMN_SETCONVERSIONMODE:
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: OnIMENotify, hWnd=%08x, IMN_SETCONVERSIONMODE",
+        ("OnIMENotify, hWnd=%08x, IMN_SETCONVERSIONMODE",
          aWindow->GetWindowHandle()));
       break;
     case IMN_SETOPENSTATUS:
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: OnIMENotify, hWnd=%08x, IMN_SETOPENSTATUS",
+        ("OnIMENotify, hWnd=%08x, IMN_SETOPENSTATUS",
          aWindow->GetWindowHandle()));
       break;
     case IMN_SETSENTENCEMODE:
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: OnIMENotify, hWnd=%08x, IMN_SETSENTENCEMODE",
+        ("OnIMENotify, hWnd=%08x, IMN_SETSENTENCEMODE",
          aWindow->GetWindowHandle()));
       break;
     case IMN_SETSTATUSWINDOWPOS:
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: OnIMENotify, hWnd=%08x, IMN_SETSTATUSWINDOWPOS",
+        ("OnIMENotify, hWnd=%08x, IMN_SETSTATUSWINDOWPOS",
          aWindow->GetWindowHandle()));
       break;
     case IMN_PRIVATE:
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: OnIMENotify, hWnd=%08x, IMN_PRIVATE",
+        ("OnIMENotify, hWnd=%08x, IMN_PRIVATE",
          aWindow->GetWindowHandle()));
       break;
   }
 
   // not implement yet
   aResult.mConsumed = false;
   return true;
 }
@@ -952,96 +952,96 @@ bool
 IMMHandler::OnIMERequest(nsWindow* aWindow,
                          WPARAM wParam,
                          LPARAM lParam,
                          MSGResult& aResult)
 {
   switch (wParam) {
     case IMR_RECONVERTSTRING:
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: OnIMERequest, hWnd=%08x, IMR_RECONVERTSTRING",
+        ("OnIMERequest, hWnd=%08x, IMR_RECONVERTSTRING",
          aWindow->GetWindowHandle()));
       aResult.mConsumed = HandleReconvert(aWindow, lParam, &aResult.mResult);
       return true;
     case IMR_QUERYCHARPOSITION:
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: OnIMERequest, hWnd=%08x, IMR_QUERYCHARPOSITION",
+        ("OnIMERequest, hWnd=%08x, IMR_QUERYCHARPOSITION",
          aWindow->GetWindowHandle()));
       aResult.mConsumed =
         HandleQueryCharPosition(aWindow, lParam, &aResult.mResult);
       return true;
     case IMR_DOCUMENTFEED:
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: OnIMERequest, hWnd=%08x, IMR_DOCUMENTFEED",
+        ("OnIMERequest, hWnd=%08x, IMR_DOCUMENTFEED",
          aWindow->GetWindowHandle()));
       aResult.mConsumed = HandleDocumentFeed(aWindow, lParam, &aResult.mResult);
       return true;
     default:
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: OnIMERequest, hWnd=%08x, wParam=%08x",
+        ("OnIMERequest, hWnd=%08x, wParam=%08x",
          aWindow->GetWindowHandle(), wParam));
       aResult.mConsumed = false;
       return true;
   }
 }
 
 // static
 bool
 IMMHandler::OnIMESelect(nsWindow* aWindow,
                         WPARAM wParam,
                         LPARAM lParam,
                         MSGResult& aResult)
 {
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: OnIMESelect, hWnd=%08x, wParam=%08x, lParam=%08x",
+    ("OnIMESelect, hWnd=%08x, wParam=%08x, lParam=%08x",
      aWindow->GetWindowHandle(), wParam, lParam));
 
   // not implement yet
   aResult.mConsumed = false;
   return true;
 }
 
 // static
 bool
 IMMHandler::OnIMESetContext(nsWindow* aWindow,
                             WPARAM wParam,
                             LPARAM lParam,
                             MSGResult& aResult)
 {
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: OnIMESetContext, hWnd=%08x, %s, lParam=%08x",
+    ("OnIMESetContext, hWnd=%08x, %s, lParam=%08x",
      aWindow->GetWindowHandle(), wParam ? "Active" : "Deactive", lParam));
 
   aResult.mConsumed = false;
 
   // NOTE: If the aWindow is top level window of the composing window because
   // when a window on deactive window gets focus, WM_IME_SETCONTEXT (wParam is
   // TRUE) is sent to the top level window first.  After that,
   // WM_IME_SETCONTEXT (wParam is FALSE) is sent to the top level window.
   // Finally, WM_IME_SETCONTEXT (wParam is TRUE) is sent to the focused window.
   // The top level window never becomes composing window, so, we can ignore
   // the WM_IME_SETCONTEXT on the top level window.
   if (IsTopLevelWindowOfComposition(aWindow)) {
     MOZ_LOG(gIMMLog, LogLevel::Info,
-      ("IMM: OnIMESetContext, hWnd=%08x is top level window"));
+      ("OnIMESetContext, hWnd=%08x is top level window"));
     return true;
   }
 
   // When IME context is activating on another window,
   // we should commit the old composition on the old window.
   bool cancelComposition = false;
   if (wParam && gIMMHandler) {
     cancelComposition =
       gIMMHandler->CommitCompositionOnPreviousWindow(aWindow);
   }
 
   if (wParam && (lParam & ISC_SHOWUICOMPOSITIONWINDOW) &&
       ShouldDrawCompositionStringOurselves()) {
     MOZ_LOG(gIMMLog, LogLevel::Info,
-      ("IMM: OnIMESetContext, ISC_SHOWUICOMPOSITIONWINDOW is removed"));
+      ("OnIMESetContext, ISC_SHOWUICOMPOSITIONWINDOW is removed"));
     lParam &= ~ISC_SHOWUICOMPOSITIONWINDOW;
   }
 
   // We should sent WM_IME_SETCONTEXT to the DefWndProc here because the
   // ancestor windows shouldn't receive this message.  If they receive the
   // message, we cannot know whether which window is the target of the message.
   aResult.mResult = ::DefWindowProc(aWindow->GetWindowHandle(),
                                     WM_IME_SETCONTEXT, wParam, lParam);
@@ -1068,17 +1068,17 @@ IMMHandler::OnChar(nsWindow* aWindow,
   aResult.mConsumed = false;
   if (IsIMECharRecordsEmpty()) {
     return aResult.mConsumed;
   }
   WPARAM recWParam;
   LPARAM recLParam;
   DequeueIMECharRecords(recWParam, recLParam);
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: OnChar, aWindow=%p, wParam=%08x, lParam=%08x, "
+    ("OnChar, aWindow=%p, wParam=%08x, lParam=%08x, "
      "recorded: wParam=%08x, lParam=%08x",
      aWindow->GetWindowHandle(), wParam, lParam, recWParam, recLParam));
   // If an unexpected char message comes, we should reset the records,
   // of course, this shouldn't happen.
   if (recWParam != wParam || recLParam != lParam) {
     ResetIMECharRecords();
     return aResult.mConsumed;
   }
@@ -1094,17 +1094,17 @@ IMMHandler::OnChar(nsWindow* aWindow,
  ****************************************************************************/
 
 void
 IMMHandler::OnIMEStartCompositionOnPlugin(nsWindow* aWindow,
                                           WPARAM wParam,
                                           LPARAM lParam)
 {
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: OnIMEStartCompositionOnPlugin, hWnd=%08x, mIsComposingOnPlugin=%s",
+    ("OnIMEStartCompositionOnPlugin, hWnd=%08x, mIsComposingOnPlugin=%s",
      aWindow->GetWindowHandle(), GetBoolName(mIsComposingOnPlugin)));
   mIsComposingOnPlugin = true;
   mDispatcher = GetTextEventDispatcherFor(aWindow);
   mComposingWindow = aWindow;
   IMEContext context(aWindow);
   SetIMERelatedWindowsPosOnPlugin(aWindow, context);
   // On widnowless plugin, we should assume that the focused editor is always
   // in horizontal writing mode.
@@ -1112,17 +1112,17 @@ IMMHandler::OnIMEStartCompositionOnPlugi
 }
 
 void
 IMMHandler::OnIMECompositionOnPlugin(nsWindow* aWindow,
                                      WPARAM wParam,
                                      LPARAM lParam)
 {
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: OnIMECompositionOnPlugin, hWnd=%08x, lParam=%08x, "
+    ("OnIMECompositionOnPlugin, hWnd=%08x, lParam=%08x, "
      "mIsComposingOnPlugin=%s, GCS_RESULTSTR=%s, GCS_COMPSTR=%s, "
      "GCS_COMPATTR=%s, GCS_COMPCLAUSE=%s, GCS_CURSORPOS=%s",
      aWindow->GetWindowHandle(), lParam, GetBoolName(mIsComposingOnPlugin),
      GetBoolName(lParam & GCS_RESULTSTR), GetBoolName(lParam & GCS_COMPSTR),
      GetBoolName(lParam & GCS_COMPATTR), GetBoolName(lParam & GCS_COMPCLAUSE),
      GetBoolName(lParam & GCS_CURSORPOS)));
   // We should end composition if there is a committed string.
   if (IS_COMMITTING_LPARAM(lParam)) {
@@ -1142,17 +1142,17 @@ IMMHandler::OnIMECompositionOnPlugin(nsW
 }
 
 void
 IMMHandler::OnIMEEndCompositionOnPlugin(nsWindow* aWindow,
                                         WPARAM wParam,
                                         LPARAM lParam)
 {
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: OnIMEEndCompositionOnPlugin, hWnd=%08x, mIsComposingOnPlugin=%s",
+    ("OnIMEEndCompositionOnPlugin, hWnd=%08x, mIsComposingOnPlugin=%s",
      aWindow->GetWindowHandle(), GetBoolName(mIsComposingOnPlugin)));
 
   mIsComposingOnPlugin = false;
   mComposingWindow = nullptr;
   mDispatcher = nullptr;
 
   if (mNativeCaretIsCreated) {
     ::DestroyCaret();
@@ -1162,17 +1162,17 @@ IMMHandler::OnIMEEndCompositionOnPlugin(
 
 bool
 IMMHandler::OnIMECharOnPlugin(nsWindow* aWindow,
                               WPARAM wParam,
                               LPARAM lParam,
                               MSGResult& aResult)
 {
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: OnIMECharOnPlugin, hWnd=%08x, char=%08x, scancode=%08x",
+    ("OnIMECharOnPlugin, hWnd=%08x, char=%08x, scancode=%08x",
      aWindow->GetWindowHandle(), wParam, lParam));
 
   aResult.mConsumed =
     aWindow->DispatchPluginEvent(WM_IME_CHAR, wParam, lParam, true);
 
   if (!aResult.mConsumed) {
     // Record the WM_CHAR messages which are going to be coming.
     EnsureHandlerInstance();
@@ -1184,17 +1184,17 @@ IMMHandler::OnIMECharOnPlugin(nsWindow* 
 // static
 bool
 IMMHandler::OnIMESetContextOnPlugin(nsWindow* aWindow,
                                     WPARAM wParam,
                                     LPARAM lParam,
                                     MSGResult& aResult)
 {
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: OnIMESetContextOnPlugin, hWnd=%08x, %s, lParam=%08x",
+    ("OnIMESetContextOnPlugin, hWnd=%08x, %s, lParam=%08x",
      aWindow->GetWindowHandle(), wParam ? "Active" : "Deactive", lParam));
 
   // If the IME context becomes active on a plug-in, we should commit
   // our composition.  And also we should cancel the composition on new
   // window.  Note that if IsTopLevelWindowOfComposition(aWindow) returns
   // true, we should ignore the message here, see the comment in
   // OnIMESetContext() for the detail.
   if (wParam && gIMMHandler && !IsTopLevelWindowOfComposition(aWindow)) {
@@ -1237,17 +1237,17 @@ IMMHandler::OnCharOnPlugin(nsWindow* aWi
   if (IsIMECharRecordsEmpty()) {
     return false;
   }
 
   WPARAM recWParam;
   LPARAM recLParam;
   DequeueIMECharRecords(recWParam, recLParam);
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: OnCharOnPlugin, aWindow=%p, wParam=%08x, lParam=%08x, "
+    ("OnCharOnPlugin, aWindow=%p, wParam=%08x, lParam=%08x, "
      "recorded: wParam=%08x, lParam=%08x",
      aWindow->GetWindowHandle(), wParam, lParam, recWParam, recLParam));
   // If an unexpected char message comes, we should reset the records,
   // of course, this shouldn't happen.
   if (recWParam != wParam || recLParam != lParam) {
     ResetIMECharRecords();
   }
   // WM_CHAR on plug-in is always handled by nsWindow.
@@ -1270,50 +1270,50 @@ IMMHandler::HandleStartComposition(nsWin
                                    const IMEContext& aContext)
 {
   NS_PRECONDITION(!mIsComposing,
     "HandleStartComposition is called but mIsComposing is TRUE");
 
   Selection& selection = GetSelection();
   if (!selection.EnsureValidSelection(aWindow)) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: HandleStartComposition, FAILED, due to "
+      ("HandleStartComposition, FAILED, due to "
        "Selection::EnsureValidSelection() failure"));
     return;
   }
 
   AdjustCompositionFont(aWindow, aContext, selection.mWritingMode);
 
   mCompositionStart = selection.mOffset;
   mCursorPosition = NO_IME_CARET;
 
   RefPtr<TextEventDispatcher> dispatcher = GetTextEventDispatcherFor(aWindow);
   nsresult rv = dispatcher->BeginNativeInputTransaction();
   if (NS_WARN_IF(NS_FAILED(rv))) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: HandleStartComposition, FAILED due to "
+      ("HandleStartComposition, FAILED due to "
        "TextEventDispatcher::BeginNativeInputTransaction() failure"));
     return;
   }
   WidgetEventTime eventTime = aWindow->CurrentMessageWidgetEventTime();
   nsEventStatus status;
   rv = dispatcher->StartComposition(status, &eventTime);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: HandleStartComposition, FAILED, due to "
+      ("HandleStartComposition, FAILED, due to "
        "TextEventDispatcher::StartComposition() failure"));
     return;
   }
 
   mIsComposing = true;
   mComposingWindow = aWindow;
   mDispatcher = dispatcher;
 
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: HandleStartComposition, START composition, mCompositionStart=%ld",
+    ("HandleStartComposition, START composition, mCompositionStart=%ld",
      mCompositionStart));
 }
 
 bool
 IMMHandler::HandleComposition(nsWindow* aWindow,
                               const IMEContext& aContext,
                               LPARAM lParam)
 {
@@ -1334,17 +1334,17 @@ IMMHandler::HandleComposition(nsWindow* 
     HWND wnd = aWindow->GetWindowHandle();
     if (WinUtils::PeekMessage(&msg1, wnd, WM_IME_STARTCOMPOSITION,
                               WM_IME_COMPOSITION, PM_NOREMOVE) &&
         msg1.message == WM_IME_STARTCOMPOSITION &&
         WinUtils::PeekMessage(&msg2, wnd, WM_IME_ENDCOMPOSITION,
                               WM_IME_COMPOSITION, PM_NOREMOVE) &&
         msg2.message == WM_IME_COMPOSITION) {
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: HandleComposition, Ignores due to find a "
+        ("HandleComposition, Ignores due to find a "
          "WM_IME_STARTCOMPOSITION"));
       return ShouldDrawCompositionStringOurselves();
     }
   }
 
   bool startCompositionMessageHasBeenSent = mIsComposing;
 
   //
@@ -1353,17 +1353,17 @@ IMMHandler::HandleComposition(nsWindow* 
   if (IS_COMMITTING_LPARAM(lParam)) {
     if (!mIsComposing) {
       HandleStartComposition(aWindow, aContext);
     }
 
     GetCompositionString(aContext, GCS_RESULTSTR, mCompositionString);
 
     MOZ_LOG(gIMMLog, LogLevel::Info,
-      ("IMM: HandleComposition, GCS_RESULTSTR"));
+      ("HandleComposition, GCS_RESULTSTR"));
 
     HandleEndComposition(aWindow, &mCompositionString);
 
     if (!IS_COMPOSING_LPARAM(lParam)) {
       return ShouldDrawCompositionStringOurselves();
     }
   }
 
@@ -1374,24 +1374,24 @@ IMMHandler::HandleComposition(nsWindow* 
   if (!mIsComposing) {
     HandleStartComposition(aWindow, aContext);
   }
 
   //--------------------------------------------------------
   // 1. Get GCS_COMPSTR
   //--------------------------------------------------------
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: HandleComposition, GCS_COMPSTR"));
+    ("HandleComposition, GCS_COMPSTR"));
 
   nsAutoString previousCompositionString(mCompositionString);
   GetCompositionString(aContext, GCS_COMPSTR, mCompositionString);
 
   if (!IS_COMPOSING_LPARAM(lParam)) {
     MOZ_LOG(gIMMLog, LogLevel::Info,
-      ("IMM: HandleComposition, lParam doesn't indicate composing, "
+      ("HandleComposition, lParam doesn't indicate composing, "
        "mCompositionString=\"%s\", previousCompositionString=\"%s\"",
        NS_ConvertUTF16toUTF8(mCompositionString).get(),
        NS_ConvertUTF16toUTF8(previousCompositionString).get()));
 
     // If composition string isn't changed, we can trust the lParam.
     // So, we need to do nothing.
     if (previousCompositionString == mCompositionString) {
       return ShouldDrawCompositionStringOurselves();
@@ -1420,17 +1420,17 @@ IMMHandler::HandleComposition(nsWindow* 
     // WM_IME_COMPOSITION with GCS_COMP* and GCS_RESULT* when
     // user inputted the Chinese full stop. So, that doesn't send
     // WM_IME_STARTCOMPOSITION and WM_IME_ENDCOMPOSITION.
     // If WM_IME_STARTCOMPOSITION was not sent and the composition
     // string is null (it indicates the composition transaction ended),
     // WM_IME_ENDCOMPOSITION may not be sent. If so, we cannot run
     // HandleEndComposition() in other place.
     MOZ_LOG(gIMMLog, LogLevel::Info,
-      ("IMM: HandleComposition, Aborting GCS_COMPSTR"));
+      ("HandleComposition, Aborting GCS_COMPSTR"));
     HandleEndComposition(aWindow);
     return IS_COMMITTING_LPARAM(lParam);
   }
 
   //--------------------------------------------------------
   // 2. Get GCS_COMPCLAUSE
   //--------------------------------------------------------
   long clauseArrayLength =
@@ -1443,32 +1443,32 @@ IMMHandler::HandleComposition(nsWindow* 
 
     // Intelligent ABC IME (Simplified Chinese IME, the code page is 936)
     // will crash in ImmGetCompositionStringW for GCS_COMPCLAUSE (bug 424663).
     // See comment 35 of the bug for the detail. Therefore, we should use A
     // API for it, however, we should not kill Unicode support on all IMEs.
     bool useA_API = !(sIMEProperty & IME_PROP_UNICODE);
 
     MOZ_LOG(gIMMLog, LogLevel::Info,
-      ("IMM: HandleComposition, GCS_COMPCLAUSE, useA_API=%s",
+      ("HandleComposition, GCS_COMPCLAUSE, useA_API=%s",
        useA_API ? "TRUE" : "FALSE"));
 
     long clauseArrayLength2 = 
       useA_API ?
         ::ImmGetCompositionStringA(aContext.get(), GCS_COMPCLAUSE,
                                    mClauseArray.Elements(),
                                    mClauseArray.Capacity() * sizeof(uint32_t)) :
         ::ImmGetCompositionStringW(aContext.get(), GCS_COMPCLAUSE,
                                    mClauseArray.Elements(),
                                    mClauseArray.Capacity() * sizeof(uint32_t));
     clauseArrayLength2 /= sizeof(uint32_t);
 
     if (clauseArrayLength != clauseArrayLength2) {
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: HandleComposition, GCS_COMPCLAUSE, clauseArrayLength=%ld but "
+        ("HandleComposition, GCS_COMPCLAUSE, clauseArrayLength=%ld but "
          "clauseArrayLength2=%ld",
          clauseArrayLength, clauseArrayLength2));
       if (clauseArrayLength > clauseArrayLength2)
         clauseArrayLength = clauseArrayLength2;
     }
 
     if (useA_API) {
       // Convert each values of sIMECompClauseArray. The values mean offset of
@@ -1488,17 +1488,17 @@ IMMHandler::HandleComposition(nsWindow* 
       }
     }
   }
   // compClauseArrayLength may be negative. I.e., ImmGetCompositionStringW
   // may return an error code.
   mClauseArray.SetLength(std::max<long>(0, clauseArrayLength));
 
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: HandleComposition, GCS_COMPCLAUSE, mClauseLength=%ld",
+    ("HandleComposition, GCS_COMPCLAUSE, mClauseLength=%ld",
      mClauseArray.Length()));
 
   //--------------------------------------------------------
   // 3. Get GCS_COMPATTR
   //--------------------------------------------------------
   // This provides us with the attribute string necessary 
   // for doing hiliting
   long attrArrayLength =
@@ -1514,17 +1514,17 @@ IMMHandler::HandleComposition(nsWindow* 
                                  mAttributeArray.Capacity() * sizeof(uint8_t));
   }
 
   // attrStrLen may be negative. I.e., ImmGetCompositionStringW may return an
   // error code.
   mAttributeArray.SetLength(std::max<long>(0, attrArrayLength));
 
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: HandleComposition, GCS_COMPATTR, mAttributeLength=%ld",
+    ("HandleComposition, GCS_COMPATTR, mAttributeLength=%ld",
      mAttributeArray.Length()));
 
   //--------------------------------------------------------
   // 4. Get GCS_CURSOPOS
   //--------------------------------------------------------
   // Some IMEs (e.g., the standard IME for Korean) don't have caret position.
   if (lParam & GCS_CURSORPOS) {
     mCursorPosition =
@@ -1535,17 +1535,17 @@ IMMHandler::HandleComposition(nsWindow* 
   } else {
     mCursorPosition = NO_IME_CARET;
   }
 
   NS_ASSERTION(mCursorPosition <= (long)mCompositionString.Length(),
                "illegal pos");
 
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: HandleComposition, GCS_CURSORPOS, mCursorPosition=%d",
+    ("HandleComposition, GCS_CURSORPOS, mCursorPosition=%d",
      mCursorPosition));
 
   //--------------------------------------------------------
   // 5. Send the compositionchange event
   //--------------------------------------------------------
   DispatchCompositionChangeEvent(aWindow, aContext);
 
   return ShouldDrawCompositionStringOurselves();
@@ -1554,39 +1554,39 @@ IMMHandler::HandleComposition(nsWindow* 
 void
 IMMHandler::HandleEndComposition(nsWindow* aWindow,
                                  const nsAString* aCommitString)
 {
   MOZ_ASSERT(mIsComposing,
     "HandleEndComposition is called but mIsComposing is FALSE");
 
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: HandleEndComposition(aWindow=0x%p, aCommitString=0x%p (\"%s\"))",
+    ("HandleEndComposition(aWindow=0x%p, aCommitString=0x%p (\"%s\"))",
      aWindow, aCommitString,
      aCommitString ? NS_ConvertUTF16toUTF8(*aCommitString).get() : ""));
 
   if (mNativeCaretIsCreated) {
     ::DestroyCaret();
     mNativeCaretIsCreated = false;
   }
 
   RefPtr<TextEventDispatcher> dispatcher = GetTextEventDispatcherFor(aWindow);
   nsresult rv = dispatcher->BeginNativeInputTransaction();
   if (NS_WARN_IF(NS_FAILED(rv))) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: HandleEndComposition, FAILED due to "
+      ("HandleEndComposition, FAILED due to "
        "TextEventDispatcher::BeginNativeInputTransaction() failure"));
     return;
   }
   WidgetEventTime eventTime = aWindow->CurrentMessageWidgetEventTime();
   nsEventStatus status;
   rv = dispatcher->CommitComposition(status, aCommitString, &eventTime);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: HandleStartComposition, FAILED, due to "
+      ("HandleStartComposition, FAILED, due to "
        "TextEventDispatcher::CommitComposition() failure"));
     return;
   }
   mIsComposing = false;
   // XXX aWindow and mComposingWindow are always same??
   mComposingWindow = nullptr;
   mDispatcher = nullptr;
 }
@@ -1597,41 +1597,41 @@ IMMHandler::HandleReconvert(nsWindow* aW
                             LRESULT* oResult)
 {
   *oResult = 0;
   RECONVERTSTRING* pReconv = reinterpret_cast<RECONVERTSTRING*>(lParam);
 
   Selection& selection = GetSelection();
   if (!selection.EnsureValidSelection(aWindow)) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: HandleReconvert, FAILED, due to "
+      ("HandleReconvert, FAILED, due to "
        "Selection::EnsureValidSelection() failure"));
     return false;
   }
 
   uint32_t len = selection.Length();
   uint32_t needSize = sizeof(RECONVERTSTRING) + len * sizeof(WCHAR);
 
   if (!pReconv) {
     // Return need size to reconvert.
     if (len == 0) {
       MOZ_LOG(gIMMLog, LogLevel::Error,
-        ("IMM: HandleReconvert, There are not selected text"));
+        ("HandleReconvert, There are not selected text"));
       return false;
     }
     *oResult = needSize;
     MOZ_LOG(gIMMLog, LogLevel::Info,
-      ("IMM: HandleReconvert, succeeded, result=%ld",
+      ("HandleReconvert, succeeded, result=%ld",
        *oResult));
     return true;
   }
 
   if (pReconv->dwSize < needSize) {
     MOZ_LOG(gIMMLog, LogLevel::Info,
-      ("IMM: HandleReconvert, FAILED, pReconv->dwSize=%ld, needSize=%ld",
+      ("HandleReconvert, FAILED, pReconv->dwSize=%ld, needSize=%ld",
        pReconv->dwSize, needSize));
     return false;
   }
 
   *oResult = needSize;
 
   // Fill reconvert struct
   pReconv->dwVersion         = 0;
@@ -1641,51 +1641,51 @@ IMMHandler::HandleReconvert(nsWindow* aW
   pReconv->dwCompStrOffset   = 0;
   pReconv->dwTargetStrLen    = len;
   pReconv->dwTargetStrOffset = 0;
 
   ::CopyMemory(reinterpret_cast<LPVOID>(lParam + sizeof(RECONVERTSTRING)),
                selection.mString.get(), len * sizeof(WCHAR));
 
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: HandleReconvert, SUCCEEDED, pReconv=%s, result=%ld",
+    ("HandleReconvert, SUCCEEDED, pReconv=%s, result=%ld",
      GetReconvertStringLog(pReconv).get(), *oResult));
 
   return true;
 }
 
 bool
 IMMHandler::HandleQueryCharPosition(nsWindow* aWindow,
                                     LPARAM lParam,
                                     LRESULT* oResult)
 {
   uint32_t len = mIsComposing ? mCompositionString.Length() : 0;
   *oResult = false;
   IMECHARPOSITION* pCharPosition = reinterpret_cast<IMECHARPOSITION*>(lParam);
   if (!pCharPosition) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: HandleQueryCharPosition, FAILED, due to pCharPosition is null"));
+      ("HandleQueryCharPosition, FAILED, due to pCharPosition is null"));
     return false;
   }
   if (pCharPosition->dwSize < sizeof(IMECHARPOSITION)) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: HandleReconvert, FAILED, pCharPosition->dwSize=%ld, "
+      ("HandleReconvert, FAILED, pCharPosition->dwSize=%ld, "
        "sizeof(IMECHARPOSITION)=%ld",
        pCharPosition->dwSize, sizeof(IMECHARPOSITION)));
     return false;
   }
   if (::GetFocus() != aWindow->GetWindowHandle()) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: HandleReconvert, FAILED, ::GetFocus()=%08x, OurWindowHandle=%08x",
+      ("HandleReconvert, FAILED, ::GetFocus()=%08x, OurWindowHandle=%08x",
        ::GetFocus(), aWindow->GetWindowHandle()));
     return false;
   }
   if (pCharPosition->dwCharPos > len) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: HandleQueryCharPosition, FAILED, pCharPosition->dwCharPos=%ld, "
+      ("HandleQueryCharPosition, FAILED, pCharPosition->dwCharPos=%ld, "
        "len=%ld",
        pCharPosition->dwCharPos, len));
     return false;
   }
 
   LayoutDeviceIntRect r;
   bool ret =
     GetCharacterRectOfSelectedTextAt(aWindow, pCharPosition->dwCharPos, r);
@@ -1708,33 +1708,33 @@ IMMHandler::HandleQueryCharPosition(nsWi
 
   pCharPosition->cLineHeight = r.height;
 
   WidgetQueryContentEvent editorRect(true, eQueryEditorRect, aWindow);
   aWindow->InitEvent(editorRect);
   DispatchEvent(aWindow, editorRect);
   if (NS_WARN_IF(!editorRect.mSucceeded)) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: HandleQueryCharPosition, eQueryEditorRect failed"));
+      ("HandleQueryCharPosition, eQueryEditorRect failed"));
     ::GetWindowRect(aWindow->GetWindowHandle(), &pCharPosition->rcDocument);
   } else {
     LayoutDeviceIntRect editorRectInWindow = editorRect.mReply.mRect;
     nsWindow* window = editorRect.mReply.mFocusedWidget ?
       static_cast<nsWindow*>(editorRect.mReply.mFocusedWidget) : aWindow;
     LayoutDeviceIntRect editorRectInScreen;
     ResolveIMECaretPos(window, editorRectInWindow, nullptr, editorRectInScreen);
     ::SetRect(&pCharPosition->rcDocument,
               editorRectInScreen.x, editorRectInScreen.y,
               editorRectInScreen.XMost(), editorRectInScreen.YMost());
   }
 
   *oResult = TRUE;
 
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: HandleQueryCharPosition, SUCCEEDED, pCharPosition={ pt={ x=%d, "
+    ("HandleQueryCharPosition, SUCCEEDED, pCharPosition={ pt={ x=%d, "
      "y=%d }, cLineHeight=%d, rcDocument={ left=%d, top=%d, right=%d, "
      "bottom=%d } }",
      pCharPosition->pt.x, pCharPosition->pt.y, pCharPosition->cLineHeight,
      pCharPosition->rcDocument.left, pCharPosition->rcDocument.top,
      pCharPosition->rcDocument.right, pCharPosition->rcDocument.bottom));
   return true;
 }
 
@@ -1751,53 +1751,53 @@ IMMHandler::HandleDocumentFeed(nsWindow*
   bool hasCompositionString =
     mIsComposing && ShouldDrawCompositionStringOurselves();
 
   int32_t targetOffset, targetLength;
   if (!hasCompositionString) {
     Selection& selection = GetSelection();
     if (!selection.EnsureValidSelection(aWindow)) {
       MOZ_LOG(gIMMLog, LogLevel::Error,
-        ("IMM: HandleDocumentFeed, FAILED, due to "
+        ("HandleDocumentFeed, FAILED, due to "
          "Selection::EnsureValidSelection() failure"));
       return false;
     }
     targetOffset = int32_t(selection.mOffset);
     targetLength = int32_t(selection.Length());
   } else {
     targetOffset = int32_t(mCompositionStart);
     targetLength = int32_t(mCompositionString.Length());
   }
 
   // XXX nsString::Find and nsString::RFind take int32_t for offset, so,
   //     we cannot support this message when the current offset is larger than
   //     INT32_MAX.
   if (targetOffset < 0 || targetLength < 0 ||
       targetOffset + targetLength < 0) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: HandleDocumentFeed, FAILED, due to the selection is out of "
+      ("HandleDocumentFeed, FAILED, due to the selection is out of "
        "range"));
     return false;
   }
 
   // Get all contents of the focused editor.
   WidgetQueryContentEvent textContent(true, eQueryTextContent, aWindow);
   textContent.InitForQueryTextContent(0, UINT32_MAX);
   aWindow->InitEvent(textContent, &point);
   DispatchEvent(aWindow, textContent);
   if (!textContent.mSucceeded) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: HandleDocumentFeed, FAILED, due to eQueryTextContent failure"));
+      ("HandleDocumentFeed, FAILED, due to eQueryTextContent failure"));
     return false;
   }
 
   nsAutoString str(textContent.mReply.mString);
   if (targetOffset > int32_t(str.Length())) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: HandleDocumentFeed, FAILED, due to the caret offset is invalid"));
+      ("HandleDocumentFeed, FAILED, due to the caret offset is invalid"));
     return false;
   }
 
   // Get the focused paragraph, we decide that it starts from the previous CRLF
   // (or start of the editor) to the next one (or the end of the editor).
   int32_t paragraphStart = str.RFind("\n", false, targetOffset, -1) + 1;
   int32_t paragraphEnd =
     str.Find("\r", false, targetOffset + targetLength, -1);
@@ -1808,41 +1808,41 @@ IMMHandler::HandleDocumentFeed(nsWindow*
                                  paragraphEnd - paragraphStart);
 
   uint32_t len = paragraph.Length();
   uint32_t needSize = sizeof(RECONVERTSTRING) + len * sizeof(WCHAR);
 
   if (!pReconv) {
     *oResult = needSize;
     MOZ_LOG(gIMMLog, LogLevel::Info,
-      ("IMM: HandleDocumentFeed, succeeded, result=%ld",
+      ("HandleDocumentFeed, succeeded, result=%ld",
        *oResult));
     return true;
   }
 
   if (pReconv->dwSize < needSize) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: HandleDocumentFeed, FAILED, pReconv->dwSize=%ld, needSize=%ld",
+      ("HandleDocumentFeed, FAILED, pReconv->dwSize=%ld, needSize=%ld",
        pReconv->dwSize, needSize));
     return false;
   }
 
   // Fill reconvert struct
   pReconv->dwVersion         = 0;
   pReconv->dwStrLen          = len;
   pReconv->dwStrOffset       = sizeof(RECONVERTSTRING);
   if (hasCompositionString) {
     pReconv->dwCompStrLen      = targetLength;
     pReconv->dwCompStrOffset   =
       (targetOffset - paragraphStart) * sizeof(WCHAR);
     // Set composition target clause information
     uint32_t offset, length;
     if (!GetTargetClauseRange(&offset, &length)) {
       MOZ_LOG(gIMMLog, LogLevel::Error,
-        ("IMM: HandleDocumentFeed, FAILED, due to GetTargetClauseRange() "
+        ("HandleDocumentFeed, FAILED, due to GetTargetClauseRange() "
          "failure"));
       return false;
     }
     pReconv->dwTargetStrLen    = length;
     pReconv->dwTargetStrOffset = (offset - paragraphStart) * sizeof(WCHAR);
   } else {
     pReconv->dwTargetStrLen    = targetLength;
     pReconv->dwTargetStrOffset =
@@ -1853,31 +1853,31 @@ IMMHandler::HandleDocumentFeed(nsWindow*
     pReconv->dwCompStrOffset   = pReconv->dwTargetStrOffset;
   }
 
   *oResult = needSize;
   ::CopyMemory(reinterpret_cast<LPVOID>(lParam + sizeof(RECONVERTSTRING)),
                paragraph.BeginReading(), len * sizeof(WCHAR));
 
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: HandleDocumentFeed, SUCCEEDED, pReconv=%s, result=%ld",
+    ("HandleDocumentFeed, SUCCEEDED, pReconv=%s, result=%ld",
      GetReconvertStringLog(pReconv).get(), *oResult));
 
   return true;
 }
 
 bool
 IMMHandler::CommitCompositionOnPreviousWindow(nsWindow* aWindow)
 {
   if (!mComposingWindow || mComposingWindow == aWindow) {
     return false;
   }
 
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: CommitCompositionOnPreviousWindow, mIsComposing=%s",
+    ("CommitCompositionOnPreviousWindow, mIsComposing=%s",
      GetBoolName(mIsComposing)));
 
   // If we have composition, we should dispatch composition events internally.
   if (mIsComposing) {
     IMEContext context(mComposingWindow);
     NS_ASSERTION(context.IsValid(), "IME context must be valid");
 
     HandleEndComposition(mComposingWindow);
@@ -1908,49 +1908,49 @@ PlatformToNSAttr(uint8_t aAttr)
   }
 }
 
 // static
 void
 IMMHandler::DispatchEvent(nsWindow* aWindow, WidgetGUIEvent& aEvent)
 {
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: DispatchEvent(aWindow=0x%p, aEvent={ mMessage=%s }, "
+    ("DispatchEvent(aWindow=0x%p, aEvent={ mMessage=%s }, "
      "aWindow->Destroyed()=%s",
      aWindow, ToChar(aEvent.mMessage), GetBoolName(aWindow->Destroyed())));
 
   if (aWindow->Destroyed()) {
     return;
   }
 
   aWindow->DispatchWindowEvent(&aEvent);
 }
 
 void
 IMMHandler::DispatchCompositionChangeEvent(nsWindow* aWindow,
                                            const IMEContext& aContext)
 {
   NS_ASSERTION(mIsComposing, "conflict state");
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: DispatchCompositionChangeEvent"));
+    ("DispatchCompositionChangeEvent"));
 
   // If we don't need to draw composition string ourselves, we don't need to
   // fire compositionchange event during composing.
   if (!ShouldDrawCompositionStringOurselves()) {
     // But we need to adjust composition window pos and native caret pos, here.
     SetIMERelatedWindowsPos(aWindow, aContext);
     return;
   }
 
   RefPtr<nsWindow> kungFuDeathGrip(aWindow);
   RefPtr<TextEventDispatcher> dispatcher = GetTextEventDispatcherFor(aWindow);
   nsresult rv = dispatcher->BeginNativeInputTransaction();
   if (NS_WARN_IF(NS_FAILED(rv))) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: DispatchCompositionChangeEvent, FAILED due to "
+      ("DispatchCompositionChangeEvent, FAILED due to "
        "TextEventDispatcher::BeginNativeInputTransaction() failure"));
     return;
   }
 
   // NOTE: Calling SetIMERelatedWindowsPos() from this method will be failure
   //       in e10s mode.  compositionchange event will notify this of
   //       NOTIFY_IME_OF_COMPOSITION_EVENT_HANDLED, then
   //       SetIMERelatedWindowsPos() will be called.
@@ -1960,72 +1960,72 @@ IMMHandler::DispatchCompositionChangeEve
   //     (composition string and attributes) are empty.
 
   if (mCompositionString.IsEmpty()) {
     // Don't append clause information if composition string is empty.
   } else if (mClauseArray.IsEmpty()) {
     // Some IMEs don't return clause array information, then, we assume that
     // all characters in the composition string are in one clause.
     MOZ_LOG(gIMMLog, LogLevel::Info,
-      ("IMM: DispatchCompositionChangeEvent, mClauseArray.Length()=0"));
+      ("DispatchCompositionChangeEvent, mClauseArray.Length()=0"));
     rv =dispatcher->SetPendingComposition(mCompositionString, nullptr);
     if (NS_WARN_IF(NS_FAILED(rv))) {
       MOZ_LOG(gIMMLog, LogLevel::Error,
-        ("IMM: DispatchCompositionChangeEvent, FAILED due to"
+        ("DispatchCompositionChangeEvent, FAILED due to"
          "TextEventDispatcher::SetPendingComposition() failure"));
       return;
     }
   } else {
     // iterate over the attributes
     rv = dispatcher->SetPendingCompositionString(mCompositionString);
     if (NS_WARN_IF(NS_FAILED(rv))) {
       MOZ_LOG(gIMMLog, LogLevel::Error,
-        ("IMM: DispatchCompositionChangeEvent, FAILED due to"
+        ("DispatchCompositionChangeEvent, FAILED due to"
          "TextEventDispatcher::SetPendingCompositionString() failure"));
       return;
     }
     uint32_t lastOffset = 0;
     for (uint32_t i = 0; i < mClauseArray.Length() - 1; i++) {
       uint32_t current = mClauseArray[i + 1];
       if (current > mCompositionString.Length()) {
         MOZ_LOG(gIMMLog, LogLevel::Info,
-          ("IMM: DispatchCompositionChangeEvent, mClauseArray[%ld]=%lu. "
+          ("DispatchCompositionChangeEvent, mClauseArray[%ld]=%lu. "
            "This is larger than mCompositionString.Length()=%lu",
            i + 1, current, mCompositionString.Length()));
         current = int32_t(mCompositionString.Length());
       }
 
       uint32_t length = current - lastOffset;
       TextRangeType textRangeType =
         PlatformToNSAttr(mAttributeArray[lastOffset]);
       rv = dispatcher->AppendClauseToPendingComposition(length, textRangeType);
       if (NS_WARN_IF(NS_FAILED(rv))) {
         MOZ_LOG(gIMMLog, LogLevel::Error,
-          ("IMM: DispatchCompositionChangeEvent, FAILED due to"
+          ("DispatchCompositionChangeEvent, FAILED due to"
            "TextEventDispatcher::AppendClauseToPendingComposition() failure"));
         return;
       }
 
       lastOffset = current;
 
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: DispatchCompositionChangeEvent, index=%ld, rangeType=%s, "
+        ("DispatchCompositionChangeEvent, index=%ld, rangeType=%s, "
          "range length=%lu",
          i, ToChar(textRangeType), length));
     }
   }
 
   if (mCursorPosition == NO_IME_CARET) {
     MOZ_LOG(gIMMLog, LogLevel::Info,
-      ("IMM: DispatchCompositionChangeEvent, no caret"));
+      ("DispatchCompositionChangeEvent, no caret"));
   } else {
     uint32_t cursor = static_cast<uint32_t>(mCursorPosition);
     if (cursor > mCompositionString.Length()) {
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: CreateTextRangeArray, mCursorPosition=%ld. "
+        ("CreateTextRangeArray, mCursorPosition=%ld. "
          "This is larger than mCompositionString.Length()=%lu",
          mCursorPosition, mCompositionString.Length()));
       cursor = mCompositionString.Length();
     }
 
     // If caret is in the target clause, the target clause will be painted as
     // normal selection range.  Since caret shouldn't be in selection range on
     // Windows, we shouldn't append caret range in such case.
@@ -2034,37 +2034,37 @@ IMMHandler::DispatchCompositionChangeEve
       clauses ? clauses->GetTargetClause() : nullptr;
     if (targetClause &&
         cursor >= targetClause->mStartOffset &&
         cursor <= targetClause->mEndOffset) {
       // Forget the caret position specified by IME since Gecko's caret position
       // will be at the end of composition string.
       mCursorPosition = NO_IME_CARET;
       MOZ_LOG(gIMMLog, LogLevel::Info,
-        ("IMM: CreateTextRangeArray, no caret due to it's in the target "
+        ("CreateTextRangeArray, no caret due to it's in the target "
          "clause, now, mCursorPosition is NO_IME_CARET"));
     }
 
     if (mCursorPosition != NO_IME_CARET) {
       rv = dispatcher->SetCaretInPendingComposition(cursor, 0);
       if (NS_WARN_IF(NS_FAILED(rv))) {
         MOZ_LOG(gIMMLog, LogLevel::Error,
-          ("IMM: DispatchCompositionChangeEvent, FAILED due to"
+          ("DispatchCompositionChangeEvent, FAILED due to"
            "TextEventDispatcher::SetCaretInPendingComposition() failure"));
         return;
       }
     }
   }
 
   WidgetEventTime eventTime = aWindow->CurrentMessageWidgetEventTime();
   nsEventStatus status;
   rv = dispatcher->FlushPendingComposition(status, &eventTime);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: DispatchCompositionChangeEvent, FAILED due to"
+      ("DispatchCompositionChangeEvent, FAILED due to"
        "TextEventDispatcher::FlushPendingComposition() failure"));
     return;
   }
 }
 
 void
 IMMHandler::GetCompositionString(const IMEContext& aContext,
                                  DWORD aIndex,
@@ -2073,28 +2073,28 @@ IMMHandler::GetCompositionString(const I
   aCompositionString.Truncate();
 
   // Retrieve the size of the required output buffer.
   long lRtn = ::ImmGetCompositionStringW(aContext.get(), aIndex, nullptr, 0);
   if (lRtn < 0 ||
       !aCompositionString.SetLength((lRtn / sizeof(WCHAR)) + 1,
                                     mozilla::fallible)) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: GetCompositionString, FAILED, due to OOM"));
+      ("GetCompositionString, FAILED, due to OOM"));
     return; // Error or out of memory.
   }
 
   // Actually retrieve the composition string information.
   lRtn = ::ImmGetCompositionStringW(aContext.get(), aIndex,
                                     (LPVOID)aCompositionString.BeginWriting(),
                                     lRtn + sizeof(WCHAR));
   aCompositionString.SetLength(lRtn / sizeof(WCHAR));
 
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: GetCompositionString, succeeded, aCompositionString=\"%s\"",
+    ("GetCompositionString, succeeded, aCompositionString=\"%s\"",
      NS_ConvertUTF16toUTF8(aCompositionString).get()));
 }
 
 bool
 IMMHandler::GetTargetClauseRange(uint32_t* aOffset,
                                  uint32_t* aLength)
 {
   NS_ENSURE_TRUE(aOffset, false);
@@ -2142,17 +2142,17 @@ IMMHandler::ConvertToANSIString(const ns
 {
   int len = ::WideCharToMultiByte(aCodePage, 0,
                                   (LPCWSTR)aStr.get(), aStr.Length(),
                                   nullptr, 0, nullptr, nullptr);
   NS_ENSURE_TRUE(len >= 0, false);
 
   if (!aANSIStr.SetLength(len, mozilla::fallible)) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: ConvertToANSIString, FAILED, due to OOM"));
+      ("ConvertToANSIString, FAILED, due to OOM"));
     return false;
   }
   ::WideCharToMultiByte(aCodePage, 0, (LPCWSTR)aStr.get(), aStr.Length(),
                         (LPSTR)aANSIStr.BeginWriting(), len, nullptr, nullptr);
   return true;
 }
 
 bool
@@ -2161,30 +2161,30 @@ IMMHandler::GetCharacterRectOfSelectedTe
                                              LayoutDeviceIntRect& aCharRect,
                                              WritingMode* aWritingMode)
 {
   LayoutDeviceIntPoint point(0, 0);
 
   Selection& selection = GetSelection();
   if (!selection.EnsureValidSelection(aWindow)) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: GetCharacterRectOfSelectedTextAt, FAILED, due to "
+      ("GetCharacterRectOfSelectedTextAt, FAILED, due to "
        "Selection::EnsureValidSelection() failure"));
     return false;
   }
 
   // If the offset is larger than the end of composition string or selected
   // string, we should return false since such case must be a bug of the caller
   // or the active IME.  If it's an IME's bug, we need to set targetLength to
   // aOffset.
   uint32_t targetLength =
     mIsComposing ? mCompositionString.Length() : selection.Length();
   if (NS_WARN_IF(aOffset > targetLength)) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: GetCharacterRectOfSelectedTextAt, FAILED, due to "
+      ("GetCharacterRectOfSelectedTextAt, FAILED, due to "
        "aOffset is too large (aOffset=%u, targetLength=%u, mIsComposing=%s)",
        aOffset, targetLength, GetBoolName(mIsComposing)));
     return false;
   }
 
   // If there is caret, we might be able to use caret rect.
   uint32_t caretOffset = UINT32_MAX;
   // There is a caret only when the normal selection is collapsed.
@@ -2217,17 +2217,17 @@ IMMHandler::GetCharacterRectOfSelectedTe
     aWindow->InitEvent(charRect, &point);
     DispatchEvent(aWindow, charRect);
     if (charRect.mSucceeded) {
       aCharRect = charRect.mReply.mRect;
       if (aWritingMode) {
         *aWritingMode = charRect.GetWritingMode();
       }
       MOZ_LOG(gIMMLog, LogLevel::Debug,
-        ("IMM: GetCharacterRectOfSelectedTextAt, Succeeded, aOffset=%u, "
+        ("GetCharacterRectOfSelectedTextAt, Succeeded, aOffset=%u, "
          "aCharRect={ x: %ld, y: %ld, width: %ld, height: %ld }, "
          "charRect.GetWritingMode()=%s",
          aOffset, aCharRect.x, aCharRect.y, aCharRect.width, aCharRect.height,
          GetWritingModeName(charRect.GetWritingMode()).get()));
       return true;
     }
   }
 
@@ -2244,25 +2244,25 @@ IMMHandler::GetCaretRect(nsWindow* aWind
   WidgetQueryContentEvent caretRect(true, eQueryCaretRect, aWindow);
   WidgetQueryContentEvent::Options options;
   options.mRelativeToInsertionPoint = true;
   caretRect.InitForQueryCaretRect(0, options);
   aWindow->InitEvent(caretRect, &point);
   DispatchEvent(aWindow, caretRect);
   if (!caretRect.mSucceeded) {
     MOZ_LOG(gIMMLog, LogLevel::Info,
-      ("IMM: GetCaretRect, FAILED, due to eQueryCaretRect failure"));
+      ("GetCaretRect, FAILED, due to eQueryCaretRect failure"));
     return false;
   }
   aCaretRect = caretRect.mReply.mRect;
   if (aWritingMode) {
     *aWritingMode = caretRect.GetWritingMode();
   }
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: GetCaretRect, SUCCEEDED, "
+    ("GetCaretRect, SUCCEEDED, "
      "aCaretRect={ x: %ld, y: %ld, width: %ld, height: %ld }, "
      "caretRect.GetWritingMode()=%s",
      aCaretRect.x, aCaretRect.y, aCaretRect.width, aCaretRect.height,
      GetWritingModeName(caretRect.GetWritingMode()).get()));
   return true;
 }
 
 bool
@@ -2288,35 +2288,35 @@ IMMHandler::SetIMERelatedWindowsPos(nsWi
   } else {
     NS_WARNING("failed to get caret rect");
     caretRect.width = 1;
   }
   if (!mNativeCaretIsCreated) {
     mNativeCaretIsCreated = ::CreateCaret(aWindow->GetWindowHandle(), nullptr,
                                           caretRect.width, caretRect.height);
     MOZ_LOG(gIMMLog, LogLevel::Info,
-      ("IMM: SetIMERelatedWindowsPos, mNativeCaretIsCreated=%s, "
+      ("SetIMERelatedWindowsPos, mNativeCaretIsCreated=%s, "
        "width=%ld, height=%ld",
        GetBoolName(mNativeCaretIsCreated), caretRect.width, caretRect.height));
   }
   ::SetCaretPos(caretRect.x, caretRect.y);
 
   if (ShouldDrawCompositionStringOurselves()) {
     MOZ_LOG(gIMMLog, LogLevel::Info,
-      ("IMM: SetIMERelatedWindowsPos, Set candidate window"));
+      ("SetIMERelatedWindowsPos, Set candidate window"));
 
     // Get a rect of first character in current target in composition string.
     LayoutDeviceIntRect firstTargetCharRect, lastTargetCharRect;
     if (mIsComposing && !mCompositionString.IsEmpty()) {
       // If there are no targetted selection, we should use it's first character
       // rect instead.
       uint32_t offset, length;
       if (!GetTargetClauseRange(&offset, &length)) {
         MOZ_LOG(gIMMLog, LogLevel::Error,
-          ("IMM: SetIMERelatedWindowsPos, FAILED, due to "
+          ("SetIMERelatedWindowsPos, FAILED, due to "
            "GetTargetClauseRange() failure"));
         return false;
       }
       ret = GetCharacterRectOfSelectedTextAt(aWindow,
                                              offset - mCompositionStart,
                                              firstTargetCharRect, &writingMode);
       NS_ENSURE_TRUE(ret, false);
       if (length) {
@@ -2379,28 +2379,28 @@ IMMHandler::SetIMERelatedWindowsPos(nsWi
       // window position to the bottom-left of the target clause because
       // the position must be the safest position to prevent the candidate
       // window to overlap with the target clause.
       candForm.dwStyle = CFS_CANDIDATEPOS;
       candForm.ptCurrentPos.x = targetClauseRect.x;
       candForm.ptCurrentPos.y = targetClauseRect.YMost();
     }
     MOZ_LOG(gIMMLog, LogLevel::Info,
-      ("IMM: SetIMERelatedWindowsPos, Calling ImmSetCandidateWindow()... "
+      ("SetIMERelatedWindowsPos, Calling ImmSetCandidateWindow()... "
        "ptCurrentPos={ x=%d, y=%d }, "
        "rcArea={ left=%d, top=%d, right=%d, bottom=%d }, "
        "writingMode=%s",
        candForm.ptCurrentPos.x, candForm.ptCurrentPos.y,
        candForm.rcArea.left, candForm.rcArea.top,
        candForm.rcArea.right, candForm.rcArea.bottom,
        GetWritingModeName(writingMode).get()));
     ::ImmSetCandidateWindow(aContext.get(), &candForm);
   } else {
     MOZ_LOG(gIMMLog, LogLevel::Info,
-      ("IMM: SetIMERelatedWindowsPos, Set composition window"));
+      ("SetIMERelatedWindowsPos, Set composition window"));
 
     // Move the composition window to caret position (if selected some
     // characters, we should use first character rect of them).
     // And in this mode, IME adjusts the candidate window position
     // automatically. So, we don't need to set it.
     COMPOSITIONFORM compForm;
     compForm.dwStyle = CFS_POINT;
     compForm.ptCurrentPos.x =
@@ -2417,17 +2417,17 @@ void
 IMMHandler::SetIMERelatedWindowsPosOnPlugin(nsWindow* aWindow,
                                             const IMEContext& aContext)
 {
   WidgetQueryContentEvent editorRectEvent(true, eQueryEditorRect, aWindow);
   aWindow->InitEvent(editorRectEvent);
   DispatchEvent(aWindow, editorRectEvent);
   if (!editorRectEvent.mSucceeded) {
     MOZ_LOG(gIMMLog, LogLevel::Info,
-      ("IMM: SetIMERelatedWindowsPosOnPlugin, "
+      ("SetIMERelatedWindowsPosOnPlugin, "
        "FAILED, due to eQueryEditorRect failure"));
     return;
   }
 
   // Clip the plugin rect by the client rect of the window because composition
   // window needs to be specified the position in the client area.
   nsWindow* toplevelWindow = aWindow->GetTopLevelWindow(false);
   LayoutDeviceIntRect pluginRectInScreen =
@@ -2464,17 +2464,17 @@ IMMHandler::SetIMERelatedWindowsPosOnPlu
   // As far as we know, there is no IME for RTL language.  Therefore, this code
   // must not need to take care of RTL environment.
   COMPOSITIONFORM compForm;
   compForm.dwStyle = CFS_POINT;
   compForm.ptCurrentPos.x = clippedPluginRect.BottomLeft().x;
   compForm.ptCurrentPos.y = clippedPluginRect.BottomLeft().y;
   if (!::ImmSetCompositionWindow(aContext.get(), &compForm)) {
     MOZ_LOG(gIMMLog, LogLevel::Info,
-      ("IMM: SetIMERelatedWindowsPosOnPlugin, "
+      ("SetIMERelatedWindowsPosOnPlugin, "
        "FAILED, due to ::ImmSetCompositionWindow() failure"));
     return;
   }
 }
 
 void
 IMMHandler::ResolveIMECaretPos(nsIWidget* aReferenceWidget,
                                LayoutDeviceIntRect& aCursorRect,
@@ -2560,26 +2560,26 @@ IMMHandler::AdjustCompositionFont(nsWind
     // LF_FACESIZE since it needs to end with null terminating character.
     if (sCompositionFont.IsEmpty() ||
         sCompositionFont.Length() > LF_FACESIZE - 1 ||
         sCompositionFont[0] == '@') {
       LOGFONTW defaultLogFont;
       if (NS_WARN_IF(!::ImmGetCompositionFont(aContext.get(),
                                               &defaultLogFont))) {
         MOZ_LOG(gIMMLog, LogLevel::Error,
-          ("IMM: AdjustCompositionFont, ::ImmGetCompositionFont() failed"));
+          ("AdjustCompositionFont, ::ImmGetCompositionFont() failed"));
         sCompositionFont.AssignLiteral("System");
       } else {
         // The font face is typically, "System".
         sCompositionFont.Assign(defaultLogFont.lfFaceName);
       }
     }
 
     MOZ_LOG(gIMMLog, LogLevel::Info,
-      ("IMM: AdjustCompositionFont, sCompositionFont=\"%s\" is initialized",
+      ("AdjustCompositionFont, sCompositionFont=\"%s\" is initialized",
        NS_ConvertUTF16toUTF8(sCompositionFont).get()));
   }
 
   static nsString sCompositionFontForJapanist2003;
   if (IsJapanist2003Active() && sCompositionFontForJapanist2003.IsEmpty()) {
     const char* kCompositionFontForJapanist2003 =
       "intl.imm.composition_font.japanist_2003";
     sCompositionFontForJapanist2003 =
@@ -2595,17 +2595,17 @@ IMMHandler::AdjustCompositionFont(nsWind
 
   sWritingModeOfCompositionFont = aWritingMode;
   sCurrentIMEName = sIMEName;
 
   LOGFONTW logFont;
   memset(&logFont, 0, sizeof(logFont));
   if (!::ImmGetCompositionFont(aContext.get(), &logFont)) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: AdjustCompositionFont, ::ImmGetCompositionFont() failed"));
+      ("AdjustCompositionFont, ::ImmGetCompositionFont() failed"));
     logFont.lfFaceName[0] = 0;
   }
   // Need to reset some information which should be recomputed with new font.
   logFont.lfWidth = 0;
   logFont.lfWeight = FW_DONTCARE;
   logFont.lfOutPrecision = OUT_DEFAULT_PRECIS;
   logFont.lfClipPrecision = CLIP_DEFAULT_PRECIS;
   logFont.lfPitchAndFamily = DEFAULT_PITCH;
@@ -2616,17 +2616,17 @@ IMMHandler::AdjustCompositionFont(nsWind
       IsJapanist2003Active() ? sCompositionFontForJapanist2003 :
                                sCompositionFont, logFont);
   } else {
     SetHorizontalFontToLogFont(
       IsJapanist2003Active() ? sCompositionFontForJapanist2003 :
                                sCompositionFont, logFont);
   }
   MOZ_LOG(gIMMLog, LogLevel::Warning,
-    ("IMM: AdjustCompositionFont, calling ::ImmSetCompositionFont(\"%s\")",
+    ("AdjustCompositionFont, calling ::ImmSetCompositionFont(\"%s\")",
      NS_ConvertUTF16toUTF8(nsDependentString(logFont.lfFaceName)).get()));
   ::ImmSetCompositionFontW(aContext.get(), &logFont);
 }
 
 // static
 nsresult
 IMMHandler::OnMouseButtonEvent(nsWindow* aWindow,
                                const IMENotification& aIMENotification)
@@ -2695,17 +2695,17 @@ IMMHandler::OnMouseButtonEvent(nsWindow*
 
   int offset =
     aIMENotification.mMouseButtonEventData.mOffset - compositionStart;
   if (positioning < 2) {
     offset++;
   }
 
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: OnMouseButtonEvent, x,y=%ld,%ld, offset=%ld, positioning=%ld",
+    ("OnMouseButtonEvent, x,y=%ld,%ld, offset=%ld, positioning=%ld",
      cursorPos.x, cursorPos.y, offset, positioning));
 
   // send MS_MSIME_MOUSE message to default IME window.
   HWND imeWnd = ::ImmGetDefaultIMEWnd(aWindow->GetWindowHandle());
   IMEContext context(aWindow);
   if (::SendMessageW(imeWnd, sWM_MSIME_MOUSE,
                      MAKELONG(MAKEWORD(button, positioning), offset),
                      (LPARAM) context.get()) == 1) {
@@ -2717,17 +2717,17 @@ IMMHandler::OnMouseButtonEvent(nsWindow*
 // static
 bool
 IMMHandler::OnKeyDownEvent(nsWindow* aWindow,
                            WPARAM wParam,
                            LPARAM lParam,
                            MSGResult& aResult)
 {
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: OnKeyDownEvent, hWnd=%08x, wParam=%08x, lParam=%08x",
+    ("OnKeyDownEvent, hWnd=%08x, wParam=%08x, lParam=%08x",
      aWindow->GetWindowHandle(), wParam, lParam));
   aResult.mConsumed = false;
   switch (wParam) {
     case VK_TAB:
     case VK_PRIOR:
     case VK_NEXT:
     case VK_END:
     case VK_HOME:
@@ -2831,23 +2831,23 @@ bool
 IMMHandler::Selection::Update(const IMENotification& aIMENotification)
 {
   mOffset = aIMENotification.mSelectionChangeData.mOffset;
   mString = aIMENotification.mSelectionChangeData.String();
   mWritingMode = aIMENotification.mSelectionChangeData.GetWritingMode();
   mIsValid = true;
 
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: Selection::Update, aIMENotification={ mSelectionChangeData={ "
+    ("Selection::Update, aIMENotification={ mSelectionChangeData={ "
      "mOffset=%u, mLength=%u, GetWritingMode()=%s } }",
      mOffset, mString.Length(), GetWritingModeName(mWritingMode).get()));
 
   if (!IsValid()) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: Selection::Update, FAILED, due to invalid range"));
+      ("Selection::Update, FAILED, due to invalid range"));
     Clear();
     return false;
   }
   return true;
 }
 
 bool
 IMMHandler::Selection::Init(nsWindow* aWindow)
@@ -2855,40 +2855,40 @@ IMMHandler::Selection::Init(nsWindow* aW
   Clear();
 
   WidgetQueryContentEvent selection(true, eQuerySelectedText, aWindow);
   LayoutDeviceIntPoint point(0, 0);
   aWindow->InitEvent(selection, &point);
   DispatchEvent(aWindow, selection);
   if (NS_WARN_IF(!selection.mSucceeded)) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: Selection::Init, FAILED, due to eQuerySelectedText failure"));
+      ("Selection::Init, FAILED, due to eQuerySelectedText failure"));
     return false;
   }
   // If the window is destroyed during querying selected text, we shouldn't
   // do anymore.
   if (aWindow->Destroyed()) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: Selection::Init, FAILED, due to the widget destroyed"));
+      ("Selection::Init, FAILED, due to the widget destroyed"));
     return false;
   }
 
   mOffset = selection.mReply.mOffset;
   mString = selection.mReply.mString;
   mWritingMode = selection.GetWritingMode();
   mIsValid = true;
 
   MOZ_LOG(gIMMLog, LogLevel::Info,
-    ("IMM: Selection::Init, selection={ mReply={ mOffset=%u, "
+    ("Selection::Init, selection={ mReply={ mOffset=%u, "
      "mString.Length()=%u, mWritingMode=%s } }",
      mOffset, mString.Length(), GetWritingModeName(mWritingMode).get()));
 
   if (!IsValid()) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: Selection::Init, FAILED, due to invalid range"));
+      ("Selection::Init, FAILED, due to invalid range"));
     Clear();
     return false;
   }
   return true;
 }
 
 bool
 IMMHandler::Selection::EnsureValidSelection(nsWindow* aWindow)