void DataTransfer::clearData() { if (!canWriteData()) return; m_pasteboard->clear(); }
void DataTransfer::clearData(const String& type) { if (!canWriteData()) return; m_pasteboard->clear(type); }
void DataTransfer::setData(const String& type, const String& data) { if (!canWriteData()) return; m_dataObject->setData(normalizeType(type), data); }
bool Clipboard::setData(const String& type, const String& data) { if (!canWriteData()) return false; return m_dataObject->setData(normalizeType(type), data); }
void DataTransfer::clearData(const String& type) { if (!canWriteData()) return; if (type.isNull()) m_dataObject->clearAll(); else m_dataObject->clearData(normalizeType(type)); }
void DataTransfer::setData(const String& type, const String& data) { if (!canWriteData()) return; #if ENABLE(DRAG_SUPPORT) if (m_forFileDrag) return; #endif m_pasteboard->writeString(type, data); }
void DataTransfer::setEffectAllowed(const String& effect) { if (!m_forDrag) return; // Ignore any attempts to set it to an unknown value. if (dragOpFromIEOp(effect) == DragOperationPrivate) return; if (!canWriteData()) return; m_effectAllowed = effect; }
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; }