Bug 1284422 part.7 Replace "KeymapWrapper(%p): " with "0x%p " and "%p" with "0x%p" in nsGtkKeyUtils.cpp r?m_kato draft
authorMasayuki Nakano <masayuki@d-toybox.com>
Wed, 06 Jul 2016 18:52:23 +0900
changeset 384521 f1193a3c0bc61202354d52d8ff068db91e08492e
parent 384520 e80ea213d89f1a39d01fe6ce40a2fe9eeaa08fcc
child 384522 def55ae6bcf5326bd8cd64d065055fa955ca0c73
push id22289
push usermasayuki@d-toybox.com
push dateWed, 06 Jul 2016 14:02:00 +0000
reviewersm_kato
bugs1284422
milestone50.0a1
Bug 1284422 part.7 Replace "KeymapWrapper(%p): " with "0x%p " and "%p" with "0x%p" in nsGtkKeyUtils.cpp r?m_kato MozReview-Commit-ID: 8HcQ4Aj0eqI
widget/gtk/IMContextWrapper.cpp
widget/gtk/nsGtkKeyUtils.cpp
--- a/widget/gtk/IMContextWrapper.cpp
+++ b/widget/gtk/IMContextWrapper.cpp
@@ -190,17 +190,17 @@ IMContextWrapper::IMContextWrapper(nsWin
     }
     Init();
 }
 
 void
 IMContextWrapper::Init()
 {
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p Init(), mOwnerWindow=%p",
+        ("0x%p Init(), mOwnerWindow=0x%p",
          this, mOwnerWindow));
 
     MozContainer* container = mOwnerWindow->GetMozContainer();
     NS_PRECONDITION(container, "container is null");
     GdkWindow* gdkWindow = gtk_widget_get_window(GTK_WIDGET(container));
 
     // NOTE: gtk_im_*_new() abort (kill) the whole process when it fails.
     //       So, we don't need to check the result.
@@ -251,17 +251,17 @@ IMContextWrapper::Init()
 }
 
 IMContextWrapper::~IMContextWrapper()
 {
     if (this == sLastFocusedContext) {
         sLastFocusedContext = nullptr;
     }
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p ~IMContextWrapper()", this));
+        ("0x%p ~IMContextWrapper()", this));
 }
 
 NS_IMETHODIMP
 IMContextWrapper::NotifyIME(TextEventDispatcher* aTextEventDispatcher,
                             const IMENotification& aNotification)
 {
     switch (aNotification.mMessage) {
         case REQUEST_TO_COMMIT_COMPOSITION:
@@ -341,18 +341,18 @@ IMContextWrapper::GetIMEUpdatePreference
     nsIMEUpdatePreference updatePreference(notifications);
     return updatePreference;
 }
 
 void
 IMContextWrapper::OnDestroyWindow(nsWindow* aWindow)
 {
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p OnDestroyWindow(aWindow=%p), mLastFocusedWindow=%p, "
-         "mOwnerWindow=%p, mLastFocusedModule=%p",
+        ("0x%p OnDestroyWindow(aWindow=0x%p), mLastFocusedWindow=0x%p, "
+         "mOwnerWindow=0x%p, mLastFocusedModule=0x%p",
          this, aWindow, mLastFocusedWindow, mOwnerWindow, sLastFocusedContext));
 
     NS_PRECONDITION(aWindow, "aWindow must not be null");
 
     if (mLastFocusedWindow == aWindow) {
         EndIMEComposition(aWindow);
         if (mIsIMFocused) {
             Blur();
@@ -402,17 +402,17 @@ IMContextWrapper::OnDestroyWindow(nsWind
         mComposingContext = nullptr;
     }
 
     mOwnerWindow = nullptr;
     mLastFocusedWindow = nullptr;
     mInputContext.mIMEState.mEnabled = IMEState::DISABLED;
 
     MOZ_LOG(gGtkIMLog, LogLevel::Debug,
-        ("%p   OnDestroyWindow(), succeeded, Completely destroyed",
+        ("0x%p   OnDestroyWindow(), succeeded, Completely destroyed",
          this));
 }
 
 // Work around gtk bug http://bugzilla.gnome.org/show_bug.cgi?id=483223:
 // (and the similar issue of GTK+ IIIM)
 // The GTK+ XIM and IIIM modules register handlers for the "closed" signal
 // on the display, but:
 //  * The signal handlers are not disconnected when the module is unloaded.
@@ -456,31 +456,31 @@ IMContextWrapper::PrepareToDestroyContex
 void
 IMContextWrapper::OnFocusWindow(nsWindow* aWindow)
 {
     if (MOZ_UNLIKELY(IsDestroyed())) {
         return;
     }
 
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p OnFocusWindow(aWindow=%p), mLastFocusedWindow=%p",
+        ("0x%p OnFocusWindow(aWindow=0x%p), mLastFocusedWindow=0x%p",
          this, aWindow, mLastFocusedWindow));
     mLastFocusedWindow = aWindow;
     Focus();
 }
 
 void
 IMContextWrapper::OnBlurWindow(nsWindow* aWindow)
 {
     if (MOZ_UNLIKELY(IsDestroyed())) {
         return;
     }
 
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p OnBlurWindow(aWindow=%p), mLastFocusedWindow=%p, "
+        ("0x%p OnBlurWindow(aWindow=0x%p), mLastFocusedWindow=0x%p, "
          "mIsIMFocused=%s",
          this, aWindow, mLastFocusedWindow, ToChar(mIsIMFocused)));
 
     if (!mIsIMFocused || mLastFocusedWindow != aWindow) {
         return;
     }
 
     Blur();
@@ -494,38 +494,38 @@ IMContextWrapper::OnKeyEvent(nsWindow* a
     NS_PRECONDITION(aEvent, "aEvent must be non-null");
 
     if (!mInputContext.mIMEState.MaybeEditable() ||
         MOZ_UNLIKELY(IsDestroyed())) {
         return false;
     }
 
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p OnKeyEvent(aCaller=%p, aKeyDownEventWasSent=%s), "
-         "mCompositionState=%s, current context=%p, active context=%p, "
-         "aEvent(%p): { type=%s, keyval=%s, unicode=0x%X }",
+        ("0x%p OnKeyEvent(aCaller=0x%p, aKeyDownEventWasSent=%s), "
+         "mCompositionState=%s, current context=0x%p, active context=0x%p, "
+         "aEvent(0x%p): { type=%s, keyval=%s, unicode=0x%X }",
          this, aCaller, ToChar(aKeyDownEventWasSent),
          GetCompositionStateName(), GetCurrentContext(), GetActiveContext(),
          aEvent, GetEventType(aEvent), gdk_keyval_name(aEvent->keyval),
          gdk_keyval_to_unicode(aEvent->keyval)));
 
     if (aCaller != mLastFocusedWindow) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   OnKeyEvent(), FAILED, the caller isn't focused "
-             "window, mLastFocusedWindow=%p",
+            ("0x%p   OnKeyEvent(), FAILED, the caller isn't focused "
+             "window, mLastFocusedWindow=0x%p",
              this, mLastFocusedWindow));
         return false;
     }
 
     // Even if old IM context has composition, key event should be sent to
     // current context since the user expects so.
     GtkIMContext* currentContext = GetCurrentContext();
     if (MOZ_UNLIKELY(!currentContext)) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   OnKeyEvent(), FAILED, there are no context",
+            ("0x%p   OnKeyEvent(), FAILED, there are no context",
              this));
         return false;
     }
 
     if (mSetCursorPositionOnKeyEvent) {
         SetCursorPosition(currentContext);
         mSetCursorPositionOnKeyEvent = false;
     }
@@ -564,49 +564,49 @@ IMContextWrapper::OnKeyEvent(nsWindow* a
         } else {
             // Key release event may not be consumed by IM, however, we
             // shouldn't dispatch any keyup event during composition.
             filterThisEvent = true;
         }
     }
 
     MOZ_LOG(gGtkIMLog, LogLevel::Debug,
-        ("%p   OnKeyEvent(), succeeded, filterThisEvent=%s "
+        ("0x%p   OnKeyEvent(), succeeded, filterThisEvent=%s "
          "(isFiltered=%s, mFilterKeyEvent=%s), mCompositionState=%s",
          this, ToChar(filterThisEvent), ToChar(isFiltered),
          ToChar(mFilterKeyEvent), GetCompositionStateName()));
 
     return filterThisEvent;
 }
 
 void
 IMContextWrapper::OnFocusChangeInGecko(bool aFocus)
 {
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p OnFocusChangeInGecko(aFocus=%s), "
+        ("0x%p OnFocusChangeInGecko(aFocus=%s), "
          "mCompositionState=%s, mIsIMFocused=%s",
          this, ToChar(aFocus), GetCompositionStateName(),
          ToChar(mIsIMFocused)));
 
     // We shouldn't carry over the removed string to another editor.
     mSelectedString.Truncate();
     mSelection.Clear();
 }
 
 void
 IMContextWrapper::ResetIME()
 {
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p ResetIME(), mCompositionState=%s, mIsIMFocused=%s",
+        ("0x%p ResetIME(), mCompositionState=%s, mIsIMFocused=%s",
          this, GetCompositionStateName(), ToChar(mIsIMFocused)));
 
     GtkIMContext* activeContext = GetActiveContext();
     if (MOZ_UNLIKELY(!activeContext)) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   ResetIME(), FAILED, there are no context",
+            ("0x%p   ResetIME(), FAILED, there are no context",
              this));
         return;
     }
 
     RefPtr<IMContextWrapper> kungFuDeathGrip(this);
     RefPtr<nsWindow> lastFocusedWindow(mLastFocusedWindow);
 
     mPendingResettingIMContext = false;
