Bug 1162050 - remove instances of eLegacyDragDrop and dragdrop. r=enn
authorJimmy Wang <jimmyw22@gmail.com>
Fri, 27 May 2016 16:54:36 -0400
changeset 304678 48f290424a78912c3702a7e621af4bd9153a9596
parent 304677 35a52f3701397a79ce17cbdb5895faf4a34e3bb9
child 304679 dfd94f28c5734d3b404232b310b82617040cce9d
push id30437
push userkwierso@gmail.com
push dateTue, 12 Jul 2016 22:24:39 +0000
treeherdermozilla-central@53947432322b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersenn
bugs1162050
milestone50.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 1162050 - remove instances of eLegacyDragDrop and dragdrop. r=enn MozReview-Commit-ID: Di41WT8zcZ1
dom/base/nsContentUtils.cpp
dom/base/nsGkAtomList.h
dom/events/DataTransfer.cpp
dom/events/EventNameList.h
dom/plugins/base/nsPluginInstanceOwner.cpp
widget/EventMessageList.h
widget/WidgetEventImpl.cpp
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -5392,18 +5392,17 @@ nsContentUtils::SetDataTransferInEvent(W
     initialDataTransfer =
       new DataTransfer(aDragEvent->mTarget, aDragEvent->mMessage, true, -1);
 
     // now set it in the drag session so we don't need to create it again
     dragSession->SetDataTransfer(initialDataTransfer);
   }
 
   bool isCrossDomainSubFrameDrop = false;
