b=634719 don't start a new source drag session until the previous has completed r=roc

--HG--
extra : rebase_source : 1165a447cf141b5ec34446e6e95ab66f815168f7
This commit is contained in:
Karl Tomlinson 2012-04-19 18:18:31 +12:00
parent 8b437d0f6b
commit 93c7e9aad7

View File

@ -317,6 +317,14 @@ nsDragService::InvokeDragSession(nsIDOMNode *aDOMNode,
PRUint32 aActionType)
{
PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService::InvokeDragSession"));
// If the previous source drag has not yet completed, signal handlers need
// to be removed from mGrabWidget and dragend needs to be dispatched to
// the source node, but we can't call EndDragSession yet because we don't
// know whether or not the drag succeeded.
if (mSourceNode)
return NS_ERROR_NOT_AVAILABLE;
nsresult rv = nsBaseDragService::InvokeDragSession(aDOMNode,
aArrayTransferables,
aRegion, aActionType);