Bug 895274 part.151 Rename NS_QUERY_SELECTION_AS_TRANSFERABLE to eQuerySelectionAsTransferable r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Thu, 10 Sep 2015 10:40:05 +0900
changeset 294297 aaf1002beb949b424841d3fef3c731b25820f600
parent 294296 4557cfecc20d65bc48fe43b6460038473fd4ed7d
child 294298 ec614033e8225b089920f84d43d5930a2bef93c9
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.151 Rename NS_QUERY_SELECTION_AS_TRANSFERABLE to eQuerySelectionAsTransferable r=smaug
dom/events/ContentEventHandler.cpp
dom/events/ContentEventHandler.h
dom/events/EventStateManager.cpp
dom/events/IMEContentObserver.cpp
widget/EventMessageList.h
widget/TextEvents.h
widget/cocoa/nsChildView.mm
--- a/dom/events/ContentEventHandler.cpp
+++ b/dom/events/ContentEventHandler.cpp
@@ -803,17 +803,17 @@ ContentEventHandler::HandleQueryContentE
     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:
       return OnQueryContentState(aEvent);
-    case NS_QUERY_SELECTION_AS_TRANSFERABLE:
+    case eQuerySelectionAsTransferable:
       return OnQuerySelectionAsTransferable(aEvent);
     case NS_QUERY_CHARACTER_AT_POINT:
       return OnQueryCharacterAtPoint(aEvent);
     case NS_QUERY_DOM_WIDGET_HITTEST:
       return OnQueryDOMWidgetHittest(aEvent);
     default:
       return NS_ERROR_NOT_IMPLEMENTED;
   }
--- a/dom/events/ContentEventHandler.h
+++ b/dom/events/ContentEventHandler.h
@@ -49,17 +49,17 @@ public:
   // 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
   nsresult OnQueryContentState(WidgetQueryContentEvent* aEvent);
-  // NS_QUERY_SELECTION_AS_TRANSFERABLE event handler
+  // 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
   nsresult OnQueryDOMWidgetHittest(WidgetQueryContentEvent* aEvent);
 
   // NS_SELECTION_* event
   nsresult OnSelectionEvent(WidgetSelectionEvent* aEvent);
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -793,17 +793,17 @@ EventStateManager::HandleQueryContentEve
       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:
-    case NS_QUERY_SELECTION_AS_TRANSFERABLE:
+    case eQuerySelectionAsTransferable:
     case NS_QUERY_CHARACTER_AT_POINT:
     case NS_QUERY_DOM_WIDGET_HITTEST:
       break;
     default:
       return;
   }
 
   // If there is an IMEContentObserver, we need to handle QueryContentEvent
--- a/dom/events/IMEContentObserver.cpp
+++ b/dom/events/IMEContentObserver.cpp
@@ -58,18 +58,18 @@ ToChar(EventMessage aEventMessage)
     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";
-    case NS_QUERY_SELECTION_AS_TRANSFERABLE:
-      return "NS_QUERY_SELECTION_AS_TRANSFERABLE";
+    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";
     default:
       return "Unsupprted message";
   }
 }
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -207,46 +207,46 @@ NS_EVENT_MESSAGE(eXULCommand,           
 
 // Cut, copy, paste events
 NS_EVENT_MESSAGE(eClipboardEventFirst,  3100)
 NS_EVENT_MESSAGE(eCopy,                 eClipboardEventFirst)
 NS_EVENT_MESSAGE(eCut,                  eClipboardEventFirst + 1)
 NS_EVENT_MESSAGE(ePaste,                eClipboardEventFirst + 2)
 
 // Query the content information
-NS_EVENT_MESSAGE(eQueryContentEventFirst,            3200)
+NS_EVENT_MESSAGE(eQueryContentEventFirst,       3200)
 // Query for the selected text information, it return the selection offset,
 // selection length and selected text.
-NS_EVENT_MESSAGE(NS_QUERY_SELECTED_TEXT,             eQueryContentEventFirst)
+NS_EVENT_MESSAGE(NS_QUERY_SELECTED_TEXT,        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(NS_QUERY_TEXT_CONTENT,         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)
+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)
+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(NS_QUERY_EDITOR_RECT,          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)
+NS_EVENT_MESSAGE(NS_QUERY_CONTENT_STATE,        eQueryContentEventFirst + 6)
 // Query for the selection in the form of a nsITransferable.
-NS_EVENT_MESSAGE(NS_QUERY_SELECTION_AS_TRANSFERABLE, eQueryContentEventFirst + 7)
+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.
-NS_EVENT_MESSAGE(NS_QUERY_CHARACTER_AT_POINT,        eQueryContentEventFirst + 8)
+NS_EVENT_MESSAGE(NS_QUERY_CHARACTER_AT_POINT,   eQueryContentEventFirst + 8)
 // Query if the DOM element under Event::refPoint belongs to our widget
 // or not.
-NS_EVENT_MESSAGE(NS_QUERY_DOM_WIDGET_HITTEST,        eQueryContentEventFirst + 9)
+NS_EVENT_MESSAGE(NS_QUERY_DOM_WIDGET_HITTEST,   eQueryContentEventFirst + 9)
 
 // Video events
 NS_EVENT_MESSAGE(eMediaEventFirst,      3300)
 NS_EVENT_MESSAGE(eLoadStart,            eMediaEventFirst)
 NS_EVENT_MESSAGE(eProgress,             eMediaEventFirst + 1)
 NS_EVENT_MESSAGE(eSuspend,              eMediaEventFirst + 2)
 NS_EVENT_MESSAGE(eEmptied,              eMediaEventFirst + 3)
 NS_EVENT_MESSAGE(eStalled,              eMediaEventFirst + 4)
--- a/widget/TextEvents.h
+++ b/widget/TextEvents.h
@@ -583,17 +583,17 @@ public:
     uint32_t mTentativeCaretOffset;
     nsString mString;
     // 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 NS_QUERY_SELECTION_AS_TRANSFERABLE
+    // Used by eQuerySelectionAsTransferable
     nsCOMPtr<nsITransferable> mTransferable;
     // used by NS_QUERY_TEXT_CONTENT 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
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -6092,18 +6092,17 @@ PanGestureTypeForEvent(NSEvent* aEvent)
       [types containsObject:NSHTMLPboardType] == NO)
     return NO;
 
   // Bail out if there is no Gecko object.
   if (!mGeckoChild)
     return NO;
 
   // Obtain the current selection.
-  WidgetQueryContentEvent event(true,
-                                NS_QUERY_SELECTION_AS_TRANSFERABLE,
+  WidgetQueryContentEvent event(true, eQuerySelectionAsTransferable,
                                 mGeckoChild);
   mGeckoChild->DispatchWindowEvent(event);
   if (!event.mSucceeded || !event.mReply.mTransferable)
     return NO;
 
   // Transform the transferable to an NSDictionary.
   NSDictionary* pasteboardOutputDict = nsClipboard::PasteboardDictFromTransferable(event.mReply.mTransferable);
   if (!pasteboardOutputDict)