diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp index ddf00a6aeb96..eece10335fbe 100644 --- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -4945,12 +4945,9 @@ nsContentUtils::SetDataTransferInEvent(nsDragEvent* aDragEvent) // A dataTransfer won't exist when a drag was started by some other // means, for instance calling the drag service directly, or a drag // from another application. In either case, a new dataTransfer should - // be created that reflects the data. Pass true to the constructor for - // the aIsExternal argument, so that only system access is allowed. - PRUint32 action = 0; - dragSession->GetDragAction(&action); + // be created that reflects the data. initialDataTransfer = - new nsDOMDataTransfer(aDragEvent->message, action); + new nsDOMDataTransfer(aDragEvent->message); NS_ENSURE_TRUE(initialDataTransfer, NS_ERROR_OUT_OF_MEMORY); // now set it in the drag session so we don't need to create it again diff --git a/content/events/src/nsDOMDataTransfer.cpp b/content/events/src/nsDOMDataTransfer.cpp index 98c6b7696bef..d49a2bc740d8 100644 --- a/content/events/src/nsDOMDataTransfer.cpp +++ b/content/events/src/nsDOMDataTransfer.cpp @@ -84,9 +84,10 @@ nsDOMDataTransfer::nsDOMDataTransfer() { } -nsDOMDataTransfer::nsDOMDataTransfer(PRUint32 aEventType, PRUint32 aAction) +nsDOMDataTransfer::nsDOMDataTransfer(PRUint32 aEventType) : mEventType(aEventType), mDropEffect(nsIDragService::DRAGDROP_ACTION_NONE), + mEffectAllowed(nsIDragService::DRAGDROP_ACTION_UNINITIALIZED), mCursorState(PR_FALSE), mReadOnly(PR_TRUE), mIsExternal(PR_TRUE), @@ -94,11 +95,6 @@ nsDOMDataTransfer::nsDOMDataTransfer(PRUint32 aEventType, PRUint32 aAction) mDragImageX(0), mDragImageY(0) { - mEffectAllowed = aAction & - (nsIDragService::DRAGDROP_ACTION_COPY | - nsIDragService::DRAGDROP_ACTION_LINK | - nsIDragService::DRAGDROP_ACTION_MOVE); - CacheExternalFormats(); } diff --git a/content/events/src/nsDOMDataTransfer.h b/content/events/src/nsDOMDataTransfer.h index 54cd9acbb6d6..dc4a1bbed5bc 100644 --- a/content/events/src/nsDOMDataTransfer.h +++ b/content/events/src/nsDOMDataTransfer.h @@ -93,7 +93,7 @@ protected: // that was started without using a data transfer, either an external drag, // that is, a drag where the source is another application, or a drag // started by calling the drag service directly. - nsDOMDataTransfer(PRUint32 aEventType, PRUint32 aAction); + nsDOMDataTransfer(PRUint32 aEventType); // this constructor is used only by the Clone method to copy the fields as // needed to a new data transfer.