Bug 895274 part.155 Rename NS_QUERY_EDITOR_RECT to eQueryEditorRect r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Thu, 10 Sep 2015 10:40:06 +0900
changeset 294301 a5c0e8cbf6073fe223f50ce2d8056678f69c88d5
parent 294300 1a346d89cc2358675297e2014aa1e56146e71ae0
child 294302 03965478482802c244ba8212177324cb7516d958
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [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.155 Rename NS_QUERY_EDITOR_RECT to eQueryEditorRect 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
dom/ipc/TabParent.cpp
widget/ContentCache.cpp
widget/ContentCache.h
widget/EventMessageList.h
widget/windows/IMMHandler.cpp
widget/windows/TSFTextStore.cpp
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -1934,17 +1934,17 @@ nsDOMWindowUtils::SendQueryContentEvent(
       break;
     case QUERY_CARET_RECT:
       message = eQueryCaretRect;
       break;
     case QUERY_TEXT_RECT:
       message = NS_QUERY_TEXT_RECT;
       break;
     case QUERY_EDITOR_RECT:
-      message = NS_QUERY_EDITOR_RECT;
+      message = eQueryEditorRect;
       break;
     case QUERY_CHARACTER_AT_POINT:
       message = NS_QUERY_CHARACTER_AT_POINT;
       break;
     default:
       return NS_ERROR_INVALID_ARG;
   }
 
--- a/dom/base/nsQueryContentEventResult.cpp
+++ b/dom/base/nsQueryContentEventResult.cpp
@@ -54,17 +54,17 @@ nsQueryContentEventResult::GetTentativeC
   *aOffset = mTentativeCaretOffset;
   return NS_OK;
 }
 
 static bool IsRectEnabled(EventMessage aEventMessage)
 {
   return aEventMessage == eQueryCaretRect ||
          aEventMessage == NS_QUERY_TEXT_RECT ||
-         aEventMessage == NS_QUERY_EDITOR_RECT ||
+         aEventMessage == eQueryEditorRect ||
          aEventMessage == NS_QUERY_CHARACTER_AT_POINT;
 }
 
 NS_IMETHODIMP
 nsQueryContentEventResult::GetReversed(bool *aReversed)
 {
   NS_ENSURE_TRUE(mSucceeded, NS_ERROR_NOT_AVAILABLE);
   NS_ENSURE_TRUE(mEventMessage == eQuerySelectedText, NS_ERROR_NOT_AVAILABLE);
--- a/dom/events/ContentEventHandler.cpp
+++ b/dom/events/ContentEventHandler.cpp
@@ -799,17 +799,17 @@ ContentEventHandler::HandleQueryContentE
     case eQuerySelectedText:
       return OnQuerySelectedText(aEvent);
     case eQueryTextContent:
       return OnQueryTextContent(aEvent);
     case eQueryCaretRect:
       return OnQueryCaretRect(aEvent);
     case NS_QUERY_TEXT_RECT:
       return OnQueryTextRect(aEvent);
-    case NS_QUERY_EDITOR_RECT:
+    case eQueryEditorRect:
       return OnQueryEditorRect(aEvent);
     case NS_QUERY_CONTENT_STATE:
       return OnQueryContentState(aEvent);
     case eQuerySelectionAsTransferable:
       return OnQuerySelectionAsTransferable(aEvent);
     case NS_QUERY_CHARACTER_AT_POINT:
       return OnQueryCharacterAtPoint(aEvent);
     case NS_QUERY_DOM_WIDGET_HITTEST:
--- a/dom/events/ContentEventHandler.h
+++ b/dom/events/ContentEventHandler.h
@@ -45,17 +45,17 @@ public:
   // eQuerySelectedText event handler
   nsresult OnQuerySelectedText(WidgetQueryContentEvent* aEvent);
   // eQueryTextContent event handler
   nsresult OnQueryTextContent(WidgetQueryContentEvent* aEvent);
   // eQueryCaretRect event handler
   nsresult OnQueryCaretRect(WidgetQueryContentEvent* aEvent);
   // NS_QUERY_TEXT_RECT event handler
   nsresult OnQueryTextRect(WidgetQueryContentEvent* aEvent);
-  // NS_QUERY_EDITOR_RECT event handler
+  // eQueryEditorRect event handler
   nsresult OnQueryEditorRect(WidgetQueryContentEvent* aEvent);
   // NS_QUERY_CONTENT_STATE event handler
   nsresult OnQueryContentState(WidgetQueryContentEvent* aEvent);
   // eQuerySelectionAsTransferable event handler
   nsresult OnQuerySelectionAsTransferable(WidgetQueryContentEvent* aEvent);
   // NS_QUERY_CHARACTER_AT_POINT event handler
   nsresult OnQueryCharacterAtPoint(WidgetQueryContentEvent* aEvent);
   // NS_QUERY_DOM_WIDGET_HITTEST event handler
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -784,17 +784,17 @@ EventStateManager::PreHandleEvent(nsPres
 void
 EventStateManager::HandleQueryContentEvent(WidgetQueryContentEvent* aEvent)
 {
   switch (aEvent->mMessage) {
     case eQuerySelectedText:
     case eQueryTextContent:
     case eQueryCaretRect:
     case NS_QUERY_TEXT_RECT:
-    case NS_QUERY_EDITOR_RECT:
+    case eQueryEditorRect:
       if (!IsTargetCrossProcess(aEvent)) {
         break;
       }
       // Will not be handled locally, remote the event
       GetCrossProcessTarget()->HandleQueryContentEvent(*aEvent);
       return;
     // Following events have not been supported in e10s mode yet.
     case NS_QUERY_CONTENT_STATE:
--- a/dom/events/IMEContentObserver.cpp
+++ b/dom/events/IMEContentObserver.cpp
@@ -54,18 +54,18 @@ ToChar(EventMessage aEventMessage)
     case eQuerySelectedText:
       return "eQuerySelectedText";
     case eQueryTextContent:
       return "eQueryTextContent";
     case eQueryCaretRect:
       return "eQueryCaretRect";
     case NS_QUERY_TEXT_RECT:
       return "NS_QUERY_TEXT_RECT";
-    case NS_QUERY_EDITOR_RECT:
-      return "NS_QUERY_EDITOR_RECT";
+    case eQueryEditorRect:
+      return "eQueryEditorRect";
     case NS_QUERY_CONTENT_STATE:
       return "NS_QUERY_CONTENT_STATE";
     case eQuerySelectionAsTransferable:
       return "eQuerySelectionAsTransferable";
     case NS_QUERY_CHARACTER_AT_POINT:
       return "NS_QUERY_CHARACTER_AT_POINT";
     case NS_QUERY_DOM_WIDGET_HITTEST:
       return "NS_QUERY_DOM_WIDGET_HITTEST";
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -2366,17 +2366,17 @@ TabParent::HandleQueryContentEvent(Widge
   }
   if (NS_WARN_IF(!mContentCache.HandleQueryContentEvent(aEvent, widget)) ||
       NS_WARN_IF(!aEvent.mSucceeded)) {
     return true;
   }
   switch (aEvent.mMessage) {
     case NS_QUERY_TEXT_RECT:
     case eQueryCaretRect:
-    case NS_QUERY_EDITOR_RECT:
+    case eQueryEditorRect:
       aEvent.mReply.mRect -= GetChildProcessOffset();
       break;
     default:
       break;
   }
   return true;
 }
 
--- a/widget/ContentCache.cpp
+++ b/widget/ContentCache.cpp
@@ -246,17 +246,17 @@ ContentCacheInChild::CacheEditorRect(nsI
                                      const IMENotification* aNotification)
 {
   MOZ_LOG(sContentCacheLog, LogLevel::Info,
     ("ContentCacheInChild: 0x%p CacheEditorRect(aWidget=0x%p, "
      "aNotification=%s)",
      this, aWidget, GetNotificationName(aNotification)));
 
   nsEventStatus status = nsEventStatus_eIgnore;
-  WidgetQueryContentEvent editorRectEvent(true, NS_QUERY_EDITOR_RECT, aWidget);
+  WidgetQueryContentEvent editorRectEvent(true, eQueryEditorRect, aWidget);
   aWidget->DispatchEvent(&editorRectEvent, status);
   if (NS_WARN_IF(!editorRectEvent.mSucceeded)) {
     MOZ_LOG(sContentCacheLog, LogLevel::Error,
       ("ContentCacheInChild: 0x%p CacheEditorRect(), FAILED, "
        "couldn't retrieve the editor rect", this));
     return false;
   }
   mEditorRect = editorRectEvent.mReply.mRect;
@@ -660,20 +660,20 @@ ContentCacheInParent::HandleQueryContent
         return false;
       }
       aEvent.mReply.mOffset = aEvent.mInput.mOffset;
       MOZ_LOG(sContentCacheLog, LogLevel::Info,
         ("ContentCacheInParent: 0x%p HandleQueryContentEvent(), "
          "Succeeded, aEvent={ mReply={ mOffset=%u, mRect=%s } }",
          this, aEvent.mReply.mOffset, GetRectText(aEvent.mReply.mRect).get()));
       break;
-    case NS_QUERY_EDITOR_RECT:
+    case eQueryEditorRect:
       MOZ_LOG(sContentCacheLog, LogLevel::Info,
         ("ContentCacheInParent: 0x%p HandleQueryContentEvent("
-         "aEvent={ mMessage=NS_QUERY_EDITOR_RECT }, aWidget=0x%p)",
+         "aEvent={ mMessage=eQueryEditorRect }, aWidget=0x%p)",
          this, aWidget));
       aEvent.mReply.mRect = mEditorRect;
       MOZ_LOG(sContentCacheLog, LogLevel::Info,
         ("ContentCacheInParent: 0x%p HandleQueryContentEvent(), "
          "Succeeded, aEvent={ mReply={ mRect=%s } }",
          this, GetRectText(aEvent.mReply.mRect).get()));
       break;
     default:
--- a/widget/ContentCache.h
+++ b/widget/ContentCache.h
@@ -293,17 +293,17 @@ public:
    *  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 eQueryCaretRect, fail if cached offset isn't equals to input
    *
-   * For NS_QUERY_EDITOR_RECT, always success
+   * For eQueryEditorRect, always success
    */
   bool HandleQueryContentEvent(WidgetQueryContentEvent& aEvent,
                                nsIWidget* aWidget) const;
 
   /**
    * OnCompositionEvent() should be called before sending composition string.
    * This returns true if the event should be sent.  Otherwise, false.
    */
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -224,17 +224,17 @@ NS_EVENT_MESSAGE(eQueryTextContent,     
 // relative position from the top level widget.
 NS_EVENT_MESSAGE(eQueryCaretRect,               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
 // to top level widget coordinates
-NS_EVENT_MESSAGE(NS_QUERY_EDITOR_RECT,          eQueryContentEventFirst + 5)
+NS_EVENT_MESSAGE(eQueryEditorRect,              eQueryContentEventFirst + 5)
 // Query for the current state of the content. The particular members of
 // mReply that are set for each query content event will be valid on success.
 NS_EVENT_MESSAGE(NS_QUERY_CONTENT_STATE,        eQueryContentEventFirst + 6)
 // Query for the selection in the form of a nsITransferable.
 NS_EVENT_MESSAGE(eQuerySelectionAsTransferable, eQueryContentEventFirst + 7)
 // Query for character at a point.  This returns the character offset, its
 // rect and also tentative caret point if the point is clicked.  The point is
 // specified by Event::refPoint.
--- a/widget/windows/IMMHandler.cpp
+++ b/widget/windows/IMMHandler.cpp
@@ -1649,22 +1649,22 @@ IMMHandler::HandleQueryCharPosition(nsWi
   //     documented) and its horizontal width.  So, it might be better to set
   //     top-right corner of the character and horizontal width, but we're not
   //     sure if it doesn't cause any problems with a lot of IMEs...
   pCharPosition->pt.x = screenRect.x;
   pCharPosition->pt.y = screenRect.y;
 
   pCharPosition->cLineHeight = r.height;
 
-  WidgetQueryContentEvent editorRect(true, NS_QUERY_EDITOR_RECT, aWindow);
+  WidgetQueryContentEvent editorRect(true, eQueryEditorRect, aWindow);
   aWindow->InitEvent(editorRect);
   aWindow->DispatchWindowEvent(&editorRect);
   if (NS_WARN_IF(!editorRect.mSucceeded)) {
     MOZ_LOG(gIMMLog, LogLevel::Error,
-      ("IMM: HandleQueryCharPosition, NS_QUERY_EDITOR_RECT failed"));
+      ("IMM: HandleQueryCharPosition, eQueryEditorRect failed"));
     ::GetWindowRect(aWindow->GetWindowHandle(), &pCharPosition->rcDocument);
   } else {
     nsIntRect editorRectInWindow =
       LayoutDevicePixel::ToUntyped(editorRect.mReply.mRect);
     nsWindow* window = editorRect.mReply.mFocusedWidget ?
       static_cast<nsWindow*>(editorRect.mReply.mFocusedWidget) : aWindow;
     nsIntRect editorRectInScreen;
     ResolveIMECaretPos(window, editorRectInWindow, nullptr, editorRectInScreen);
@@ -2371,23 +2371,23 @@ IMMHandler::SetIMERelatedWindowsPos(nsWi
 
   return true;
 }
 
 void
 IMMHandler::SetIMERelatedWindowsPosOnPlugin(nsWindow* aWindow,
                                             const IMEContext& aContext)
 {
-  WidgetQueryContentEvent editorRectEvent(true, NS_QUERY_EDITOR_RECT, aWindow);
+  WidgetQueryContentEvent editorRectEvent(true, eQueryEditorRect, aWindow);
   aWindow->InitEvent(editorRectEvent);
   aWindow->DispatchWindowEvent(&editorRectEvent);
   if (!editorRectEvent.mSucceeded) {
     MOZ_LOG(gIMMLog, LogLevel::Info,
       ("IMM: SetIMERelatedWindowsPosOnPlugin, "
-       "FAILED, due to NS_QUERY_EDITOR_RECT failure"));
+       "FAILED, due to eQueryEditorRect failure"));
     return;
   }
 
   // Clip the plugin rect by the client rect of the window because composition
   // window needs to be specified the position in the client area.
   nsWindow* toplevelWindow = aWindow->GetTopLevelWindow(false);
   LayoutDeviceIntRect pluginRectInScreen =
     editorRectEvent.mReply.mRect + toplevelWindow->WidgetToScreenOffset();
--- a/widget/windows/TSFTextStore.cpp
+++ b/widget/windows/TSFTextStore.cpp
@@ -3690,23 +3690,23 @@ TSFTextStore::GetScreenExt(TsViewCookie 
 
 bool
 TSFTextStore::GetScreenExtInternal(RECT& aScreenExt)
 {
   MOZ_LOG(sTextStoreLog, LogLevel::Debug,
          ("TSF: 0x%p   TSFTextStore::GetScreenExtInternal()", this));
 
   // use NS_QUERY_EDITOR_RECT to get rect in system, screen coordinates
-  WidgetQueryContentEvent event(true, NS_QUERY_EDITOR_RECT, mWidget);
+  WidgetQueryContentEvent event(true, eQueryEditorRect, mWidget);
   mWidget->InitEvent(event);
   DispatchEvent(event);
   if (!event.mSucceeded) {
     MOZ_LOG(sTextStoreLog, LogLevel::Error,
            ("TSF: 0x%p   TSFTextStore::GetScreenExtInternal() FAILED due to "
-            "NS_QUERY_EDITOR_RECT failure", this));
+            "eQueryEditorRect failure", this));
     return false;
   }
 
   nsWindow* refWindow = static_cast<nsWindow*>(
     event.mReply.mFocusedWidget ?
       event.mReply.mFocusedWidget : mWidget);
   // Result rect is in top level widget coordinates
   refWindow = refWindow->GetTopLevelWindow(false);