Bug 1256162, use last drag target for dragexit event when comparing to a remote browser, r=smaug
authorNeil Deakin <neil@mozilla.com>
Fri, 18 Mar 2016 15:45:46 -0400
changeset 289400 e52f19e73317d1e009b171ee137d7185c3bf9fda
parent 289399 e4719dd204d128686f9063bcd8a9a44e82d83e65
child 289401 d51de0a1c9ba083275bd8bcb9acc152391361453
push id30102
push userryanvm@gmail.com
push dateSat, 19 Mar 2016 15:23:17 +0000
treeherdermozilla-central@720fb3d55e28 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1256162
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 1256162, use last drag target for dragexit event when comparing to a remote browser, r=smaug
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