DragOperation DataTransfer::destinationOperation() const { DragOperation op = convertEffectAllowedToDragOperation(m_dropEffect); ASSERT(op == DragOperationCopy || op == DragOperationNone || op == DragOperationLink || op == (DragOperation)(DragOperationGeneric | DragOperationMove) || op == DragOperationEvery); return op; }
void DataTransfer::setEffectAllowed(const String& effect) { if (!isForDragAndDrop()) return; if (convertEffectAllowedToDragOperation(effect) == DragOperationPrivate) { // This means that there was no conversion, and the effectAllowed that // we are passed isn't a valid effectAllowed, so we should ignore it, // and not set m_effectAllowed. // The attribute must ignore any attempts to set it to a value other than // none, copy, copyLink, copyMove, link, linkMove, move, all, and // uninitialized. return; } if (canWriteData()) m_effectAllowed = effect; }
DragOperation DataTransfer::sourceOperation() const { DragOperation op = convertEffectAllowedToDragOperation(m_effectAllowed); ASSERT(op != DragOperationPrivate); return op; }