| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 } | 108 } |
| 109 return cleanType; | 109 return cleanType; |
| 110 } | 110 } |
| 111 | 111 |
| 112 DataTransfer* DataTransfer::create(DataTransferType type, | 112 DataTransfer* DataTransfer::create(DataTransferType type, |
| 113 DataTransferAccessPolicy policy, | 113 DataTransferAccessPolicy policy, |
| 114 DataObject* dataObject) { | 114 DataObject* dataObject) { |
| 115 return new DataTransfer(type, policy, dataObject); | 115 return new DataTransfer(type, policy, dataObject); |
| 116 } | 116 } |
| 117 | 117 |
| 118 DataTransfer* DataTransfer::createForInputEvent(const String& plainText, |
| 119 const String& htmlText) { |
| 120 return new DataTransfer( |
| 121 InputEvent, DataTransferReadable, |
| 122 DataObject::createFromPlainTextAndHTML(plainText, htmlText)); |
| 123 } |
| 124 |
| 118 DataTransfer::~DataTransfer() {} | 125 DataTransfer::~DataTransfer() {} |
| 119 | 126 |
| 120 void DataTransfer::setDropEffect(const String& effect) { | 127 void DataTransfer::setDropEffect(const String& effect) { |
| 121 if (!isForDragAndDrop()) | 128 if (!isForDragAndDrop()) |
| 122 return; | 129 return; |
| 123 | 130 |
| 124 // The attribute must ignore any attempts to set it to a value other than | 131 // The attribute must ignore any attempts to set it to a value other than |
| 125 // none, copy, link, and move. | 132 // none, copy, link, and move. |
| 126 if (effect != "none" && effect != "copy" && effect != "link" && | 133 if (effect != "none" && effect != "copy" && effect != "link" && |
| 127 effect != "move") | 134 effect != "move") |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 } | 514 } |
| 508 } | 515 } |
| 509 | 516 |
| 510 DEFINE_TRACE(DataTransfer) { | 517 DEFINE_TRACE(DataTransfer) { |
| 511 visitor->trace(m_dataObject); | 518 visitor->trace(m_dataObject); |
| 512 visitor->trace(m_dragImage); | 519 visitor->trace(m_dragImage); |
| 513 visitor->trace(m_dragImageElement); | 520 visitor->trace(m_dragImageElement); |
| 514 } | 521 } |
| 515 | 522 |
| 516 } // namespace blink | 523 } // namespace blink |
| OLD | NEW |