Bug 1256952 - send a dragexit at remote process when leaving the remote frame. r=smaug, a=ritu
☠☠ backed out by 39fe246bce0f ☠ ☠
authorNeil Deakin <neil@mozilla.com>
Wed, 06 Apr 2016 10:35:39 -0400
changeset 323893 86fe93b28b17a32934b874bfe963b47e322a80cf
parent 323892 71cedf188b34d56d1e7e98ad3bfa93d7819eba4a
child 323894 82a2aaaabc065c555634b01bf012d8ca8a83672c
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, ritu
bugs1256952
milestone47.0a2
Bug 1256952 - send a dragexit at remote process when leaving the remote frame. r=smaug, a=ritu
dom/events/EventStateManager.cpp
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -4532,16 +4532,23 @@ EventStateManager::FireDragEnterOrExit(n
         aMessage == eDragEnter) {
       UpdateDragDataTransfer(&event);
     }
   }
 
   // Finally dispatch the event to the frame
   if (aTargetFrame)
     aTargetFrame->HandleEvent(aPresContext, &event, &status);
+
+  if (aMessage == eDragExit && IsRemoteTarget(aTargetContent)) {
+    nsEventStatus status = nsEventStatus_eIgnore;
+    WidgetDragEvent remoteEvent(aDragEvent->IsTrusted(), aMessage, aDragEvent->widget);
+    remoteEvent.AssignDragEventData(*aDragEvent, true);
+    HandleCrossProcessEvent(&remoteEvent, &status);
+  }
 }
 
 void
 EventStateManager::UpdateDragDataTransfer(WidgetDragEvent* dragEvent)
 {
   NS_ASSERTION(dragEvent, "drag event is null in UpdateDragDataTransfer!");
   if (!dragEvent->dataTransfer)
     return;