@@ -619,18 +619,18 @@ IMContextWrapper::ResetIME()
         lastFocusedWindow->Destroyed()) {
         return;
     }
 
     nsAutoString compositionString;
     GetCompositionString(activeContext, compositionString);
 
     MOZ_LOG(gGtkIMLog, LogLevel::Debug,
-        ("%p   ResetIME() called gtk_im_context_reset(), "
-         "activeContext=%p, mCompositionState=%s, compositionString=%s, "
+        ("0x%p   ResetIME() called gtk_im_context_reset(), "
+         "activeContext=0x%p, mCompositionState=%s, compositionString=%s, "
          "mIsIMFocused=%s",
          this, activeContext, GetCompositionStateName(),
          NS_ConvertUTF16toUTF8(compositionString).get(),
          ToChar(mIsIMFocused)));
 
     // XXX IIIMF (ATOK X3 which is one of the Language Engine of it is still
     //     used in Japan!) sends only "preedit_changed" signal with empty
     //     composition string synchronously.  Therefore, if composition string
@@ -645,24 +645,24 @@ IMContextWrapper::ResetIME()
 nsresult
 IMContextWrapper::EndIMEComposition(nsWindow* aCaller)
 {
     if (MOZ_UNLIKELY(IsDestroyed())) {
         return NS_OK;
     }
 
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p EndIMEComposition(aCaller=%p), "
+        ("0x%p EndIMEComposition(aCaller=0x%p), "
          "mCompositionState=%s",
          this, aCaller, GetCompositionStateName()));
 
     if (aCaller != mLastFocusedWindow) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   EndIMEComposition(), FAILED, the caller isn't "
-             "focused window, mLastFocusedWindow=%p",
+            ("0x%p   EndIMEComposition(), FAILED, the caller isn't "
+             "focused window, mLastFocusedWindow=0x%p",
              this, mLastFocusedWindow));
         return NS_OK;
     }
 
     if (!IsComposing()) {
         return NS_OK;
     }
 
@@ -723,42 +723,42 @@ IMContextWrapper::SetInputContext(nsWind
                                   const InputContext* aContext,
                                   const InputContextAction* aAction)
 {
     if (MOZ_UNLIKELY(IsDestroyed())) {
         return;
     }
 
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p SetInputContext(aCaller=%p, aContext={ mIMEState={ "
+        ("0x%p SetInputContext(aCaller=0x%p, aContext={ mIMEState={ "
          "mEnabled=%s }, mHTMLInputType=%s })",
          this, aCaller, GetEnabledStateName(aContext->mIMEState.mEnabled),
          NS_ConvertUTF16toUTF8(aContext->mHTMLInputType).get()));
 
     if (aCaller != mLastFocusedWindow) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   SetInputContext(), FAILED, "
-             "the caller isn't focused window, mLastFocusedWindow=%p",
+            ("0x%p   SetInputContext(), FAILED, "
+             "the caller isn't focused window, mLastFocusedWindow=0x%p",
              this, mLastFocusedWindow));
         return;
     }
 
     if (!mContext) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   SetInputContext(), FAILED, "
+            ("0x%p   SetInputContext(), FAILED, "
              "there are no context",
              this));
         return;
     }
 
 
     if (sLastFocusedContext != this) {
         mInputContext = *aContext;
         MOZ_LOG(gGtkIMLog, LogLevel::Debug,
-            ("%p   SetInputContext(), succeeded, "
+            ("0x%p   SetInputContext(), succeeded, "
              "but we're not active",
              this));
         return;
     }
 
     bool changingEnabledState =
         aContext->mIMEState.mEnabled != mInputContext.mIMEState.mEnabled ||
         aContext->mHTMLInputType != mInputContext.mHTMLInputType;
@@ -863,29 +863,29 @@ IMContextWrapper::IsEnabled() const
            (!sUseSimpleContext &&
             mInputContext.mIMEState.mEnabled == IMEState::PASSWORD);
 }
 
 void
 IMContextWrapper::Focus()
 {
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p Focus(), sLastFocusedContext=%p",
+        ("0x%p Focus(), sLastFocusedContext=0x%p",
          this, sLastFocusedContext));
 
     if (mIsIMFocused) {
         NS_ASSERTION(sLastFocusedContext == this,
                      "We're not active, but the IM was focused?");
         return;
     }
 
     GtkIMContext* currentContext = GetCurrentContext();
     if (!currentContext) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   Focus(), FAILED, there are no context",
+            ("0x%p   Focus(), FAILED, there are no context",
              this));
         return;
     }
 
     if (sLastFocusedContext && sLastFocusedContext != this) {
         sLastFocusedContext->Blur();
     }
 
@@ -901,27 +901,27 @@ IMContextWrapper::Focus()
         Blur();
     }
 }
 
 void
 IMContextWrapper::Blur()
 {
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p Blur(), mIsIMFocused=%s",
+        ("0x%p Blur(), mIsIMFocused=%s",
          this, ToChar(mIsIMFocused)));
 
     if (!mIsIMFocused) {
         return;
     }
 
     GtkIMContext* currentContext = GetCurrentContext();
     if (!currentContext) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   Blur(), FAILED, there are no context",
+            ("0x%p   Blur(), FAILED, there are no context",
              this));
         return;
     }
 
     gtk_im_context_focus_out(currentContext);
     mIsIMFocused = false;
 }
 
@@ -934,34 +934,34 @@ IMContextWrapper::OnSelectionChange(nsWi
     if (MOZ_UNLIKELY(IsDestroyed())) {
         return;
     }
 
     const IMENotification::SelectionChangeDataBase& selectionChangeData =
         aIMENotification.mSelectionChangeData;
 
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p OnSelectionChange(aCaller=0x%p, aIMENotification={ "
+        ("0x%p OnSelectionChange(aCaller=0x%p, aIMENotification={ "
          "mSelectionChangeData={ mOffset=%u, Length()=%u, mReversed=%s, "
          "mWritingMode=%s, mCausedByComposition=%s, "
          "mCausedBySelectionEvent=%s, mOccurredDuringComposition=%s "
          "} }), mCompositionState=%s, mIsDeletingSurrounding=%s",
          this, aCaller, selectionChangeData.mOffset,
          selectionChangeData.Length(),
          ToChar(selectionChangeData.mReversed),
          GetWritingModeName(selectionChangeData.GetWritingMode()).get(),
          ToChar(selectionChangeData.mCausedByComposition),
          ToChar(selectionChangeData.mCausedBySelectionEvent),
          ToChar(selectionChangeData.mOccurredDuringComposition),
          GetCompositionStateName(), ToChar(mIsDeletingSurrounding)));
 
     if (aCaller != mLastFocusedWindow) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   OnSelectionChange(), FAILED, "
-             "the caller isn't focused window, mLastFocusedWindow=%p",
+            ("0x%p   OnSelectionChange(), FAILED, "
+             "the caller isn't focused window, mLastFocusedWindow=0x%p",
              this, mLastFocusedWindow));
         return;
     }
 
     if (!IsComposing()) {
         // Now we have no composition (mostly situation on calling this method)
         // If we have it, it will set by
         // NOTIFY_IME_OF_COMPOSITION_EVENT_HANDLED.
@@ -970,25 +970,25 @@ IMContextWrapper::OnSelectionChange(nsWi
 
     // The focused editor might have placeholder text with normal text node.
     // In such case, the text node must be removed from a compositionstart
     // event handler.  So, we're dispatching eCompositionStart,
     // we should ignore selection change notification.
     if (mCompositionState == eCompositionState_CompositionStartDispatched) {
         if (NS_WARN_IF(!mSelection.IsValid())) {
             MOZ_LOG(gGtkIMLog, LogLevel::Error,
-                ("%p   OnSelectionChange(), FAILED, "
+                ("0x%p   OnSelectionChange(), FAILED, "
                  "new offset is too large, cannot keep composing",
                  this));
         } else {
             // Modify the selection start offset with new offset.
             mCompositionStart = mSelection.mOffset;
             // XXX We should modify mSelectedString? But how?
             MOZ_LOG(gGtkIMLog, LogLevel::Debug,
-                ("%p   OnSelectionChange(), ignored, mCompositionStart "
+                ("0x%p   OnSelectionChange(), ignored, mCompositionStart "
                  "is updated to %u, the selection change doesn't cause "
                  "resetting IM context",
                  this, mCompositionStart));
             // And don't reset the IM context.
             return;
         }
         // Otherwise, reset the IM context due to impossible to keep composing.
     }
@@ -1022,24 +1022,24 @@ IMContextWrapper::OnStartCompositionCall
 {
     aModule->OnStartCompositionNative(aContext);
 }
 
 void
 IMContextWrapper::OnStartCompositionNative(GtkIMContext* aContext)
 {
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p OnStartCompositionNative(aContext=%p), "
-         "current context=%p",
+        ("0x%p OnStartCompositionNative(aContext=0x%p), "
+         "current context=0x%p",
          this, aContext, GetCurrentContext()));
 
     // See bug 472635, we should do nothing if IM context doesn't match.
     if (GetCurrentContext() != aContext) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   OnStartCompositionNative(), FAILED, "
+            ("0x%p   OnStartCompositionNative(), FAILED, "
              "given context doesn't match",
              this));
         return;
     }
 
     mComposingContext = static_cast<GtkIMContext*>(g_object_ref(aContext));
 
     if (!DispatchCompositionStart(aContext)) {
@@ -1056,25 +1056,25 @@ IMContextWrapper::OnEndCompositionCallba
 {
     aModule->OnEndCompositionNative(aContext);
 }
 
 void
 IMContextWrapper::OnEndCompositionNative(GtkIMContext* aContext)
 {
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p OnEndCompositionNative(aContext=%p)",
+        ("0x%p OnEndCompositionNative(aContext=0x%p)",
          this, aContext));
 
     // See bug 472635, we should do nothing if IM context doesn't match.
     // Note that if this is called after focus move, the context may different
     // from any our owning context.
     if (!IsValidContext(aContext)) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p    OnEndCompositionNative(), FAILED, "
+            ("0x%p    OnEndCompositionNative(), FAILED, "
              "given context doesn't match with any context",
              this));
         return;
     }
 
     g_object_unref(mComposingContext);
     mComposingContext = nullptr;
 
@@ -1098,25 +1098,25 @@ IMContextWrapper::OnChangeCompositionCal
 {
     aModule->OnChangeCompositionNative(aContext);
 }
 
 void
 IMContextWrapper::OnChangeCompositionNative(GtkIMContext* aContext)
 {
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p OnChangeCompositionNative(aContext=%p)",
+        ("0x%p OnChangeCompositionNative(aContext=0x%p)",
          this, aContext));
 
     // See bug 472635, we should do nothing if IM context doesn't match.
     // Note that if this is called after focus move, the context may different
     // from any our owning context.
     if (!IsValidContext(aContext)) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   OnChangeCompositionNative(), FAILED, "
+            ("0x%p   OnChangeCompositionNative(), FAILED, "
              "given context doesn't match with any context",
              this));
         return;
     }
 
     nsAutoString compositionString;
     GetCompositionString(aContext, compositionString);
     if (!IsComposing() && compositionString.IsEmpty()) {
@@ -1135,24 +1135,24 @@ IMContextWrapper::OnRetrieveSurroundingC
 {
     return aModule->OnRetrieveSurroundingNative(aContext);
 }
 
 gboolean
 IMContextWrapper::OnRetrieveSurroundingNative(GtkIMContext* aContext)
 {
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p OnRetrieveSurroundingNative(aContext=%p), "
-         "current context=%p",
+        ("0x%p OnRetrieveSurroundingNative(aContext=0x%p), "
+         "current context=0x%p",
          this, aContext, GetCurrentContext()));
 
     // See bug 472635, we should do nothing if IM context doesn't match.
     if (GetCurrentContext() != aContext) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   OnRetrieveSurroundingNative(), FAILED, "
+            ("0x%p   OnRetrieveSurroundingNative(), FAILED, "
              "given context doesn't match",
              this));
         return FALSE;
     }
 
     nsAutoString uniStr;
     uint32_t cursorPos;
     if (NS_FAILED(GetCurrentParagraph(uniStr, cursorPos))) {
@@ -1178,38 +1178,38 @@ IMContextWrapper::OnDeleteSurroundingCal
 }
 
 gboolean
 IMContextWrapper::OnDeleteSurroundingNative(GtkIMContext* aContext,
                                             gint aOffset,
                                             gint aNChars)
 {
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p OnDeleteSurroundingNative(aContext=%p, aOffset=%d, "
-         "aNChar=%d), current context=%p",
+        ("0x%p OnDeleteSurroundingNative(aContext=0x%p, aOffset=%d, "
+         "aNChar=%d), current context=0x%p",
          this, aContext, aOffset, aNChars, GetCurrentContext()));
 
     // See bug 472635, we should do nothing if IM context doesn't match.
     if (GetCurrentContext() != aContext) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   OnDeleteSurroundingNative(), FAILED, "
+            ("0x%p   OnDeleteSurroundingNative(), FAILED, "
              "given context doesn't match",
              this));
         return FALSE;
     }
 
     AutoRestore<bool> saveDeletingSurrounding(mIsDeletingSurrounding);
     mIsDeletingSurrounding = true;
     if (NS_SUCCEEDED(DeleteText(aContext, aOffset, (uint32_t)aNChars))) {
         return TRUE;
     }
 
     // failed
     MOZ_LOG(gGtkIMLog, LogLevel::Error,
-        ("%p   OnDeleteSurroundingNative(), FAILED, "
+        ("0x%p   OnDeleteSurroundingNative(), FAILED, "
          "cannot delete text",
          this));
     return FALSE;
 }
                          
 /* static */
 void
 IMContextWrapper::OnCommitCompositionCallback(GtkIMContext* aContext,
@@ -1222,26 +1222,26 @@ IMContextWrapper::OnCommitCompositionCal
 void
 IMContextWrapper::OnCommitCompositionNative(GtkIMContext* aContext,
                                             const gchar* aUTF8Char)
 {
     const gchar emptyStr = 0;
     const gchar *commitString = aUTF8Char ? aUTF8Char : &emptyStr;
 
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p OnCommitCompositionNative(aContext=%p), "
-         "current context=%p, active context=%p, commitString=\"%s\", "
-         "mProcessingKeyEvent=%p, IsComposingOn(aContext)=%s",
+        ("0x%p OnCommitCompositionNative(aContext=0x%p), "
+         "current context=0x%p, active context=0x%p, commitString=\"%s\", "
+         "mProcessingKeyEvent=0x%p, IsComposingOn(aContext)=%s",
          this, aContext, GetCurrentContext(), GetActiveContext(), commitString,
          mProcessingKeyEvent, ToChar(IsComposingOn(aContext))));
 
     // See bug 472635, we should do nothing if IM context doesn't match.
     if (!IsValidContext(aContext)) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   OnCommitCompositionNative(), FAILED, "
+            ("0x%p   OnCommitCompositionNative(), FAILED, "
              "given context doesn't match",
              this));
         return;
     }
 
     // If we are not in composition and committing with empty string,
     // we need to do nothing because if we continued to handle this
     // signal, we would dispatch compositionstart, text, compositionend
