summaryrefslogtreecommitdiffstats
path: root/dom/events/DataTransfer.cpp
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-07-20 11:10:53 +0200
committerGitHub <noreply@github.com>2018-07-20 11:10:53 +0200
commitcba8e7b14e7703fbe032e41acfaf7f1ba9536aaf (patch)
tree2446c6613b238c3de3087b0850e0e2941a832135 /dom/events/DataTransfer.cpp
parentedc1da82d86d3c86512f42403c84ee68a4f682a3 (diff)
parent568e27db3f80bfb19e3e80a9b21e26b6d9ebb152 (diff)
downloadUXP-cba8e7b14e7703fbe032e41acfaf7f1ba9536aaf.tar
UXP-cba8e7b14e7703fbe032e41acfaf7f1ba9536aaf.tar.gz
UXP-cba8e7b14e7703fbe032e41acfaf7f1ba9536aaf.tar.lz
UXP-cba8e7b14e7703fbe032e41acfaf7f1ba9536aaf.tar.xz
UXP-cba8e7b14e7703fbe032e41acfaf7f1ba9536aaf.zip
Merge pull request #651 from janekptacijarabaci/dom_DataTransfer_constructor_1
Dom data transfer constructor
Diffstat (limited to 'dom/events/DataTransfer.cpp')
-rw-r--r--dom/events/DataTransfer.cpp17
1 files changed, 3 insertions, 14 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();
}