Bug 895274 part.151 Rename NS_QUERY_SELECTION_AS_TRANSFERABLE to eQuerySelectionAsTransferable r=smaug

This commit is contained in:
Masayuki Nakano 2015-09-10 10:40:05 +09:00
Родитель 392171fad6
Коммит 07dbf0fd06
7 изменённых файлов: 17 добавлений и 18 удалений

Просмотреть файл

@ -808,7 +808,7 @@ ContentEventHandler::HandleQueryContentEvent(WidgetQueryContentEvent* aEvent)
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);

Просмотреть файл

@ -54,7 +54,7 @@ public:
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);

Просмотреть файл

@ -798,7 +798,7 @@ EventStateManager::HandleQueryContentEvent(WidgetQueryContentEvent* 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;

Просмотреть файл

@ -63,8 +63,8 @@ ToChar(EventMessage aEventMessage)
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:

Просмотреть файл

@ -212,36 +212,36 @@ 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)

Просмотреть файл

@ -588,7 +588,7 @@ public:
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;

Просмотреть файл

@ -6097,8 +6097,7 @@ PanGestureTypeForEvent(NSEvent* aEvent)
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)