Backed out changeset af0d7fedc60f (bug 1162050)

This commit is contained in:
Carsten "Tomcat" Book 2016-07-11 11:18:45 +02:00
Родитель 50ea69d1c5
Коммит 287942807f
2 изменённых файлов: 11 добавлений и 5 удалений

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

@ -1784,7 +1784,9 @@ EventStateManager::GenerateDragGesture(nsPresContext* aPresContext,
// Set the current target to the content for the mouse down
mCurrentTargetContent = targetContent;
// Dispatch the dragstart event to the DOM.
// 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.
nsEventStatus status = nsEventStatus_eIgnore;
EventDispatcher::Dispatch(targetContent, aPresContext, &startEvent,
nullptr, &status);
@ -1801,7 +1803,7 @@ EventStateManager::GenerateDragGesture(nsPresContext* aPresContext,
}
// now that the dataTransfer has been updated in the dragstart and
// draggesture events, make it read only so that the data doesn't
// draggesture events, make it readonly so that the data doesn't
// change during the drag.
dataTransfer->SetReadOnly();
@ -1814,6 +1816,10 @@ 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;
}
@ -1918,7 +1924,7 @@ EventStateManager::DoDefaultDragStart(nsPresContext* aPresContext,
if (!dragService)
return false;
// Default handling for the dragstart event.
// Default handling for the draggesture/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 event and set up a
* Perform the default handling for the dragstart/draggesture event and set up a
* drag for aDataTransfer if it contains any data. Returns true if a drag has
* started.
*
* aDragEvent - the dragstart event
* aDragEvent - the dragstart/draggesture event
* aDataTransfer - the data transfer that holds the data to be dragged
* aDragTarget - the target of the drag
* aSelection - the selection to be dragged