зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1162050 - Remove draggesture and eLegacyDragDrop from comments in EventStateManager.cpp/.h. r=enn
MozReview-Commit-ID: FXErW3vo36q --HG-- extra : rebase_source : b57895e5e15f641ce679b0f3082868c397b635c9
This commit is contained in:
Родитель
39278a5bb6
Коммит
81ebc7d712
|
@ -710,8 +710,7 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
|
|||
}
|
||||
break;
|
||||
case eDragOver:
|
||||
// eDrop is fired before eLegacyDragDrop so send the enter/exit events
|
||||
// before eDrop.
|
||||
// Send the enter/exit events before eDrop.
|
||||
GenerateDragDropEnterExit(aPresContext, aEvent->AsDragEvent());
|
||||
break;
|
||||
|
||||
|
@ -1784,9 +1783,7 @@ EventStateManager::GenerateDragGesture(nsPresContext* aPresContext,
|
|||
// Set the current target to the content for the mouse down
|
||||
mCurrentTargetContent = targetContent;
|
||||
|
||||
// Dispatch both the dragstart and draggesture events to the DOM. For
|
||||
// elements in an editor, only fire the draggesture event so that the
|
||||
// editor code can handle it but content doesn't see a dragstart.
|
||||
// Dispatch the dragstart event to the DOM.
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
EventDispatcher::Dispatch(targetContent, aPresContext, &startEvent,
|
||||
nullptr, &status);
|
||||
|
@ -1803,7 +1800,7 @@ EventStateManager::GenerateDragGesture(nsPresContext* aPresContext,
|
|||
}
|
||||
|
||||
// now that the dataTransfer has been updated in the dragstart and
|
||||
// draggesture events, make it readonly so that the data doesn't
|
||||
// draggesture events, make it read only so that the data doesn't
|
||||
// change during the drag.
|
||||
dataTransfer->SetReadOnly();
|
||||
|
||||
|
@ -1816,10 +1813,6 @@ EventStateManager::GenerateDragGesture(nsPresContext* aPresContext,
|
|||
}
|
||||
}
|
||||
|
||||
// Note that frame event handling doesn't care about eLegacyDragGesture,
|
||||
// which is just as well since we don't really know which frame to
|
||||
// send it to
|
||||
|
||||
// Reset mCurretTargetContent to what it was
|
||||
mCurrentTargetContent = targetBeforeEvent;
|
||||
}
|
||||
|
@ -1924,7 +1917,7 @@ EventStateManager::DoDefaultDragStart(nsPresContext* aPresContext,
|
|||
if (!dragService)
|
||||
return false;
|
||||
|
||||
// Default handling for the draggesture/dragstart event.
|
||||
// Default handling for the dragstart event.
|
||||
//
|
||||
// First, check if a drag session already exists. This means that the drag
|
||||
// service was called directly within a draggesture handler. In this case,
|
||||
|
|
|
@ -855,11 +855,11 @@ protected:
|
|||
nsIContent** aTargetNode);
|
||||
|
||||
/*
|
||||
* Perform the default handling for the dragstart/draggesture event and set up a
|
||||
* Perform the default handling for the dragstart event and set up a
|
||||
* drag for aDataTransfer if it contains any data. Returns true if a drag has
|
||||
* started.
|
||||
*
|
||||
* aDragEvent - the dragstart/draggesture event
|
||||
* aDragEvent - the dragstart event
|
||||
* aDataTransfer - the data transfer that holds the data to be dragged
|
||||
* aDragTarget - the target of the drag
|
||||
* aSelection - the selection to be dragged
|
||||
|
|
Загрузка…
Ссылка в новой задаче