Bug 1256952, send a dragexit at remote process when leaving the remote frame, r=smaug
authorNeil Deakin <neil@mozilla.com>
Wed, 06 Apr 2016 10:35:39 -0400
changeset 291890 aa65acd9650aa99e5452dd7344ff06d387c6e3f9
parent 291889 305f923c6f9c953518c9e8bcfb70bcae3c7f8af8
child 291891 70e457189e30e11a8d059a27fbb0a442554a93aa
push id74715
push userneil@mozilla.com
push dateWed, 06 Apr 2016 14:36:36 +0000
treeherdermozilla-inbound@aa65acd9650a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1256952
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1256952, send a dragexit at remote process when leaving the remote frame, r=smaug
dom/events/EventStateManager.cpp
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -4512,16 +4512,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->mDataTransfer) {
     return;