@@ -1263,17 +1263,17 @@ IMContextWrapper::OnCommitCompositionNat
         guint32 keyval_unicode;
 
         keyval_unicode = gdk_keyval_to_unicode(mProcessingKeyEvent->keyval);
         keyval_utf8_len = g_unichar_to_utf8(keyval_unicode, keyval_utf8);
         keyval_utf8[keyval_utf8_len] = '\0';
 
         if (!strcmp(commitString, keyval_utf8)) {
             MOZ_LOG(gGtkIMLog, LogLevel::Info,
-                ("%p   OnCommitCompositionNative(), "
+                ("0x%p   OnCommitCompositionNative(), "
                  "we'll send normal key event",
                  this));
             mFilterKeyEvent = false;
             return;
         }
     }
 
     NS_ConvertUTF8toUTF16 str(commitString);
@@ -1292,50 +1292,50 @@ IMContextWrapper::GetCompositionString(G
                                       &feedback_list, &cursor_pos);
     if (preedit_string && *preedit_string) {
         CopyUTF8toUTF16(preedit_string, aCompositionString);
     } else {
         aCompositionString.Truncate();
     }
 
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p GetCompositionString(aContext=%p), "
+        ("0x%p GetCompositionString(aContext=0x%p), "
          "aCompositionString=\"%s\"",
          this, aContext, preedit_string));
 
     pango_attr_list_unref(feedback_list);
     g_free(preedit_string);
 }
 
 bool
 IMContextWrapper::DispatchCompositionStart(GtkIMContext* aContext)
 {
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p DispatchCompositionStart(aContext=%p)",
+        ("0x%p DispatchCompositionStart(aContext=0x%p)",
          this, aContext));
 
     if (IsComposing()) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DispatchCompositionStart(), FAILED, "
+            ("0x%p   DispatchCompositionStart(), FAILED, "
              "we're already in composition",
              this));
         return true;
     }
 
     if (!mLastFocusedWindow) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DispatchCompositionStart(), FAILED, "
+            ("0x%p   DispatchCompositionStart(), FAILED, "
              "there are no focused window in this module",
              this));
         return false;
     }
 
     if (NS_WARN_IF(!EnsureToCacheSelection())) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DispatchCompositionStart(), FAILED, "
+            ("0x%p   DispatchCompositionStart(), FAILED, "
              "cannot query the selection offset",
              this));
         return false;
     }
 
     // XXX The composition start point might be changed by composition events
     //     even though we strongly hope it doesn't happen.
     //     Every composition event should have the start offset for the result
@@ -1347,92 +1347,92 @@ IMContextWrapper::DispatchCompositionSta
         mProcessingKeyEvent->type == GDK_KEY_PRESS) {
         // If this composition is started by a native keydown event, we need to
         // dispatch our keydown event here (before composition start).
         nsCOMPtr<nsIWidget> kungFuDeathGrip = mLastFocusedWindow;
         bool isCancelled;
         mLastFocusedWindow->DispatchKeyDownEvent(mProcessingKeyEvent,
                                                  &isCancelled);
         MOZ_LOG(gGtkIMLog, LogLevel::Debug,
-            ("%p   DispatchCompositionStart(), FAILED, keydown event "
+            ("0x%p   DispatchCompositionStart(), FAILED, keydown event "
              "is dispatched",
              this));
         if (static_cast<nsWindow*>(kungFuDeathGrip.get())->IsDestroyed() ||
             kungFuDeathGrip != mLastFocusedWindow) {
             MOZ_LOG(gGtkIMLog, LogLevel::Error,
-                ("%p   DispatchCompositionStart(), FAILED, the focused "
+                ("0x%p   DispatchCompositionStart(), FAILED, the focused "
                  "widget was destroyed/changed by keydown event",
                  this));
             return false;
         }
     }
 
     RefPtr<TextEventDispatcher> dispatcher = GetTextEventDispatcher();
     nsresult rv = dispatcher->BeginNativeInputTransaction();
     if (NS_WARN_IF(NS_FAILED(rv))) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DispatchCompositionStart(), FAILED, "
+            ("0x%p   DispatchCompositionStart(), FAILED, "
              "due to BeginNativeInputTransaction() failure",
              this));
         return false;
     }
 
     MOZ_LOG(gGtkIMLog, LogLevel::Debug,
-        ("%p   DispatchCompositionStart(), dispatching "
+        ("0x%p   DispatchCompositionStart(), dispatching "
          "compositionstart... (mCompositionStart=%u)",
          this, mCompositionStart));
     mCompositionState = eCompositionState_CompositionStartDispatched;
     nsEventStatus status;
     RefPtr<nsWindow> lastFocusedWindow = mLastFocusedWindow;
     dispatcher->StartComposition(status);
     if (lastFocusedWindow->IsDestroyed() ||
         lastFocusedWindow != mLastFocusedWindow) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DispatchCompositionStart(), FAILED, the focused "
+            ("0x%p   DispatchCompositionStart(), FAILED, the focused "
              "widget was destroyed/changed by compositionstart event",
              this));
         return false;
     }
 
     return true;
 }
 
 bool
 IMContextWrapper::DispatchCompositionChangeEvent(
                       GtkIMContext* aContext,
                       const nsAString& aCompositionString)
 {
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p DispatchCompositionChangeEvent(aContext=%p)",
+        ("0x%p DispatchCompositionChangeEvent(aContext=0x%p)",
          this, aContext));
 
     if (!mLastFocusedWindow) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DispatchCompositionChangeEvent(), FAILED, "
