Example #1
0
void DataTransfer::clearData()
{
    if (!canWriteData())
        return;

    m_pasteboard->clear();
}
Example #2
0
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);
}
Example #4
0
bool Clipboard::setData(const String& type, const String& data)
{
    if (!canWriteData())
        return false;

    return m_dataObject->setData(normalizeType(type), data);
}
Example #5
0
void DataTransfer::clearData(const String& type) {
  if (!canWriteData())
    return;

  if (type.isNull())
    m_dataObject->clearAll();
  else
    m_dataObject->clearData(normalizeType(type));
}
Example #6
0
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);
}
Example #7
0
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;
}
Example #8
0
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;
}