mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 895274 part.162 Rename NS_CONTENT_COMMAND_PASTE_TRANSFERABLE to eContentCommandPasteTransferable r=smaug
This commit is contained in:
parent
c01a2861fb
commit
3b09f585eb
@ -2068,12 +2068,12 @@ nsDOMWindowUtils::SendContentCommandEvent(const nsAString& aType,
|
||||
else if (aType.EqualsLiteral("redo"))
|
||||
msg = NS_CONTENT_COMMAND_REDO;
|
||||
else if (aType.EqualsLiteral("pasteTransferable"))
|
||||
msg = NS_CONTENT_COMMAND_PASTE_TRANSFERABLE;
|
||||
msg = eContentCommandPasteTransferable;
|
||||
else
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
WidgetContentCommandEvent event(true, msg, widget);
|
||||
if (msg == NS_CONTENT_COMMAND_PASTE_TRANSFERABLE) {
|
||||
if (msg == eContentCommandPasteTransferable) {
|
||||
event.mTransferable = aTransferable;
|
||||
}
|
||||
|
||||
|
@ -753,10 +753,8 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
|
||||
case NS_CONTENT_COMMAND_DELETE:
|
||||
case NS_CONTENT_COMMAND_UNDO:
|
||||
case NS_CONTENT_COMMAND_REDO:
|
||||
case NS_CONTENT_COMMAND_PASTE_TRANSFERABLE:
|
||||
{
|
||||
DoContentCommandEvent(aEvent->AsContentCommandEvent());
|
||||
}
|
||||
case eContentCommandPasteTransferable:
|
||||
DoContentCommandEvent(aEvent->AsContentCommandEvent());
|
||||
break;
|
||||
case NS_CONTENT_COMMAND_SCROLL:
|
||||
{
|
||||
@ -5057,7 +5055,7 @@ EventStateManager::DoContentCommandEvent(WidgetContentCommandEvent* aEvent)
|
||||
case NS_CONTENT_COMMAND_REDO:
|
||||
cmd = "cmd_redo";
|
||||
break;
|
||||
case NS_CONTENT_COMMAND_PASTE_TRANSFERABLE:
|
||||
case eContentCommandPasteTransferable:
|
||||
cmd = "cmd_pasteTransferable";
|
||||
break;
|
||||
default:
|
||||
@ -5077,7 +5075,7 @@ EventStateManager::DoContentCommandEvent(WidgetContentCommandEvent* aEvent)
|
||||
aEvent->mIsEnabled = canDoIt;
|
||||
if (canDoIt && !aEvent->mOnlyEnabledCheck) {
|
||||
switch (aEvent->mMessage) {
|
||||
case NS_CONTENT_COMMAND_PASTE_TRANSFERABLE: {
|
||||
case eContentCommandPasteTransferable: {
|
||||
nsCOMPtr<nsICommandController> commandController = do_QueryInterface(controller);
|
||||
NS_ENSURE_STATE(commandController);
|
||||
|
||||
|
@ -299,21 +299,21 @@ NS_EVENT_MESSAGE(eSelectionEventFirst, 3700)
|
||||
NS_EVENT_MESSAGE(eSetSelection, eSelectionEventFirst)
|
||||
|
||||
// Events of commands for the contents
|
||||
NS_EVENT_MESSAGE(eContentCommandEventFirst, 3800)
|
||||
NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_CUT, eContentCommandEventFirst)
|
||||
NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_COPY, eContentCommandEventFirst + 1)
|
||||
NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_PASTE, eContentCommandEventFirst + 2)
|
||||
NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_DELETE, eContentCommandEventFirst + 3)
|
||||
NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_UNDO, eContentCommandEventFirst + 4)
|
||||
NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_REDO, eContentCommandEventFirst + 5)
|
||||
NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_PASTE_TRANSFERABLE, eContentCommandEventFirst + 6)
|
||||
NS_EVENT_MESSAGE(eContentCommandEventFirst, 3800)
|
||||
NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_CUT, eContentCommandEventFirst)
|
||||
NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_COPY, eContentCommandEventFirst + 1)
|
||||
NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_PASTE, eContentCommandEventFirst + 2)
|
||||
NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_DELETE, eContentCommandEventFirst + 3)
|
||||
NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_UNDO, eContentCommandEventFirst + 4)
|
||||
NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_REDO, eContentCommandEventFirst + 5)
|
||||
NS_EVENT_MESSAGE(eContentCommandPasteTransferable, eContentCommandEventFirst + 6)
|
||||
// NS_CONTENT_COMMAND_SCROLL scrolls the nearest scrollable element to the
|
||||
// currently focused content or latest DOM selection. This would normally be
|
||||
// the same element scrolled by keyboard scroll commands, except that this event
|
||||
// will scroll an element scrollable in either direction. I.e., if the nearest
|
||||
// scrollable ancestor element can only be scrolled vertically, and horizontal
|
||||
// scrolling is requested using this event, no scrolling will occur.
|
||||
NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_SCROLL, eContentCommandEventFirst + 7)
|
||||
NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_SCROLL, eContentCommandEventFirst + 7)
|
||||
|
||||
// Event to gesture notification
|
||||
NS_EVENT_MESSAGE(NS_GESTURENOTIFY_EVENT_START, 3900)
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// NS_CONTENT_COMMAND_PASTE_TRANSFERABLE
|
||||
// eContentCommandPasteTransferable
|
||||
nsCOMPtr<nsITransferable> mTransferable; // [in]
|
||||
|
||||
// NS_CONTENT_COMMAND_SCROLL
|
||||
|
@ -6058,7 +6058,7 @@ PanGestureTypeForEvent(NSEvent* aEvent)
|
||||
// Determine if we can paste (if receiving data from the service).
|
||||
if (mGeckoChild && returnType) {
|
||||
WidgetContentCommandEvent command(true,
|
||||
NS_CONTENT_COMMAND_PASTE_TRANSFERABLE,
|
||||
eContentCommandPasteTransferable,
|
||||
mGeckoChild, true);
|
||||
// This might possibly destroy our widget (and null out mGeckoChild).
|
||||
mGeckoChild->DispatchWindowEvent(command);
|
||||
@ -6156,7 +6156,7 @@ PanGestureTypeForEvent(NSEvent* aEvent)
|
||||
NS_ENSURE_TRUE(mGeckoChild, false);
|
||||
|
||||
WidgetContentCommandEvent command(true,
|
||||
NS_CONTENT_COMMAND_PASTE_TRANSFERABLE,
|
||||
eContentCommandPasteTransferable,
|
||||
mGeckoChild);
|
||||
command.mTransferable = trans;
|
||||
mGeckoChild->DispatchWindowEvent(command);
|
||||
|
Loading…
Reference in New Issue
Block a user