+            ("0x%p   DispatchCompositionChangeEvent(), FAILED, "
              "there are no focused window in this module",
              this));
         return false;
     }
 
     if (!IsComposing()) {
         MOZ_LOG(gGtkIMLog, LogLevel::Debug,
-            ("%p   DispatchCompositionChangeEvent(), the composition "
+            ("0x%p   DispatchCompositionChangeEvent(), the composition "
              "wasn't started, force starting...",
              this));
         nsCOMPtr<nsIWidget> kungFuDeathGrip = mLastFocusedWindow;
         if (!DispatchCompositionStart(aContext)) {
             return false;
         }
     }
 
     RefPtr<TextEventDispatcher> dispatcher = GetTextEventDispatcher();
     nsresult rv = dispatcher->BeginNativeInputTransaction();
     if (NS_WARN_IF(NS_FAILED(rv))) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DispatchCompositionChangeEvent(), FAILED, "
+            ("0x%p   DispatchCompositionChangeEvent(), FAILED, "
              "due to BeginNativeInputTransaction() failure",
              this));
         return false;
     }
 
     // Store the selected string which will be removed by following
     // compositionchange event.
     if (mCompositionState == eCompositionState_CompositionStartDispatched) {
@@ -1446,17 +1446,17 @@ IMContextWrapper::DispatchCompositionCha
     }
 
     RefPtr<TextRangeArray> rangeArray =
       CreateTextRangeArray(aContext, aCompositionString);
 
     rv = dispatcher->SetPendingComposition(aCompositionString, rangeArray);
     if (NS_WARN_IF(NS_FAILED(rv))) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DispatchCompositionChangeEvent(), FAILED, "
+            ("0x%p   DispatchCompositionChangeEvent(), FAILED, "
              "due to SetPendingComposition() failure",
              this));
         return false;
     }
 
     mCompositionState = eCompositionState_CompositionChangeEventDispatched;
 
     // We cannot call SetCursorPosition for e10s-aware.
@@ -1467,132 +1467,132 @@ IMContextWrapper::DispatchCompositionCha
     mCompositionTargetRange.mOffset = rangeArray->TargetClauseOffset();
     mCompositionTargetRange.mLength = rangeArray->TargetClauseLength();
 
     RefPtr<nsWindow> lastFocusedWindow(mLastFocusedWindow);
     nsEventStatus status;
     rv = dispatcher->FlushPendingComposition(status);
     if (NS_WARN_IF(NS_FAILED(rv))) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DispatchCompositionChangeEvent(), FAILED, "
+            ("0x%p   DispatchCompositionChangeEvent(), FAILED, "
              "due to FlushPendingComposition() failure",
              this));
         return false;
     }
 
     if (lastFocusedWindow->IsDestroyed() ||
         lastFocusedWindow != mLastFocusedWindow) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DispatchCompositionChangeEvent(), FAILED, the "
+            ("0x%p   DispatchCompositionChangeEvent(), FAILED, the "
              "focused widget was destroyed/changed by "
              "compositionchange event",
              this));
         return false;
     }
     return true;
 }
 
 bool
 IMContextWrapper::DispatchCompositionCommitEvent(
                       GtkIMContext* aContext,
                       const nsAString* aCommitString)
 {
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p DispatchCompositionCommitEvent(aContext=%p, "
-         "aCommitString=%p, (\"%s\"))",
+        ("0x%p DispatchCompositionCommitEvent(aContext=0x%p, "
+         "aCommitString=0x%p, (\"%s\"))",
          this, aContext, aCommitString,
          aCommitString ? NS_ConvertUTF16toUTF8(*aCommitString).get() : ""));
 
     if (!mLastFocusedWindow) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DispatchCompositionCommitEvent(), FAILED, "
+            ("0x%p   DispatchCompositionCommitEvent(), FAILED, "
              "there are no focused window in this module",
              this));
         return false;
     }
 
     if (!IsComposing()) {
         if (!aCommitString || aCommitString->IsEmpty()) {
             MOZ_LOG(gGtkIMLog, LogLevel::Error,
-                ("%p   DispatchCompositionCommitEvent(), FAILED, "
+                ("0x%p   DispatchCompositionCommitEvent(), FAILED, "
                  "there is no composition and empty commit string",
                  this));
             return true;
         }
         MOZ_LOG(gGtkIMLog, LogLevel::Debug,
-            ("%p   DispatchCompositionCommitEvent(), "
+            ("0x%p   DispatchCompositionCommitEvent(), "
              "the composition wasn't started, force starting...",
              this));
         nsCOMPtr<nsIWidget> kungFuDeathGrip(mLastFocusedWindow);
         if (!DispatchCompositionStart(aContext)) {
             return false;
         }
     }
 
     RefPtr<TextEventDispatcher> dispatcher = GetTextEventDispatcher();
     nsresult rv = dispatcher->BeginNativeInputTransaction();
     if (NS_WARN_IF(NS_FAILED(rv))) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DispatchCompositionCommitEvent(), FAILED, "
+            ("0x%p   DispatchCompositionCommitEvent(), FAILED, "
              "due to BeginNativeInputTransaction() failure",
              this));
         return false;
     }
 
     RefPtr<nsWindow> lastFocusedWindow(mLastFocusedWindow);
 
     mCompositionState = eCompositionState_NotComposing;
     mCompositionStart = UINT32_MAX;
     mCompositionTargetRange.Clear();
     mDispatchedCompositionString.Truncate();
 
     nsEventStatus status;
     rv = dispatcher->CommitComposition(status, aCommitString);
     if (NS_WARN_IF(NS_FAILED(rv))) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DispatchCompositionChangeEvent(), FAILED, "
+            ("0x%p   DispatchCompositionChangeEvent(), FAILED, "
              "due to CommitComposition() failure",
              this));
         return false;
     }
 
     if (lastFocusedWindow->IsDestroyed() ||
         lastFocusedWindow != mLastFocusedWindow) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DispatchCompositionCommitEvent(), FAILED, "