-  if (aDragEvent->mMessage == eDrop ||
-      aDragEvent->mMessage == eLegacyDragDrop) {
+  if (aDragEvent->mMessage == eDrop) {
     isCrossDomainSubFrameDrop = CheckForSubFrameDrop(dragSession, aDragEvent);
   }
 
   // each event should use a clone of the original dataTransfer.
   initialDataTransfer->Clone(aDragEvent->mTarget, aDragEvent->mMessage,
                              aDragEvent->mUserCancelled,
                              isCrossDomainSubFrameDrop,
                              getter_AddRefs(aDragEvent->mDataTransfer));
@@ -5417,17 +5416,16 @@ nsContentUtils::SetDataTransferInEvent(W
   if (aDragEvent->mMessage == eDragEnter || aDragEvent->mMessage == eDragOver) {
     uint32_t action, effectAllowed;
     dragSession->GetDragAction(&action);
     aDragEvent->mDataTransfer->GetEffectAllowedInt(&effectAllowed);
     aDragEvent->mDataTransfer->SetDropEffectInt(
                                  FilterDropEffect(action, effectAllowed));
   }
   else if (aDragEvent->mMessage == eDrop ||
-           aDragEvent->mMessage == eLegacyDragDrop ||
            aDragEvent->mMessage == eDragEnd) {
     // For the drop and dragend events, set the drop effect based on the
     // last value that the dropEffect had. This will have been set in
     // EventStateManager::PostHandleEvent for the last dragenter or
     // dragover event.
     uint32_t dropEffect;
     initialDataTransfer->GetDropEffectInt(&dropEffect);
     aDragEvent->mDataTransfer->SetDropEffectInt(dropEffect);
--- a/dom/base/nsGkAtomList.h
+++ b/dom/base/nsGkAtomList.h
@@ -323,17 +323,16 @@ GK_ATOM(DOMAttrModified, "DOMAttrModifie
 GK_ATOM(DOMCharacterDataModified, "DOMCharacterDataModified")
 GK_ATOM(DOMNodeInserted, "DOMNodeInserted")
 GK_ATOM(DOMNodeInsertedIntoDocument, "DOMNodeInsertedIntoDocument")
 GK_ATOM(DOMNodeRemoved, "DOMNodeRemoved")
 GK_ATOM(DOMNodeRemovedFromDocument, "DOMNodeRemovedFromDocument")
 GK_ATOM(DOMSubtreeModified, "DOMSubtreeModified")
 GK_ATOM(double_, "double")
 GK_ATOM(drag, "drag")
-GK_ATOM(dragdrop, "dragdrop")
 GK_ATOM(dragend, "dragend")
 GK_ATOM(dragenter, "dragenter")
 GK_ATOM(dragevent, "dragevent")
 GK_ATOM(dragexit, "dragexit")
 GK_ATOM(draggable, "draggable")
 GK_ATOM(dragging, "dragging")
 GK_ATOM(dragleave, "dragleave")
 GK_ATOM(dragover, "dragover")
--- a/dom/events/DataTransfer.cpp
+++ b/dom/events/DataTransfer.cpp
@@ -611,18 +611,17 @@ DataTransfer::GetDataAtInternal(const ns
 
   // Check if the caller is allowed to access the drag data. Callers with
   // chrome privileges can always read the data. During the
   // drop event, allow retrieving the data except in the case where the
   // source of the drag is in a child frame of the caller. In that case,
   // we only allow access to data of the same principal. During other events,
   // only allow access to the data with the same principal.
   bool checkFormatItemPrincipal = mIsCrossDomainSubFrameDrop ||
-      (mEventMessage != eDrop && mEventMessage != eLegacyDragDrop &&
-       mEventMessage != ePaste);
+      (mEventMessage != eDrop && mEventMessage != ePaste);
   MOZ_ASSERT(aSubjectPrincipal);
 
   RefPtr<DataTransferItem> item = mItems->MozItemByTypeAt(format, aIndex);
   if (!item) {
     // The index exists but there's no data for the specified format, in this
     // case we just return undefined
     return NS_OK;
   }
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -769,20 +769,16 @@ NON_IDL_EVENT(broadcast,
 NON_IDL_EVENT(commandupdate,
               eXULCommandUpdate,
               EventNameType_XUL,
               eBasicEventClass)
 NON_IDL_EVENT(dragexit,
               eDragExit,
               EventNameType_XUL,
               eDragEventClass)
-NON_IDL_EVENT(dragdrop,
-              eLegacyDragDrop,
-              EventNameType_XUL,
-              eDragEventClass)
 NON_IDL_EVENT(overflow,
               eScrollPortOverflow,
               EventNameType_XUL,
               eBasicEventClass)
 NON_IDL_EVENT(underflow,
               eScrollPortUnderflow,
               EventNameType_XUL,
               eBasicEventClass)
--- a/dom/plugins/base/nsPluginInstanceOwner.cpp
+++ b/dom/plugins/base/nsPluginInstanceOwner.cpp
@@ -2901,17 +2901,16 @@ nsPluginInstanceOwner::Destroy()
   content->RemoveEventListener(NS_LITERAL_STRING("click"), this, false);
   content->RemoveEventListener(NS_LITERAL_STRING("dblclick"), this, false);
   content->RemoveEventListener(NS_LITERAL_STRING("mouseover"), this, false);
   content->RemoveEventListener(NS_LITERAL_STRING("mouseout"), this, false);
   content->RemoveEventListener(NS_LITERAL_STRING("keypress"), this, true);
   content->RemoveEventListener(NS_LITERAL_STRING("keydown"), this, true);
   content->RemoveEventListener(NS_LITERAL_STRING("keyup"), this, true);
   content->RemoveEventListener(NS_LITERAL_STRING("drop"), this, true);
-  content->RemoveEventListener(NS_LITERAL_STRING("dragdrop"), this, true);
   content->RemoveEventListener(NS_LITERAL_STRING("drag"), this, true);
   content->RemoveEventListener(NS_LITERAL_STRING("dragenter"), this, true);
   content->RemoveEventListener(NS_LITERAL_STRING("dragover"), this, true);
   content->RemoveEventListener(NS_LITERAL_STRING("dragleave"), this, true);
   content->RemoveEventListener(NS_LITERAL_STRING("dragexit"), this, true);
   content->RemoveEventListener(NS_LITERAL_STRING("dragstart"), this, true);
   content->RemoveEventListener(NS_LITERAL_STRING("dragend"), this, true);
   content->RemoveSystemEventListener(NS_LITERAL_STRING("compositionstart"),
@@ -3300,17 +3299,16 @@ nsresult nsPluginInstanceOwner::Init(nsI
   aContent->AddEventListener(NS_LITERAL_STRING("mouseover"), this, false,
                              false);
   aContent->AddEventListener(NS_LITERAL_STRING("mouseout"), this, false,
                              false);
   aContent->AddEventListener(NS_LITERAL_STRING("keypress"), this, true);
   aContent->AddEventListener(NS_LITERAL_STRING("keydown"), this, true);
   aContent->AddEventListener(NS_LITERAL_STRING("keyup"), this, true);
   aContent->AddEventListener(NS_LITERAL_STRING("drop"), this, true);
-  aContent->AddEventListener(NS_LITERAL_STRING("dragdrop"), this, true);
   aContent->AddEventListener(NS_LITERAL_STRING("drag"), this, true);
   aContent->AddEventListener(NS_LITERAL_STRING("dragenter"), this, true);
   aContent->AddEventListener(NS_LITERAL_STRING("dragover"), this, true);
   aContent->AddEventListener(NS_LITERAL_STRING("dragleave"), this, true);
   aContent->AddEventListener(NS_LITERAL_STRING("dragexit"), this, true);
   aContent->AddEventListener(NS_LITERAL_STRING("dragstart"), this, true);
   aContent->AddEventListener(NS_LITERAL_STRING("dragend"), this, true);
   aContent->AddSystemEventListener(NS_LITERAL_STRING("compositionstart"),
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -126,17 +126,16 @@ NS_EVENT_MESSAGE(eFormInvalid)
 
 //Need separate focus/blur notifications for non-native widgets
 NS_EVENT_MESSAGE(eFocus)
 NS_EVENT_MESSAGE(eBlur)
 
 NS_EVENT_MESSAGE(eDragEnter)
 NS_EVENT_MESSAGE(eDragOver)
 NS_EVENT_MESSAGE(eDragExit)
-NS_EVENT_MESSAGE(eLegacyDragDrop)
 NS_EVENT_MESSAGE(eDrag)
 NS_EVENT_MESSAGE(eDragEnd)
 NS_EVENT_MESSAGE(eDragStart)
 NS_EVENT_MESSAGE(eDrop)
 NS_EVENT_MESSAGE(eDragLeave)
 NS_EVENT_MESSAGE_FIRST_LAST(eDragDropEvent, eDragEnter, eDragLeave)
 
 // XUL specific events
--- a/widget/WidgetEventImpl.cpp
+++ b/widget/WidgetEventImpl.cpp
@@ -208,17 +208,16 @@ WidgetEvent::HasMouseEventMessage() cons
 
 bool
 WidgetEvent::HasDragEventMessage() const
 {
   switch (mMessage) {
     case eDragEnter:
     case eDragOver:
     case eDragExit:
-    case eLegacyDragDrop:
     case eDrag:
     case eDragEnd:
     case eDragStart:
     case eDrop:
     case eDragLeave:
       return true;
     default:
       return false;