Bug 1256162 - use last drag target for dragexit event when comparing to a remote browser. r=smaug, a=ritu
authorNeil Deakin <neil@mozilla.com>
Fri, 18 Mar 2016 15:45:46 -0400
changeset 325789 6dd378769cc5366ce32c810653adeb52d0792b72
parent 325788 80ee357092b5dfc37cec4127c30075ce2ccfc9a3
child 325790 f4cacfbeef6bdcecc07fcc5c20d2c53d3f9b6e7b
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, ritu
bugs1256162
milestone47.0a2
Bug 1256162 - use last drag target for dragexit event when comparing to a remote browser. r=smaug, a=ritu
dom/events/EventStateManager.cpp
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -1291,17 +1291,18 @@ EventStateManager::HandleCrossProcessEve
   // Collect the remote event targets we're going to forward this
   // event to.
   //
   // NB: the elements of |targets| must be unique, for correctness.
   AutoTArray<nsCOMPtr<nsIContent>, 1> targets;
   if (aEvent->mClass != eTouchEventClass || aEvent->mMessage == eTouchStart) {
     // If this event only has one target, and it's remote, add it to
     // the array.
-    nsIFrame* frame = GetEventTarget();
+    nsIFrame* frame =
+      aEvent->mMessage == eDragExit ? sLastDragOverFrame.GetFrame() : GetEventTarget();
     nsIContent* target = frame ? frame->GetContent() : nullptr;
     if (IsRemoteTarget(target)) {
       targets.AppendElement(target);
     }
   } else {
     // This is a touch event with possibly multiple touch points.
     // Each touch point may have its own target.  So iterate through
     // all of them and collect the unique set of targets for event