+            ("0x%p   DispatchCompositionCommitEvent(), FAILED, "
              "the focused widget was destroyed/changed by "
              "compositioncommit event",
              this));
         return false;
     }
 
     return true;
 }
 
 already_AddRefed<TextRangeArray>
 IMContextWrapper::CreateTextRangeArray(GtkIMContext* aContext,
                                        const nsAString& aCompositionString)
 {
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p CreateTextRangeArray(aContext=%p, "
+        ("0x%p CreateTextRangeArray(aContext=0x%p, "
          "aCompositionString=\"%s\" (Length()=%u))",
          this, aContext, NS_ConvertUTF16toUTF8(aCompositionString).get(),
          aCompositionString.Length()));
 
     RefPtr<TextRangeArray> textRangeArray = new TextRangeArray();
 
     gchar *preedit_string;
     gint cursor_pos_in_chars;
     PangoAttrList *feedback_list;
     gtk_im_context_get_preedit_string(aContext, &preedit_string,
                                       &feedback_list, &cursor_pos_in_chars);
     if (!preedit_string || !*preedit_string) {
         if (!aCompositionString.IsEmpty()) {
             MOZ_LOG(gGtkIMLog, LogLevel::Error,
-                ("%p   CreateTextRangeArray(), FAILED, due to "
+                ("0x%p   CreateTextRangeArray(), FAILED, due to "
                  "preedit_string is null",
                  this));
         }
         pango_attr_list_unref(feedback_list);
         g_free(preedit_string);
         return textRangeArray.forget();
     }
 
@@ -1605,54 +1605,54 @@ IMContextWrapper::CreateTextRangeArray(G
         // caret is at the end of the composition string.
     } else if (cursor_pos_in_chars == 0) {
         caretOffsetInUTF16 = 0;
     } else {
         gchar* charAfterCaret =
             g_utf8_offset_to_pointer(preedit_string, cursor_pos_in_chars);
         if (NS_WARN_IF(!charAfterCaret)) {
             MOZ_LOG(gGtkIMLog, LogLevel::Warning,
-                ("%p   CreateTextRangeArray(), failed to get UTF-8 "
+                ("0x%p   CreateTextRangeArray(), failed to get UTF-8 "
                  "string before the caret (cursor_pos_in_chars=%d)",
                  this, cursor_pos_in_chars));
         } else {
             glong caretOffset = 0;
             gunichar2* utf16StrBeforeCaret =
                 g_utf8_to_utf16(preedit_string, charAfterCaret - preedit_string,
                                 nullptr, &caretOffset, nullptr);
             if (NS_WARN_IF(!utf16StrBeforeCaret) ||
                 NS_WARN_IF(caretOffset < 0)) {
                 MOZ_LOG(gGtkIMLog, LogLevel::Warning,
-                    ("%p   CreateTextRangeArray(), WARNING, failed to "
+                    ("0x%p   CreateTextRangeArray(), WARNING, failed to "
                      "convert to UTF-16 string before the caret "
                      "(cursor_pos_in_chars=%d, caretOffset=%d)",
                      this, cursor_pos_in_chars, caretOffset));
             } else {
                 caretOffsetInUTF16 = static_cast<uint32_t>(caretOffset);
                 uint32_t compositionStringLength = aCompositionString.Length();
                 if (NS_WARN_IF(caretOffsetInUTF16 > compositionStringLength)) {
                     MOZ_LOG(gGtkIMLog, LogLevel::Warning,
-                        ("%p   CreateTextRangeArray(), WARNING, "
+                        ("0x%p   CreateTextRangeArray(), WARNING, "
                          "caretOffsetInUTF16=%u is larger than "
                          "compositionStringLength=%u",
                          this, caretOffsetInUTF16, compositionStringLength));
                     caretOffsetInUTF16 = compositionStringLength;
                 }
             }
             if (utf16StrBeforeCaret) {
                 g_free(utf16StrBeforeCaret);
             }
         }
     }
 
     PangoAttrIterator* iter;
     iter = pango_attr_list_get_iterator(feedback_list);
     if (!iter) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   CreateTextRangeArray(), FAILED, iterator couldn't "
+            ("0x%p   CreateTextRangeArray(), FAILED, iterator couldn't "
              "be allocated",
              this));
         pango_attr_list_unref(feedback_list);
         g_free(preedit_string);
         return textRangeArray.forget();
     }
 
     uint32_t minOffsetOfClauses = aCompositionString.Length();
@@ -1672,29 +1672,29 @@ IMContextWrapper::CreateTextRangeArray(G
     // more clauses.
     if (minOffsetOfClauses) {
         TextRange dummyClause;
         dummyClause.mStartOffset = 0;
         dummyClause.mEndOffset = minOffsetOfClauses;
         dummyClause.mRangeType = TextRangeType::eRawClause;
         textRangeArray->InsertElementAt(0, dummyClause);
         MOZ_LOG(gGtkIMLog, LogLevel::Warning,
-             ("%p   CreateTextRangeArray(), inserting a dummy clause "
+             ("0x%p   CreateTextRangeArray(), inserting a dummy clause "
               "at the beginning of the composition string mStartOffset=%u, "
               "mEndOffset=%u, mRangeType=%s",
               this, dummyClause.mStartOffset, dummyClause.mEndOffset,
               ToChar(dummyClause.mRangeType)));
     }
 
     TextRange range;
     range.mStartOffset = range.mEndOffset = caretOffsetInUTF16;
     range.mRangeType = TextRangeType::eCaret;
     textRangeArray->AppendElement(range);
     MOZ_LOG(gGtkIMLog, LogLevel::Debug,
-        ("%p   CreateTextRangeArray(), mStartOffset=%u, "
+        ("0x%p   CreateTextRangeArray(), mStartOffset=%u, "
          "mEndOffset=%u, mRangeType=%s",
          this, range.mStartOffset, range.mEndOffset,
          ToChar(range.mRangeType)));
 
     pango_attr_iterator_destroy(iter);
     pango_attr_list_unref(feedback_list);
     g_free(preedit_string);
 
@@ -1718,32 +1718,32 @@ IMContextWrapper::SetTextRange(PangoAttr
                                uint32_t aUTF16CaretOffset,
                                TextRange& aTextRange) const
 {
     // Set the range offsets in UTF-16 string.
     gint utf8ClauseStart, utf8ClauseEnd;
     pango_attr_iterator_range(aPangoAttrIter, &utf8ClauseStart, &utf8ClauseEnd);
     if (utf8ClauseStart == utf8ClauseEnd) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   SetTextRange(), FAILED, due to collapsed range",
+            ("0x%p   SetTextRange(), FAILED, due to collapsed range",
              this));
         return false;
     }
 
     if (!utf8ClauseStart) {
         aTextRange.mStartOffset = 0;
     } else {
         glong utf16PreviousClausesLength;
         gunichar2* utf16PreviousClausesString =
             g_utf8_to_utf16(aUTF8CompositionString, utf8ClauseStart, nullptr,
                             &utf16PreviousClausesLength, nullptr);
 
         if (NS_WARN_IF(!utf16PreviousClausesString)) {
             MOZ_LOG(gGtkIMLog, LogLevel::Error,
-                ("%p   SetTextRange(), FAILED, due to g_utf8_to_utf16() "
+                ("0x%p   SetTextRange(), FAILED, due to g_utf8_to_utf16() "
                  "failure (retrieving previous string of current clause)",
                  this));
             return false;
         }
 
         aTextRange.mStartOffset = utf16PreviousClausesLength;
         g_free(utf16PreviousClausesString);
     }
@@ -1751,28 +1751,28 @@ IMContextWrapper::SetTextRange(PangoAttr
     glong utf16CurrentClauseLength;
     gunichar2* utf16CurrentClauseString =
         g_utf8_to_utf16(aUTF8CompositionString + utf8ClauseStart,
                         utf8ClauseEnd - utf8ClauseStart,
                         nullptr, &utf16CurrentClauseLength, nullptr);
 
     if (NS_WARN_IF(!utf16CurrentClauseString)) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   SetTextRange(), FAILED, due to g_utf8_to_utf16() "
+            ("0x%p   SetTextRange(), FAILED, due to g_utf8_to_utf16() "
              "failure (retrieving current clause)",
              this));
         return false;
     }
 
     // iBus Chewing IME tells us that there is an empty clause at the end of
     // the composition string but we should ignore it since our code doesn't
     // assume that there is an empty clause.
     if (!utf16CurrentClauseLength) {
         MOZ_LOG(gGtkIMLog, LogLevel::Warning,
-            ("%p   SetTextRange(), FAILED, due to current clause length "
+            ("0x%p   SetTextRange(), FAILED, due to current clause length "
              "is 0",
              this));
         return false;
     }
 
     aTextRange.mEndOffset = aTextRange.mStartOffset + utf16CurrentClauseLength;
     g_free(utf16CurrentClauseString);
     utf16CurrentClauseString = nullptr;
@@ -1796,17 +1796,17 @@ IMContextWrapper::SetTextRange(PangoAttr
                 style.mLineStyle = TextRangeStyle::LINESTYLE_WAVY;
                 break;
             case PANGO_UNDERLINE_SINGLE:
             case PANGO_UNDERLINE_LOW:
                 style.mLineStyle = TextRangeStyle::LINESTYLE_SOLID;
                 break;
             default:
                 MOZ_LOG(gGtkIMLog, LogLevel::Warning,
-                    ("%p   SetTextRange(), retrieved unknown underline "
+                    ("0x%p   SetTextRange(), retrieved unknown underline "
                      "style: %d",
                      this, attrUnderline->value));
                 style.mLineStyle = TextRangeStyle::LINESTYLE_SOLID;
                 break;
         }
         style.mDefinedStyles |= TextRangeStyle::DEFINED_LINESTYLE;
 
         // Underline color
@@ -1861,17 +1861,17 @@ IMContextWrapper::SetTextRange(PangoAttr
      * clauses.  Additionally, our old rules caused that IME developers/users
      * cannot specify composition string style as they want.
      *
      * So, we shouldn't guess the meaning from its visual style.
      */
 
     if (!attrUnderline && !attrForeground && !attrBackground) {
         MOZ_LOG(gGtkIMLog, LogLevel::Warning,
-            ("%p   SetTextRange(), FAILED, due to no attr, "
+            ("0x%p   SetTextRange(), FAILED, due to no attr, "
              "aTextRange= { mStartOffset=%u, mEndOffset=%u }",
              this, aTextRange.mStartOffset, aTextRange.mEndOffset));
         return false;
     }
 
     // If the range covers whole of composition string and the caret is at
     // the end of the composition string, the range is probably not converted.
     if (!utf8ClauseStart &&
@@ -1888,60 +1888,60 @@ IMContextWrapper::SetTextRange(PangoAttr
     }
     // Otherwise, we should assume that the clause is converted but not
     // selected.
     else {
         aTextRange.mRangeType = TextRangeType::eConvertedClause;
     }
 
     MOZ_LOG(gGtkIMLog, LogLevel::Debug,
-        ("%p   SetTextRange(), succeeded, aTextRange= { "
+        ("0x%p   SetTextRange(), succeeded, aTextRange= { "
          "mStartOffset=%u, mEndOffset=%u, mRangeType=%s, mRangeStyle=%s }",
          this, aTextRange.mStartOffset, aTextRange.mEndOffset,
          ToChar(aTextRange.mRangeType),
          GetTextRangeStyleText(aTextRange.mRangeStyle).get()));
 
     return true;
 }
 
 void
 IMContextWrapper::SetCursorPosition(GtkIMContext* aContext)
 {
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p SetCursorPosition(aContext=%p), "
+        ("0x%p SetCursorPosition(aContext=0x%p), "
          "mCompositionTargetRange={ mOffset=%u, mLength=%u }"
          "mSelection={ mOffset=%u, mLength=%u, mWritingMode=%s }",
          this, aContext, mCompositionTargetRange.mOffset,
          mCompositionTargetRange.mLength,
          mSelection.mOffset, mSelection.mLength,
          GetWritingModeName(mSelection.mWritingMode).get()));
 
     bool useCaret = false;
     if (!mCompositionTargetRange.IsValid()) {
         if (!mSelection.IsValid()) {
             MOZ_LOG(gGtkIMLog, LogLevel::Error,
-                ("%p   SetCursorPosition(), FAILED, "
+                ("0x%p   SetCursorPosition(), FAILED, "
                  "mCompositionTargetRange and mSelection are invalid",
                  this));
             return;
         }
         useCaret = true;
     }
 
     if (!mLastFocusedWindow) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   SetCursorPosition(), FAILED, due to no focused "
+            ("0x%p   SetCursorPosition(), FAILED, due to no focused "
              "window",
              this));
         return;
     }
 
     if (MOZ_UNLIKELY(!aContext)) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   SetCursorPosition(), FAILED, due to no context",
+            ("0x%p   SetCursorPosition(), FAILED, due to no context",
              this));
         return;
     }
 
     WidgetQueryContentEvent charRect(true,
                                      useCaret ? eQueryCaretRect :
                                                 eQueryTextRect,
                                      mLastFocusedWindow);
@@ -1959,17 +1959,17 @@ IMContextWrapper::SetCursorPosition(GtkI
             charRect.InitForQueryTextRect(mCompositionTargetRange.mOffset, 1);
         }
     }
     InitEvent(charRect);
     nsEventStatus status;
     mLastFocusedWindow->DispatchEvent(&charRect, status);
     if (!charRect.mSucceeded) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   SetCursorPosition(), FAILED, %s was failed",
+            ("0x%p   SetCursorPosition(), FAILED, %s was failed",
              this, useCaret ? "eQueryCaretRect" : "eQueryTextRect"));
         return;
     }
 
     nsWindow* rootWindow =
         static_cast<nsWindow*>(mLastFocusedWindow->GetTopLevelWidget());
 
     // Get the position of the rootWindow in screen.
@@ -1986,75 +1986,75 @@ IMContextWrapper::SetCursorPosition(GtkI
     gtk_im_context_set_cursor_location(aContext, &area);
 }
 
 nsresult
 IMContextWrapper::GetCurrentParagraph(nsAString& aText,
                                       uint32_t& aCursorPos)
 {
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p GetCurrentParagraph(), mCompositionState=%s",
+        ("0x%p GetCurrentParagraph(), mCompositionState=%s",
          this, GetCompositionStateName()));
 
     if (!mLastFocusedWindow) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   GetCurrentParagraph(), FAILED, there are no "
+            ("0x%p   GetCurrentParagraph(), FAILED, there are no "
              "focused window in this module",
              this));
         return NS_ERROR_NULL_POINTER;
     }
 
     nsEventStatus status;
 
     uint32_t selOffset = mCompositionStart;
     uint32_t selLength = mSelectedString.Length();
 
     // If focused editor doesn't have composition string, we should use
     // current selection.
     if (!EditorHasCompositionString()) {
         // Query cursor position & selection
         if (NS_WARN_IF(!EnsureToCacheSelection())) {
             MOZ_LOG(gGtkIMLog, LogLevel::Error,
-                ("%p   GetCurrentParagraph(), FAILED, due to no "
+                ("0x%p   GetCurrentParagraph(), FAILED, due to no "
                  "valid selection information",
                  this));
             return NS_ERROR_FAILURE;
         }
 
         selOffset = mSelection.mOffset;
         selLength = mSelection.mLength;
     }
 
     MOZ_LOG(gGtkIMLog, LogLevel::Debug,
-        ("%p   GetCurrentParagraph(), selOffset=%u, selLength=%u",
+        ("0x%p   GetCurrentParagraph(), selOffset=%u, selLength=%u",
          this, selOffset, selLength));
 
     // XXX nsString::Find and nsString::RFind take int32_t for offset, so,
     //     we cannot support this request when the current offset is larger
     //     than INT32_MAX.
     if (selOffset > INT32_MAX || selLength > INT32_MAX ||
         selOffset + selLength > INT32_MAX) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   GetCurrentParagraph(), FAILED, The selection is "
+            ("0x%p   GetCurrentParagraph(), FAILED, The selection is "
              "out of range",
              this));
         return NS_ERROR_FAILURE;
     }
 
     // Get all text contents of the focused editor
     WidgetQueryContentEvent queryTextContentEvent(true, eQueryTextContent,
                                                   mLastFocusedWindow);
     queryTextContentEvent.InitForQueryTextContent(0, UINT32_MAX);
     mLastFocusedWindow->DispatchEvent(&queryTextContentEvent, status);
     NS_ENSURE_TRUE(queryTextContentEvent.mSucceeded, NS_ERROR_FAILURE);
 
     nsAutoString textContent(queryTextContentEvent.mReply.mString);
     if (selOffset + selLength > textContent.Length()) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   GetCurrentParagraph(), FAILED, The selection is "
+            ("0x%p   GetCurrentParagraph(), FAILED, The selection is "
              "invalid, textContent.Length()=%u",
              this, textContent.Length()));
         return NS_ERROR_FAILURE;
     }
 
     // Remove composing string and restore the selected string because
     // GtkEntry doesn't remove selected string until committing, however,
     // our editor does it.  We should emulate the behavior for IME.
