Bug 895274 part.153 Rename NS_QUERY_TEXT_CONTENT to eQueryTextContent r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Thu, 10 Sep 2015 10:40:05 +0900
changeset 296004 25399075c9efe898cb2b2f137e4affeace30cd47
parent 296003 ec614033e8225b089920f84d43d5930a2bef93c9
child 296005 1a346d89cc2358675297e2014aa1e56146e71ae0
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs895274
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 895274 part.153 Rename NS_QUERY_TEXT_CONTENT to eQueryTextContent r=smaug
dom/base/nsDOMWindowUtils.cpp
dom/base/nsQueryContentEventResult.cpp
dom/events/ContentEventHandler.cpp
dom/events/ContentEventHandler.h
dom/events/EventStateManager.cpp
dom/events/IMEContentObserver.cpp
layout/base/nsPresShell.cpp
widget/ContentCache.cpp
widget/ContentCache.h
widget/EventMessageList.h
widget/TextEvents.h
widget/android/nsWindow.cpp
widget/cocoa/TextInputHandler.mm
widget/cocoa/nsChildView.mm
widget/gtk/IMContextWrapper.cpp
widget/tests/TestWinTSF.cpp
widget/windows/IMMHandler.cpp
widget/windows/TSFTextStore.cpp
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -1925,17 +1925,17 @@ nsDOMWindowUtils::SendQueryContentEvent(
   }
 
   EventMessage message;
   switch (aType) {
     case QUERY_SELECTED_TEXT:
       message = eQuerySelectedText;
       break;
     case QUERY_TEXT_CONTENT:
-      message = NS_QUERY_TEXT_CONTENT;
+      message = eQueryTextContent;
       break;
     case QUERY_CARET_RECT:
       message = NS_QUERY_CARET_RECT;
       break;
     case QUERY_TEXT_RECT:
       message = NS_QUERY_TEXT_RECT;
       break;
     case QUERY_EDITOR_RECT:
@@ -1980,17 +1980,17 @@ nsDOMWindowUtils::SendQueryContentEvent(
   }
 
   pt += widget->WidgetToScreenOffset() - targetWidget->WidgetToScreenOffset();
 
   WidgetQueryContentEvent queryEvent(true, message, targetWidget);
   InitEvent(queryEvent, &pt);
 
   switch (message) {
-    case NS_QUERY_TEXT_CONTENT:
+    case eQueryTextContent:
       queryEvent.InitForQueryTextContent(aOffset, aLength, useNativeLineBreak);
       break;
     case NS_QUERY_CARET_RECT:
       queryEvent.InitForQueryCaretRect(aOffset, useNativeLineBreak);
       break;
     case NS_QUERY_TEXT_RECT:
       queryEvent.InitForQueryTextRect(aOffset, aLength, useNativeLineBreak);
       break;
--- a/dom/base/nsQueryContentEventResult.cpp
+++ b/dom/base/nsQueryContentEventResult.cpp
@@ -112,17 +112,17 @@ nsQueryContentEventResult::GetHeight(int
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsQueryContentEventResult::GetText(nsAString &aText)
 {
   NS_ENSURE_TRUE(mSucceeded, NS_ERROR_NOT_AVAILABLE);
   NS_ENSURE_TRUE(mEventMessage == eQuerySelectedText ||
-                 mEventMessage == NS_QUERY_TEXT_CONTENT,
+                 mEventMessage == eQueryTextContent,
                  NS_ERROR_NOT_AVAILABLE);
   aText = mString;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsQueryContentEventResult::GetSucceeded(bool *aSucceeded)
 {
--- a/dom/events/ContentEventHandler.cpp
+++ b/dom/events/ContentEventHandler.cpp
@@ -793,17 +793,17 @@ ContentEventHandler::GetLineBreakType(bo
 }
 
 nsresult
 ContentEventHandler::HandleQueryContentEvent(WidgetQueryContentEvent* aEvent)
 {
   switch (aEvent->mMessage) {
     case eQuerySelectedText:
       return OnQuerySelectedText(aEvent);
-    case NS_QUERY_TEXT_CONTENT:
+    case eQueryTextContent:
       return OnQueryTextContent(aEvent);
     case NS_QUERY_CARET_RECT:
       return OnQueryCaretRect(aEvent);
     case NS_QUERY_TEXT_RECT:
       return OnQueryTextRect(aEvent);
     case NS_QUERY_EDITOR_RECT:
       return OnQueryEditorRect(aEvent);
     case NS_QUERY_CONTENT_STATE:
--- a/dom/events/ContentEventHandler.h
+++ b/dom/events/ContentEventHandler.h
@@ -39,17 +39,17 @@ public:
 
   explicit ContentEventHandler(nsPresContext* aPresContext);
 
   // Handle aEvent in the current process.
   nsresult HandleQueryContentEvent(WidgetQueryContentEvent* aEvent);
 
   // eQuerySelectedText event handler
   nsresult OnQuerySelectedText(WidgetQueryContentEvent* aEvent);
-  // NS_QUERY_TEXT_CONTENT event handler
+  // eQueryTextContent event handler
   nsresult OnQueryTextContent(WidgetQueryContentEvent* aEvent);
   // NS_QUERY_CARET_RECT event handler
   nsresult OnQueryCaretRect(WidgetQueryContentEvent* aEvent);
   // NS_QUERY_TEXT_RECT event handler
   nsresult OnQueryTextRect(WidgetQueryContentEvent* aEvent);
   // NS_QUERY_EDITOR_RECT event handler
   nsresult OnQueryEditorRect(WidgetQueryContentEvent* aEvent);
   // NS_QUERY_CONTENT_STATE event handler
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -781,17 +781,17 @@ EventStateManager::PreHandleEvent(nsPres
   return NS_OK;
 }
 
 void
 EventStateManager::HandleQueryContentEvent(WidgetQueryContentEvent* aEvent)
 {
   switch (aEvent->mMessage) {
     case eQuerySelectedText:
-    case NS_QUERY_TEXT_CONTENT:
+    case eQueryTextContent:
     case NS_QUERY_CARET_RECT:
     case NS_QUERY_TEXT_RECT:
     case NS_QUERY_EDITOR_RECT:
       if (!IsTargetCrossProcess(aEvent)) {
         break;
       }
       // Will not be handled locally, remote the event
       GetCrossProcessTarget()->HandleQueryContentEvent(*aEvent);
--- a/dom/events/IMEContentObserver.cpp
+++ b/dom/events/IMEContentObserver.cpp
@@ -48,18 +48,18 @@ ToChar(bool aBool)
 }
 
 static const char*
 ToChar(EventMessage aEventMessage)
 {
   switch (aEventMessage) {
     case eQuerySelectedText:
       return "eQuerySelectedText";
-    case NS_QUERY_TEXT_CONTENT:
-      return "NS_QUERY_TEXT_CONTENT";
+    case eQueryTextContent:
+      return "eQueryTextContent";
     case NS_QUERY_CARET_RECT:
       return "NS_QUERY_CARET_RECT";
     case NS_QUERY_TEXT_RECT:
       return "NS_QUERY_TEXT_RECT";
     case NS_QUERY_EDITOR_RECT:
       return "NS_QUERY_EDITOR_RECT";
     case NS_QUERY_CONTENT_STATE:
       return "NS_QUERY_CONTENT_STATE";
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -7147,17 +7147,17 @@ PresShell::HandleEvent(nsIFrame* aFrame,
     if (retargetEventDoc) {
       nsCOMPtr<nsIPresShell> presShell = retargetEventDoc->GetShell();
       if (!presShell)
         return NS_OK;
 
       if (presShell != this) {
         nsIFrame* frame = presShell->GetRootFrame();
         if (!frame) {
-          if (aEvent->mMessage == NS_QUERY_TEXT_CONTENT ||
+          if (aEvent->mMessage == eQueryTextContent ||
               aEvent->IsContentCommandEvent()) {
             return NS_OK;
           }
 
           frame = GetNearestFrameContainingPresShell(presShell);
         }
 
         if (!frame)
--- a/widget/ContentCache.cpp
+++ b/widget/ContentCache.cpp
@@ -271,17 +271,17 @@ ContentCacheInChild::CacheText(nsIWidget
                                const IMENotification* aNotification)
 {
   MOZ_LOG(sContentCacheLog, LogLevel::Info,
     ("ContentCacheInChild: 0x%p CacheText(aWidget=0x%p, "
      "aNotification=%s)",
      this, aWidget, GetNotificationName(aNotification)));
 
   nsEventStatus status = nsEventStatus_eIgnore;
-  WidgetQueryContentEvent queryText(true, NS_QUERY_TEXT_CONTENT, aWidget);
+  WidgetQueryContentEvent queryText(true, eQueryTextContent, aWidget);
   queryText.InitForQueryTextContent(0, UINT32_MAX);
   aWidget->DispatchEvent(&queryText, status);
   if (NS_WARN_IF(!queryText.mSucceeded)) {
     MOZ_LOG(sContentCacheLog, LogLevel::Error,
       ("ContentCacheInChild: 0x%p CacheText(), FAILED, "
        "couldn't retrieve whole text", this));
     mText.Truncate();
     return false;
@@ -552,20 +552,20 @@ ContentCacheInParent::HandleQueryContent
          "Succeeded, aEvent={ mReply={ mOffset=%u, mString=\"%s\", "
          "mReversed=%s, mHasSelection=%s, mWritingMode=%s } }",
          this, aEvent.mReply.mOffset,
          NS_ConvertUTF16toUTF8(aEvent.mReply.mString).get(),
          GetBoolName(aEvent.mReply.mReversed),
          GetBoolName(aEvent.mReply.mHasSelection),
          GetWritingModeName(aEvent.mReply.mWritingMode).get()));
       break;
-    case NS_QUERY_TEXT_CONTENT: {
+    case eQueryTextContent: {
       MOZ_LOG(sContentCacheLog, LogLevel::Info,
         ("ContentCacheInParent: 0x%p HandleQueryContentEvent("
-         "aEvent={ mMessage=NS_QUERY_TEXT_CONTENT, mInput={ mOffset=%u, "
+         "aEvent={ mMessage=eQueryTextContent, mInput={ mOffset=%u, "
          "mLength=%u } }, aWidget=0x%p), mText.Length()=%u",
          this, aEvent.mInput.mOffset,
          aEvent.mInput.mLength, aWidget, mText.Length()));
       uint32_t inputOffset = aEvent.mInput.mOffset;
       uint32_t inputEndOffset =
         std::min(aEvent.mInput.EndOffset(), mText.Length());
       if (NS_WARN_IF(inputEndOffset < inputOffset)) {
         MOZ_LOG(sContentCacheLog, LogLevel::Error,
--- a/widget/ContentCache.h
+++ b/widget/ContentCache.h
@@ -281,19 +281,19 @@ public:
 
   /**
    * HandleQueryContentEvent() sets content data to aEvent.mReply.
    *
    * For eQuerySelectedText, fail if the cache doesn't contain the whole
    *  selected range. (This shouldn't happen because PuppetWidget should have
    *  already sent the whole selection.)
    *
-   * For NS_QUERY_TEXT_CONTENT, fail only if the cache doesn't overlap with
+   * For eQueryTextContent, fail only if the cache doesn't overlap with
    *  the queried range. Note the difference from above. We use
-   *  this behavior because a normal NS_QUERY_TEXT_CONTENT event is allowed to
+   *  this behavior because a normal eQueryTextContent event is allowed to
    *  have out-of-bounds offsets, so that widget can request content without
    *  knowing the exact length of text. It's up to widget to handle cases when
    *  the returned offset/length are different from the queried offset/length.
    *
    * For NS_QUERY_TEXT_RECT, fail if cached offset/length aren't equals to input.
    *   Cocoa widget always queries selected offset, so it works on it.
    *
    * For NS_QUERY_CARET_RECT, fail if cached offset isn't equals to input
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -214,17 +214,17 @@ NS_EVENT_MESSAGE(ePaste,                
 // Query the content information
 NS_EVENT_MESSAGE(eQueryContentEventFirst,       3200)
 // Query for the selected text information, it return the selection offset,
 // selection length and selected text.
 NS_EVENT_MESSAGE(eQuerySelectedText,            eQueryContentEventFirst)
 // Query for the text content of specified range, it returns actual lengh (if
 // the specified range is too long) and the text of the specified range.
 // Returns the entire text if requested length > actual length.
-NS_EVENT_MESSAGE(NS_QUERY_TEXT_CONTENT,         eQueryContentEventFirst + 1)
+NS_EVENT_MESSAGE(eQueryTextContent,             eQueryContentEventFirst + 1)
 // Query for the caret rect of nth insertion point. The offset of the result is
 // relative position from the top level widget.
 NS_EVENT_MESSAGE(NS_QUERY_CARET_RECT,           eQueryContentEventFirst + 3)
 // Query for the bounding rect of a range of characters. This works on any
 // valid character range given offset and length. Result is relative to top
 // level widget coordinates
 NS_EVENT_MESSAGE(NS_QUERY_TEXT_RECT,            eQueryContentEventFirst + 4)
 // Query for the bounding rect of the current focused frame. Result is relative
--- a/widget/TextEvents.h
+++ b/widget/TextEvents.h
@@ -490,17 +490,17 @@ public:
       "WidgetQueryContentEvent needs to support Duplicate()");
     MOZ_CRASH("WidgetQueryContentEvent doesn't support Duplicate()");
     return nullptr;
   }
 
   void InitForQueryTextContent(uint32_t aOffset, uint32_t aLength,
                                bool aUseNativeLineBreak = true)
   {
-    NS_ASSERTION(mMessage == NS_QUERY_TEXT_CONTENT,
+    NS_ASSERTION(mMessage == eQueryTextContent,
                  "wrong initializer is called");
     mInput.mOffset = aOffset;
     mInput.mLength = aLength;
     mUseNativeLineBreak = aUseNativeLineBreak;
   }
 
   void InitForQueryCaretRect(uint32_t aOffset,
                              bool aUseNativeLineBreak = true)
@@ -525,17 +525,17 @@ public:
   {
     NS_ASSERTION(mMessage == NS_QUERY_DOM_WIDGET_HITTEST,
                  "wrong initializer is called");
     refPoint = aPoint;
   }
 
   void RequestFontRanges()
   {
-    NS_ASSERTION(mMessage == NS_QUERY_TEXT_CONTENT,
+    NS_ASSERTION(mMessage == eQueryTextContent,
                  "not querying text content");
     mWithFontRanges = true;
   }
 
   uint32_t GetSelectionStart(void) const
   {
     NS_ASSERTION(mMessage == eQuerySelectedText,
                  "not querying selection");
@@ -585,17 +585,17 @@ public:
     // Finally, the coordinates is system coordinates.
     mozilla::LayoutDeviceIntRect mRect;
     // The return widget has the caret. This is set at all query events.
     nsIWidget* mFocusedWidget;
     // mozilla::WritingMode value at the end (focus) of the selection
     mozilla::WritingMode mWritingMode;
     // Used by eQuerySelectionAsTransferable
     nsCOMPtr<nsITransferable> mTransferable;
-    // used by NS_QUERY_TEXT_CONTENT with font ranges requested
+    // Used by eQueryTextContent with font ranges requested
     nsAutoTArray<mozilla::FontRange, 1> mFontRanges;
     // true if selection is reversed (end < start)
     bool mReversed;
     // true if the selection exists
     bool mHasSelection;
     // true if DOM element under mouse belongs to widget
     bool mWidgetIsHit;
 
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -2203,17 +2203,17 @@ nsWindow::FlushIMEChanges()
     for (uint32_t i = 0; i < mIMETextChanges.Length(); i++) {
         IMEChange &change = mIMETextChanges[i];
 
         if (change.mStart == change.mOldEnd &&
                 change.mStart == change.mNewEnd) {
             continue;
         }
 
-        WidgetQueryContentEvent event(true, NS_QUERY_TEXT_CONTENT, this);
+        WidgetQueryContentEvent event(true, eQueryTextContent, this);
 
         if (change.mNewEnd != change.mStart) {
             InitEvent(event, nullptr);
             event.InitForQueryTextContent(change.mStart,
                                           change.mNewEnd - change.mStart);
             DispatchEvent(&event);
             NS_ENSURE_TRUE_VOID(event.mSucceeded);
             NS_ENSURE_TRUE_VOID(event.mReply.mContentsRoot == imeRoot.get());
--- a/widget/cocoa/TextInputHandler.mm
+++ b/widget/cocoa/TextInputHandler.mm
@@ -2964,17 +2964,17 @@ IMEInputHandler::ConversationIdentifier(
 
   if (Destroyed()) {
     return reinterpret_cast<NSInteger>(mView);
   }
 
   nsRefPtr<IMEInputHandler> kungFuDeathGrip(this);
 
   // NOTE: The size of NSInteger is same as pointer size.
-  WidgetQueryContentEvent textContent(true, NS_QUERY_TEXT_CONTENT, mWidget);
+  WidgetQueryContentEvent textContent(true, eQueryTextContent, mWidget);
   textContent.InitForQueryTextContent(0, 0);
   DispatchEvent(textContent);
   if (!textContent.mSucceeded) {
     MOZ_LOG(gLog, LogLevel::Info,
       ("%p IMEInputHandler::ConversationIdentifier, Failed", this));
     return reinterpret_cast<NSInteger>(mView);
   }
   // XXX This might return same ID as a previously existing editor if the
@@ -3000,17 +3000,17 @@ IMEInputHandler::GetAttributedSubstringF
 
   if (Destroyed() || aRange.location == NSNotFound || aRange.length == 0) {
     return nil;
   }
 
   nsRefPtr<IMEInputHandler> kungFuDeathGrip(this);
 
   nsAutoString str;
-  WidgetQueryContentEvent textContent(true, NS_QUERY_TEXT_CONTENT, mWidget);
+  WidgetQueryContentEvent textContent(true, eQueryTextContent, mWidget);
   textContent.InitForQueryTextContent(aRange.location, aRange.length);
   textContent.RequestFontRanges();
   DispatchEvent(textContent);
 
   MOZ_LOG(gLog, LogLevel::Info,
     ("%p IMEInputHandler::GetAttributedSubstringFromRange, "
      "textContent={ mSucceeded=%s, mReply={ mString=\"%s\", mOffset=%llu } }",
      this, TrueOrFalse(textContent.mSucceeded),
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -1905,17 +1905,17 @@ NS_IMETHODIMP nsChildView::GetToggledKey
 }
 
 NSView<mozView>* nsChildView::GetEditorView()
 {
   NSView<mozView>* editorView = mView;
   // We need to get editor's view. E.g., when the focus is in the bookmark
   // dialog, the view is <panel> element of the dialog.  At this time, the key
   // events are processed the parent window's view that has native focus.
-  WidgetQueryContentEvent textContent(true, NS_QUERY_TEXT_CONTENT, this);
+  WidgetQueryContentEvent textContent(true, eQueryTextContent, this);
   textContent.InitForQueryTextContent(0, 0);
   DispatchWindowEvent(textContent);
   if (textContent.mSucceeded && textContent.mReply.mFocusedWidget) {
     NSView<mozView>* view = static_cast<NSView<mozView>*>(
       textContent.mReply.mFocusedWidget->GetNativeData(NS_NATIVE_WIDGET));
     if (view)
       editorView = view;
   }
--- a/widget/gtk/IMContextWrapper.cpp
+++ b/widget/gtk/IMContextWrapper.cpp
@@ -1904,18 +1904,17 @@ IMContextWrapper::GetCurrentParagraph(ns
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
             ("GTKIM: %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,
-                                                  NS_QUERY_TEXT_CONTENT,
+    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,
@@ -2001,18 +2000,17 @@ IMContextWrapper::DeleteText(GtkIMContex
                  "information",
                  this));
             return NS_ERROR_FAILURE;
         }
         selOffset = mSelection.mOffset;
     }
 
     // Get all text contents of the focused editor
-    WidgetQueryContentEvent queryTextContentEvent(true,
-                                                  NS_QUERY_TEXT_CONTENT,
+    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,
             ("GTKIM: %p   DeleteText(), FAILED, there is no contents",
              this));
--- a/widget/tests/TestWinTSF.cpp
+++ b/widget/tests/TestWinTSF.cpp
@@ -1955,19 +1955,19 @@ TestApp::TestText(void)
   char16_t buffer[BUFFER_SIZE];
   TS_RUNINFO runInfo[RUNINFO_SIZE];
   ULONG bufferRet, runInfoRet;
   LONG acpRet, acpCurrent;
   TS_TEXTCHANGE textChange;
   HRESULT hr;
 
   /* If these fail the cause is probably one or more of:
-   * nsTextStore::GetText not sending NS_QUERY_TEXT_CONTENT
-   * NS_QUERY_TEXT_CONTENT not handled by ContentEventHandler
-   * Bug in NS_QUERY_TEXT_CONTENT handler
+   * nsTextStore::GetText not sending eQueryTextContent
+   * eQueryTextContent not handled by ContentEventHandler
+   * Bug in eQueryTextContent handler
    * nsTextStore::SetText not calling SetSelection or InsertTextAtSelection
    * Bug in SetSelection or InsertTextAtSelection
    *  eSetSelection bug or NS_COMPOSITION_* / NS_COMPOSITION_CHANGE bug
    */
 
   if (!mMgr->GetFocusedStore()) {
     fail("TestText: GetFocusedStore returns null #1");
     return false;
--- a/widget/windows/IMMHandler.cpp
+++ b/widget/windows/IMMHandler.cpp
@@ -1721,24 +1721,23 @@ IMMHandler::HandleDocumentFeed(nsWindow*
       targetOffset + targetLength < 0) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
       ("IMM: HandleDocumentFeed, FAILED, due to the selection is out of "
        "range"));
     return false;
   }
 
   // Get all contents of the focused editor.
-  WidgetQueryContentEvent textContent(true, NS_QUERY_TEXT_CONTENT, aWindow);
+  WidgetQueryContentEvent textContent(true, eQueryTextContent, aWindow);
   textContent.InitForQueryTextContent(0, UINT32_MAX);
   aWindow->InitEvent(textContent, &point);
   aWindow->DispatchWindowEvent(&textContent);
   if (!textContent.mSucceeded) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: HandleDocumentFeed, FAILED, due to NS_QUERY_TEXT_CONTENT "
-       "failure"));
+      ("IMM: 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"));
     return false;
--- a/widget/windows/TSFTextStore.cpp
+++ b/widget/windows/TSFTextStore.cpp
@@ -2078,24 +2078,24 @@ TSFTextStore::GetCurrentText(nsAString& 
   }
 
   MOZ_ASSERT(mWidget && !mWidget->Destroyed());
 
   MOZ_LOG(sTextStoreLog, LogLevel::Debug,
          ("TSF: 0x%p   TSFTextStore::GetCurrentText(): "
           "retrieving text from the content...", this));
 
-  WidgetQueryContentEvent queryText(true, NS_QUERY_TEXT_CONTENT, mWidget);
+  WidgetQueryContentEvent queryText(true, eQueryTextContent, mWidget);
   queryText.InitForQueryTextContent(0, UINT32_MAX);
   mWidget->InitEvent(queryText);
   DispatchEvent(queryText);
   if (NS_WARN_IF(!queryText.mSucceeded)) {
     MOZ_LOG(sTextStoreLog, LogLevel::Error,
            ("TSF: 0x%p   TSFTextStore::GetCurrentText(), FAILED, due to "
-            "NS_QUERY_TEXT_CONTENT failure", this));
+            "eQueryTextContent failure", this));
     aTextContent.Truncate();
     return false;
   }
 
   aTextContent = queryText.mReply.mString;
   return true;
 }