diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-08-05 11:35:53 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-08-05 11:35:53 +0200 |
commit | 6bd66b1728eeddb058066edda740aaeb2ceaec23 (patch) | |
tree | 985faf01c526763515731569fa01a99f4dbef36e /dom/events | |
parent | e0a8dcfed131ffa58a5e2cb1d30fe48c745c2fdc (diff) | |
parent | 559824514dc95e02fbe81f1786e6ac13ee8e9d55 (diff) | |
download | UXP-6bd66b1728eeddb058066edda740aaeb2ceaec23.tar UXP-6bd66b1728eeddb058066edda740aaeb2ceaec23.tar.gz UXP-6bd66b1728eeddb058066edda740aaeb2ceaec23.tar.lz UXP-6bd66b1728eeddb058066edda740aaeb2ceaec23.tar.xz UXP-6bd66b1728eeddb058066edda740aaeb2ceaec23.zip |
Merge branch 'master' into js-modules
Diffstat (limited to 'dom/events')
-rw-r--r-- | dom/events/DataTransfer.cpp | 17 | ||||
-rw-r--r-- | dom/events/DataTransfer.h | 3 |
2 files changed, 4 insertions, 16 deletions
diff --git a/dom/events/DataTransfer.cpp b/dom/events/DataTransfer.cpp index 2c6ecdd56..45c72e662 100644 --- a/dom/events/DataTransfer.cpp +++ b/dom/events/DataTransfer.cpp @@ -161,22 +161,11 @@ DataTransfer::~DataTransfer() // static already_AddRefed<DataTransfer> -DataTransfer::Constructor(const GlobalObject& aGlobal, - const nsAString& aEventType, bool aIsExternal, - ErrorResult& aRv) +DataTransfer::Constructor(const GlobalObject& aGlobal, ErrorResult& aRv) { - nsAutoCString onEventType("on"); - AppendUTF16toUTF8(aEventType, onEventType); - nsCOMPtr<nsIAtom> eventTypeAtom = NS_Atomize(onEventType); - if (!eventTypeAtom) { - aRv.Throw(NS_ERROR_OUT_OF_MEMORY); - return nullptr; - } - - EventMessage eventMessage = nsContentUtils::GetEventMessage(eventTypeAtom); RefPtr<DataTransfer> transfer = new DataTransfer(aGlobal.GetAsSupports(), - eventMessage, aIsExternal, - -1); + eCopy, /* is external */ false, /* clipboard type */ -1); + transfer->mEffectAllowed = nsIDragService::DRAGDROP_ACTION_NONE; return transfer.forget(); } diff --git a/dom/events/DataTransfer.h b/dom/events/DataTransfer.h index 7c6b0b8c1..344593ed0 100644 --- a/dom/events/DataTransfer.h +++ b/dom/events/DataTransfer.h @@ -115,8 +115,7 @@ public: } static already_AddRefed<DataTransfer> - Constructor(const GlobalObject& aGlobal, const nsAString& aEventType, - bool aIsExternal, ErrorResult& aRv); + Constructor(const GlobalObject& aGlobal, ErrorResult& aRv); void GetDropEffect(nsString& aDropEffect) { |