@@ -2070,112 +2070,112 @@ IMContextWrapper::GetCurrentParagraph(ns
     int32_t parEnd = textContent.Find("\n", false, selOffset + selLength, -1);
     if (parEnd < 0) {
         parEnd = textContent.Length();
     }
     aText = nsDependentSubstring(textContent, parStart, parEnd - parStart);
     aCursorPos = selOffset - uint32_t(parStart);
 
     MOZ_LOG(gGtkIMLog, LogLevel::Debug,
-        ("%p   GetCurrentParagraph(), succeeded, aText=%s, "
+        ("0x%p   GetCurrentParagraph(), succeeded, aText=%s, "
          "aText.Length()=%u, aCursorPos=%u",
          this, NS_ConvertUTF16toUTF8(aText).get(),
          aText.Length(), aCursorPos));
 
     return NS_OK;
 }
 
 nsresult
 IMContextWrapper::DeleteText(GtkIMContext* aContext,
                              int32_t aOffset,
                              uint32_t aNChars)
 {
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
-        ("%p DeleteText(aContext=%p, aOffset=%d, aNChars=%u), "
+        ("0x%p DeleteText(aContext=0x%p, aOffset=%d, aNChars=%u), "
          "mCompositionState=%s",
          this, aContext, aOffset, aNChars, GetCompositionStateName()));
 
     if (!mLastFocusedWindow) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DeleteText(), FAILED, there are no focused window "
+            ("0x%p   DeleteText(), FAILED, there are no focused window "
              "in this module",
              this));
         return NS_ERROR_NULL_POINTER;
     }
 
     if (!aNChars) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DeleteText(), FAILED, aNChars must not be zero",
+            ("0x%p   DeleteText(), FAILED, aNChars must not be zero",
              this));
         return NS_ERROR_INVALID_ARG;
     }
 
     RefPtr<nsWindow> lastFocusedWindow(mLastFocusedWindow);
     nsEventStatus status;
 
     // First, we should cancel current composition because editor cannot
     // handle changing selection and deleting text.
     uint32_t selOffset;
     bool wasComposing = IsComposing();
     bool editorHadCompositionString = EditorHasCompositionString();
     if (wasComposing) {
         selOffset = mCompositionStart;
         if (!DispatchCompositionCommitEvent(aContext, &mSelectedString)) {
             MOZ_LOG(gGtkIMLog, LogLevel::Error,
-                ("%p   DeleteText(), FAILED, quitting from DeletText",
+                ("0x%p   DeleteText(), FAILED, quitting from DeletText",
                  this));
             return NS_ERROR_FAILURE;
         }
     } else {
         if (NS_WARN_IF(!EnsureToCacheSelection())) {
             MOZ_LOG(gGtkIMLog, LogLevel::Error,
-                ("%p   DeleteText(), FAILED, due to no valid selection "
+                ("0x%p   DeleteText(), FAILED, due to no valid selection "
                  "information",
                  this));
             return NS_ERROR_FAILURE;
         }
         selOffset = mSelection.mOffset;
     }
 
     // Get all text contents of the focused editor
     WidgetQueryContentEvent queryTextContentEvent(true, eQueryTextContent,
                                                   mLastFocusedWindow);
     queryTextContentEvent.InitForQueryTextContent(0, UINT32_MAX);
     mLastFocusedWindow->DispatchEvent(&queryTextContentEvent, status);
     NS_ENSURE_TRUE(queryTextContentEvent.mSucceeded, NS_ERROR_FAILURE);
     if (queryTextContentEvent.mReply.mString.IsEmpty()) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DeleteText(), FAILED, there is no contents",
+            ("0x%p   DeleteText(), FAILED, there is no contents",
              this));
         return NS_ERROR_FAILURE;
     }
 
     NS_ConvertUTF16toUTF8 utf8Str(
         nsDependentSubstring(queryTextContentEvent.mReply.mString,
                              0, selOffset));
     glong offsetInUTF8Characters =
         g_utf8_strlen(utf8Str.get(), utf8Str.Length()) + aOffset;
     if (offsetInUTF8Characters < 0) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DeleteText(), FAILED, aOffset is too small for "
+            ("0x%p   DeleteText(), FAILED, aOffset is too small for "
              "current cursor pos (computed offset: %d)",
              this, offsetInUTF8Characters));
         return NS_ERROR_FAILURE;
     }
 
     AppendUTF16toUTF8(
         nsDependentSubstring(queryTextContentEvent.mReply.mString, selOffset),
         utf8Str);
     glong countOfCharactersInUTF8 =
         g_utf8_strlen(utf8Str.get(), utf8Str.Length());
     glong endInUTF8Characters =
         offsetInUTF8Characters + aNChars;
     if (countOfCharactersInUTF8 < endInUTF8Characters) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DeleteText(), FAILED, aNChars is too large for "
+            ("0x%p   DeleteText(), FAILED, aNChars is too large for "
              "current contents (content length: %d, computed end offset: %d)",
              this, countOfCharactersInUTF8, endInUTF8Characters));
         return NS_ERROR_FAILURE;
     }
 
     gchar* charAtOffset =
         g_utf8_offset_to_pointer(utf8Str.get(), offsetInUTF8Characters);
     gchar* charAtEnd =
@@ -2199,58 +2199,58 @@ IMContextWrapper::DeleteText(GtkIMContex
     selectionEvent.mReversed = false;
     selectionEvent.mExpandToClusterBoundary = false;
     lastFocusedWindow->DispatchEvent(&selectionEvent, status);
 
     if (!selectionEvent.mSucceeded ||
         lastFocusedWindow != mLastFocusedWindow ||
         lastFocusedWindow->Destroyed()) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DeleteText(), FAILED, setting selection caused "
+            ("0x%p   DeleteText(), FAILED, setting selection caused "
              "focus change or window destroyed",
              this));
         return NS_ERROR_FAILURE;
     }
 
     // Delete the selection
     WidgetContentCommandEvent contentCommandEvent(true, eContentCommandDelete,
                                                   mLastFocusedWindow);
     mLastFocusedWindow->DispatchEvent(&contentCommandEvent, status);
 
     if (!contentCommandEvent.mSucceeded ||
         lastFocusedWindow != mLastFocusedWindow ||
         lastFocusedWindow->Destroyed()) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DeleteText(), FAILED, deleting the selection caused "
+            ("0x%p   DeleteText(), FAILED, deleting the selection caused "
              "focus change or window destroyed",
              this));
         return NS_ERROR_FAILURE;
     }
 
     if (!wasComposing) {
         return NS_OK;
     }
 
     // Restore the composition at new caret position.
     if (!DispatchCompositionStart(aContext)) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DeleteText(), FAILED, resterting composition start",
+            ("0x%p   DeleteText(), FAILED, resterting composition start",
              this));
         return NS_ERROR_FAILURE;
     }
 
     if (!editorHadCompositionString) {
         return NS_OK;
     }
 
     nsAutoString compositionString;
     GetCompositionString(aContext, compositionString);
     if (!DispatchCompositionChangeEvent(aContext, compositionString)) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p   DeleteText(), FAILED, restoring composition string",
+            ("0x%p   DeleteText(), FAILED, restoring composition string",
              this));
         return NS_ERROR_FAILURE;
     }
 
     return NS_OK;
 }
 
 void
@@ -2268,50 +2268,50 @@ IMContextWrapper::EnsureToCacheSelection
 
     if (mSelection.IsValid() &&
         (!mSelection.Collapsed() || !aSelectedString)) {
        return true;
     }
 
     if (NS_WARN_IF(!mLastFocusedWindow)) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p EnsureToCacheSelection(), FAILED, due to "
+            ("0x%p EnsureToCacheSelection(), FAILED, due to "
              "no focused window",
              this));
         return false;
     }
 
     nsEventStatus status;
     WidgetQueryContentEvent selection(true, eQuerySelectedText,
                                       mLastFocusedWindow);
     InitEvent(selection);
     mLastFocusedWindow->DispatchEvent(&selection, status);
     if (NS_WARN_IF(!selection.mSucceeded)) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p EnsureToCacheSelection(), FAILED, due to "
+            ("0x%p EnsureToCacheSelection(), FAILED, due to "
              "failure of query selection event",
              this));
         return false;
     }
 
     mSelection.Assign(selection);
     if (!mSelection.IsValid()) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
-            ("%p EnsureToCacheSelection(), FAILED, due to "
+            ("0x%p EnsureToCacheSelection(), FAILED, due to "
              "failure of query selection event (invalid result)",
              this));
         return false;
     }
 
     if (!mSelection.Collapsed() && aSelectedString) {
         aSelectedString->Assign(selection.mReply.mString);
     }
 
     MOZ_LOG(gGtkIMLog, LogLevel::Debug,
-        ("%p EnsureToCacheSelection(), Succeeded, mSelection="
+        ("0x%p EnsureToCacheSelection(), Succeeded, mSelection="
          "{ mOffset=%u, mLength=%u, mWritingMode=%s }",
          this, mSelection.mOffset, mSelection.mLength,
          GetWritingModeName(mSelection.mWritingMode).get()));
     return true;
 }
 
 /******************************************************************************
  * IMContextWrapper::Selection
--- a/widget/gtk/nsGtkKeyUtils.cpp
+++ b/widget/gtk/nsGtkKeyUtils.cpp
@@ -159,17 +159,17 @@ KeymapWrapper::Shutdown()
     }
 }
 
 KeymapWrapper::KeymapWrapper() :
     mInitialized(false), mGdkKeymap(gdk_keymap_get_default()),
     mXKBBaseEventCode(0)
 {
     MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-        ("KeymapWrapper(%p): Constructor, mGdkKeymap=%p",
+        ("%p Constructor, mGdkKeymap=%p",
          this, mGdkKeymap));
 
     g_object_ref(mGdkKeymap);
     g_signal_connect(mGdkKeymap, "keys-changed",
                      (GCallback)OnKeysChanged, this);
 
     if (GDK_IS_X11_DISPLAY(gdk_display_get_default()))
         InitXKBExtension();
@@ -181,29 +181,29 @@ void
 KeymapWrapper::Init()
 {
     if (mInitialized) {
         return;
     }
     mInitialized = true;
 
     MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-        ("KeymapWrapper(%p): Init, mGdkKeymap=%p",
+        ("%p Init, mGdkKeymap=%p",
          this, mGdkKeymap));
 
     mModifierKeys.Clear();
     memset(mModifierMasks, 0, sizeof(mModifierMasks));
 
     if (GDK_IS_X11_DISPLAY(gdk_display_get_default()))
         InitBySystemSettings();
 
     gdk_window_add_filter(nullptr, FilterEvents, this);
 
     MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-        ("KeymapWrapper(%p): Init, CapsLock=0x%X, NumLock=0x%X, "
+        ("%p Init, CapsLock=0x%X, NumLock=0x%X, "
          "ScrollLock=0x%X, Level3=0x%X, Level5=0x%X, "
          "Shift=0x%X, Ctrl=0x%X, Alt=0x%X, Meta=0x%X, Super=0x%X, Hyper=0x%X",
          this,
          GetModifierMask(CAPS_LOCK), GetModifierMask(NUM_LOCK),
          GetModifierMask(SCROLL_LOCK), GetModifierMask(LEVEL3),
          GetModifierMask(LEVEL5),
          GetModifierMask(SHIFT), GetModifierMask(CTRL),
          GetModifierMask(ALT), GetModifierMask(META),
@@ -214,17 +214,17 @@ void
 KeymapWrapper::InitXKBExtension()
 {
     PodZero(&mKeyboardState);
 
     int xkbMajorVer = XkbMajorVersion;
     int xkbMinorVer = XkbMinorVersion;
     if (!XkbLibraryVersion(&xkbMajorVer, &xkbMinorVer)) {
         MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-               ("KeymapWrapper(%p): InitXKBExtension failed due to failure of "
+               ("%p InitXKBExtension failed due to failure of "
                 "XkbLibraryVersion()", this));
         return;
     }
 
     Display* display =
         gdk_x11_display_get_xdisplay(gdk_display_get_default());
 
     // XkbLibraryVersion() set xkbMajorVer and xkbMinorVer to that of the
@@ -232,86 +232,86 @@ KeymapWrapper::InitXKBExtension()
     // XkbQueryExtension(), so these variables should be reset to
     // XkbMajorVersion and XkbMinorVersion before the XkbQueryExtension call.
     xkbMajorVer = XkbMajorVersion;
     xkbMinorVer = XkbMinorVersion;
     int opcode, baseErrorCode;
     if (!XkbQueryExtension(display, &opcode, &mXKBBaseEventCode, &baseErrorCode,
                            &xkbMajorVer, &xkbMinorVer)) {
         MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-               ("KeymapWrapper(%p): InitXKBExtension failed due to failure of "
+               ("%p InitXKBExtension failed due to failure of "
                 "XkbQueryExtension(), display=0x%p", this, display));
         return;
     }
 
     if (!XkbSelectEventDetails(display, XkbUseCoreKbd, XkbStateNotify,
                                XkbModifierStateMask, XkbModifierStateMask)) {
         MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-               ("KeymapWrapper(%p): InitXKBExtension failed due to failure of "
+               ("%p InitXKBExtension failed due to failure of "
                 "XkbSelectEventDetails() for XModifierStateMask, display=0x%p",
                 this, display));
         return;
     }
 
     if (!XkbSelectEventDetails(display, XkbUseCoreKbd, XkbControlsNotify,
                                XkbPerKeyRepeatMask, XkbPerKeyRepeatMask)) {
         MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-               ("KeymapWrapper(%p): InitXKBExtension failed due to failure of "
+               ("%p InitXKBExtension failed due to failure of "
                 "XkbSelectEventDetails() for XkbControlsNotify, display=0x%p",
                 this, display));
         return;
     }
 
     if (!XGetKeyboardControl(display, &mKeyboardState)) {
         MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-               ("KeymapWrapper(%p): InitXKBExtension failed due to failure of "
+               ("%p InitXKBExtension failed due to failure of "
                 "XGetKeyboardControl(), display=0x%p",
                 this, display));
         return;
     }
 
     MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-           ("KeymapWrapper(%p): InitXKBExtension, Succeeded", this));
+           ("%p InitXKBExtension, Succeeded", this));
 }
 
 void
 KeymapWrapper::InitBySystemSettings()
 {
     MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-      ("KeymapWrapper(%p): InitBySystemSettings, mGdkKeymap=%p",
+      ("%p InitBySystemSettings, mGdkKeymap=%p",
        this, mGdkKeymap));
 
     Display* display =
         gdk_x11_display_get_xdisplay(gdk_display_get_default());
 
     int min_keycode = 0;
     int max_keycode = 0;
     XDisplayKeycodes(display, &min_keycode, &max_keycode);
 
     int keysyms_per_keycode = 0;
     KeySym* xkeymap = XGetKeyboardMapping(display, min_keycode,
                                           max_keycode - min_keycode + 1,
                                           &keysyms_per_keycode);
     if (!xkeymap) {
         MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-            ("KeymapWrapper(%p): InitBySystemSettings, "
+            ("%p InitBySystemSettings, "
              "Failed due to null xkeymap", this));
         return;
     }
 
     XModifierKeymap* xmodmap = XGetModifierMapping(display);
     if (!xmodmap) {
         MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-            ("KeymapWrapper(%p): InitBySystemSettings, "
+            ("%p InitBySystemSettings, "
              "Failed due to null xmodmap", this));
         XFree(xkeymap);
         return;
     }
     MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-        ("KeymapWrapper(%p): InitBySystemSettings, min_keycode=%d, "
+        ("%p InitBySystemSettings, min_keycode=%d, "
          "max_keycode=%d, keysyms_per_keycode=%d, max_keypermod=%d",
          this, min_keycode, max_keycode, keysyms_per_keycode,
          xmodmap->max_keypermod));
 
     // The modifiermap member of the XModifierKeymap structure contains 8 sets
     // of max_keypermod KeyCodes, one for each modifier in the order Shift,
     // Lock, Control, Mod1, Mod2, Mod3, Mod4, and Mod5.
     // Only nonzero KeyCodes have meaning in each set, and zero KeyCodes are
@@ -328,17 +328,17 @@ KeymapWrapper::InitBySystemSettings()
     for (uint32_t i = 0; i < ArrayLength(mod); i++) {
         mod[i] = NOT_MODIFIER;
         foundLevel[i] = INT32_MAX;
     }
     const uint32_t map_size = 8 * xmodmap->max_keypermod;
     for (uint32_t i = 0; i < map_size; i++) {
         KeyCode keycode = xmodmap->modifiermap[i];
         MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-            ("KeymapWrapper(%p): InitBySystemSettings, "
+            ("%p InitBySystemSettings, "
              "  i=%d, keycode=0x%08X",
              this, i, keycode));
         if (!keycode || keycode < min_keycode || keycode > max_keycode) {
             continue;
         }
 
         ModifierKey* modifierKey = GetModifierKey(keycode);
         if (!modifierKey) {
@@ -355,17 +355,17 @@ KeymapWrapper::InitBySystemSettings()
         if (bit < 3) {
             continue;
         }
 
         const int32_t modIndex = bit - 3;
         for (int32_t j = 0; j < keysyms_per_keycode; j++) {
             Modifier modifier = GetModifierForGDKKeyval(syms[j]);
             MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-                ("KeymapWrapper(%p): InitBySystemSettings, "
+                ("%p InitBySystemSettings, "
                  "    Mod%d, j=%d, syms[j]=%s(0x%X), modifier=%s",
                  this, modIndex + 1, j, gdk_keyval_name(syms[j]), syms[j],
                  GetModifierName(modifier)));
 
             switch (modifier) {
                 case NOT_MODIFIER:
                     // Don't overwrite the stored information with
                     // NOT_MODIFIER.
@@ -440,17 +440,17 @@ KeymapWrapper::InitBySystemSettings()
 KeymapWrapper::~KeymapWrapper()
 {
     gdk_window_remove_filter(nullptr, FilterEvents, this);
     g_signal_handlers_disconnect_by_func(mGdkKeymap,
                                          FuncToGpointer(OnKeysChanged), this);
     g_object_unref(mGdkKeymap);
     NS_IF_RELEASE(sBidiKeyboard);
     MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-        ("KeymapWrapper(%p): Destructor", this));
+        ("%p Destructor", this));
 }
 
 /* static */ GdkFilterReturn
 KeymapWrapper::FilterEvents(GdkXEvent* aXEvent,
                             GdkEvent* aGdkEvent,
                             gpointer aData)
 {
     XEvent* xEvent = static_cast<XEvent*>(aXEvent);
@@ -503,33 +503,33 @@ KeymapWrapper::FilterEvents(GdkXEvent* a
             XkbEvent* xkbEvent = (XkbEvent*)xEvent;
             if (xkbEvent->any.xkb_type != XkbControlsNotify ||
                 !(xkbEvent->ctrls.changed_ctrls & XkbPerKeyRepeatMask)) {
                 break;
             }
             if (!XGetKeyboardControl(xkbEvent->any.display,
                                      &self->mKeyboardState)) {
                 MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-                       ("KeymapWrapper(%p): FilterEvents failed due to failure "
+                       ("%p FilterEvents failed due to failure "
                         "of XGetKeyboardControl(), display=0x%p",
                         self, xkbEvent->any.display));
             }
             break;
         }
     }
 
     return GDK_FILTER_CONTINUE;
 }
 
 /* static */ void
 KeymapWrapper::OnKeysChanged(GdkKeymap *aGdkKeymap,
                              KeymapWrapper* aKeymapWrapper)
 {
     MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-        ("KeymapWrapper: OnKeysChanged, aGdkKeymap=%p, aKeymapWrapper=%p",
+        ("OnKeysChanged, aGdkKeymap=%p, aKeymapWrapper=%p",
          aGdkKeymap, aKeymapWrapper));
 
     MOZ_ASSERT(sInstance == aKeymapWrapper,
                "This instance must be the singleton instance");
 
     // We cannot reintialize here becasue we don't have GdkWindow which is using
     // the GdkKeymap.  We'll reinitialize it when next GetInstance() is called.
     sInstance->mInitialized = false;
@@ -614,17 +614,17 @@ KeymapWrapper::InitInputEvent(WidgetInpu
     if (keymapWrapper->AreModifiersActive(NUM_LOCK, aModifierState)) {
         aInputEvent.mModifiers |= MODIFIER_NUMLOCK;
     }
     if (keymapWrapper->AreModifiersActive(SCROLL_LOCK, aModifierState)) {
         aInputEvent.mModifiers |= MODIFIER_SCROLLLOCK;
     }
 
     MOZ_LOG(gKeymapWrapperLog, LogLevel::Debug,
-        ("KeymapWrapper(%p): InitInputEvent, aModifierState=0x%08X, "
+        ("%p InitInputEvent, aModifierState=0x%08X, "
          "aInputEvent.mModifiers=0x%04X (Shift: %s, Control: %s, Alt: %s, "
          "Meta: %s, OS: %s, AltGr: %s, "
          "CapsLock: %s, NumLock: %s, ScrollLock: %s)",
          keymapWrapper, aModifierState, aInputEvent.mModifiers,
          GetBoolName(aInputEvent.mModifiers & MODIFIER_SHIFT),
          GetBoolName(aInputEvent.mModifiers & MODIFIER_CONTROL),
          GetBoolName(aInputEvent.mModifiers & MODIFIER_ALT),
          GetBoolName(aInputEvent.mModifiers & MODIFIER_META),
@@ -653,17 +653,17 @@ KeymapWrapper::InitInputEvent(WidgetInpu
     if (aModifierState & GDK_BUTTON3_MASK) {
         mouseEvent.buttons |= WidgetMouseEvent::eRightButtonFlag;
     }
     if (aModifierState & GDK_BUTTON2_MASK) {
         mouseEvent.buttons |= WidgetMouseEvent::eMiddleButtonFlag;
     }
 
     MOZ_LOG(gKeymapWrapperLog, LogLevel::Debug,
-        ("KeymapWrapper(%p): InitInputEvent, aInputEvent has buttons, "
+        ("%p InitInputEvent, aInputEvent has buttons, "
          "aInputEvent.buttons=0x%04X (Left: %s, Right: %s, Middle: %s, "
          "4th (BACK): %s, 5th (FORWARD): %s)",
          keymapWrapper, mouseEvent.buttons,
          GetBoolName(mouseEvent.buttons & WidgetMouseEvent::eLeftButtonFlag),
          GetBoolName(mouseEvent.buttons & WidgetMouseEvent::eRightButtonFlag),
          GetBoolName(mouseEvent.buttons & WidgetMouseEvent::eMiddleButtonFlag),
          GetBoolName(mouseEvent.buttons & WidgetMouseEvent::e4thButtonFlag),
          GetBoolName(mouseEvent.buttons & WidgetMouseEvent::e5thButtonFlag)));
@@ -970,17 +970,17 @@ KeymapWrapper::InitKeyEvent(WidgetKeyboa
             break;
 
         default:
             aKeyEvent.mLocation = nsIDOMKeyEvent::DOM_KEY_LOCATION_STANDARD;
             break;
     }
 
     MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-        ("KeymapWrapper(%p): InitKeyEvent, modifierState=0x%08X "
+        ("%p InitKeyEvent, modifierState=0x%08X "
          "aGdkKeyEvent={ type=%s, keyval=%s(0x%X), state=0x%08X, "
          "hardware_keycode=0x%08X, is_modifier=%s } "
          "aKeyEvent={ message=%s, isShift=%s, isControl=%s, "
          "isAlt=%s, isMeta=%s }",
          keymapWrapper, modifierState,
          ((aGdkKeyEvent->type == GDK_KEY_PRESS) ?
                "GDK_KEY_PRESS" : "GDK_KEY_RELEASE"),
          gdk_keyval_name(aGdkKeyEvent->keyval),
@@ -1327,32 +1327,32 @@ KeymapWrapper::WillDispatchKeyboardEvent
 
 void
 KeymapWrapper::WillDispatchKeyboardEventInternal(WidgetKeyboardEvent& aKeyEvent,
                                                  GdkEventKey* aGdkKeyEvent)
 {
     uint32_t charCode = GetCharCodeFor(aGdkKeyEvent);
     if (!charCode) {
         MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-            ("KeymapWrapper(%p): WillDispatchKeyboardEventInternal, "
+            ("%p WillDispatchKeyboardEventInternal, "
              "mKeyCode=0x%02X, charCode=0x%08X",
              this, aKeyEvent.mKeyCode, aKeyEvent.mCharCode));
         return;
     }
 
     // The mCharCode was set from mKeyValue. However, for example, when Ctrl key
     // is pressed, its value should indicate an ASCII character for backward
     // compatibility rather than inputting character without the modifiers.
     // Therefore, we need to modify mCharCode value here.
     aKeyEvent.SetCharCode(charCode);
 
     gint level = GetKeyLevel(aGdkKeyEvent);
     if (level != 0 && level != 1) {
         MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-            ("KeymapWrapper(%p): WillDispatchKeyboardEventInternal, "
+            ("%p WillDispatchKeyboardEventInternal, "
              "mKeyCode=0x%02X, mCharCode=0x%08X, level=%d",
              this, aKeyEvent.mKeyCode, aKeyEvent.mCharCode, level));
         return;
     }
 
     guint baseState = aGdkKeyEvent->state &
         ~(GetModifierMask(SHIFT) | GetModifierMask(CTRL) |
           GetModifierMask(ALT) | GetModifierMask(META) |
@@ -1382,29 +1382,29 @@ KeymapWrapper::WillDispatchKeyboardEvent
             (IS_ASCII_ALPHABETICAL(altCharCodes.mUnshiftedCharCode) !=
              IS_ASCII_ALPHABETICAL(altCharCodes.mShiftedCharCode));
     }
 
     // If current keyboard layout can input Latin characters, we don't need
     // more information.
     if (!needLatinKeyCodes) {
         MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-            ("KeymapWrapper(%p): WillDispatchKeyboardEventInternal, "
+            ("%p WillDispatchKeyboardEventInternal, "
              "mKeyCode=0x%02X, mCharCode=0x%08X, level=%d, altCharCodes={ "
              "mUnshiftedCharCode=0x%08X, mShiftedCharCode=0x%08X }",
              this, aKeyEvent.mKeyCode, aKeyEvent.mCharCode, level,
              altCharCodes.mUnshiftedCharCode, altCharCodes.mShiftedCharCode));
         return;
     }
 
     // Next, find Latin inputtable keyboard layout.
     gint minGroup = GetFirstLatinGroup();
     if (minGroup < 0) {
         MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-            ("KeymapWrapper(%p): WillDispatchKeyboardEventInternal, "
+            ("%p WillDispatchKeyboardEventInternal, "
              "Latin keyboard layout isn't found: "
              "mKeyCode=0x%02X, mCharCode=0x%08X, level=%d, "
              "altCharCodes={ mUnshiftedCharCode=0x%08X, "
              "mShiftedCharCode=0x%08X }",
              this, aKeyEvent.mKeyCode, aKeyEvent.mCharCode, level,
              altCharCodes.mUnshiftedCharCode, altCharCodes.mShiftedCharCode));
         return;
     }
@@ -1435,17 +1435,17 @@ KeymapWrapper::WillDispatchKeyboardEvent
     ch = aKeyEvent.IsShift() ? altLatinCharCodes.mShiftedCharCode :
                                altLatinCharCodes.mUnshiftedCharCode;
     if (ch && !(aKeyEvent.IsAlt() || aKeyEvent.IsMeta()) &&
         charCode == unmodifiedCh) {
         aKeyEvent.SetCharCode(ch);
     }
 
     MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
-        ("KeymapWrapper(%p): WillDispatchKeyboardEventInternal, "
+        ("%p WillDispatchKeyboardEventInternal, "
          "mKeyCode=0x%02X, mCharCode=0x%08X, level=%d, minGroup=%d, "
          "altCharCodes={ mUnshiftedCharCode=0x%08X, "
          "mShiftedCharCode=0x%08X } "
          "altLatinCharCodes={ mUnshiftedCharCode=0x%08X, "
          "mShiftedCharCode=0x%08X }",
          this, aKeyEvent.mKeyCode, aKeyEvent.mCharCode, level, minGroup,
          altCharCodes.mUnshiftedCharCode, altCharCodes.mShiftedCharCode,
          altLatinCharCodes.mUnshiftedCharCode,