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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 return m_dataObject; | 463 return m_dataObject; |
464 } | 464 } |
465 | 465 |
466 DataTransfer::DataTransfer(DataTransferType type, DataTransferAccessPolicy polic
y, PassRefPtrWillBeRawPtr<DataObject> dataObject) | 466 DataTransfer::DataTransfer(DataTransferType type, DataTransferAccessPolicy polic
y, PassRefPtrWillBeRawPtr<DataObject> dataObject) |
467 : m_policy(policy) | 467 : m_policy(policy) |
468 , m_dropEffect("uninitialized") | 468 , m_dropEffect("uninitialized") |
469 , m_effectAllowed("uninitialized") | 469 , m_effectAllowed("uninitialized") |
470 , m_transferType(type) | 470 , m_transferType(type) |
471 , m_dataObject(dataObject) | 471 , m_dataObject(dataObject) |
472 { | 472 { |
473 ScriptWrappable::init(this); | |
474 } | 473 } |
475 | 474 |
476 void DataTransfer::setDragImage(ImageResource* image, Node* node, const IntPoint
& loc) | 475 void DataTransfer::setDragImage(ImageResource* image, Node* node, const IntPoint
& loc) |
477 { | 476 { |
478 if (!canSetDragImage()) | 477 if (!canSetDragImage()) |
479 return; | 478 return; |
480 | 479 |
481 m_dragImage = image; | 480 m_dragImage = image; |
482 m_dragLoc = loc; | 481 m_dragLoc = loc; |
483 m_dragImageElement = node; | 482 m_dragImageElement = node; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 } | 531 } |
533 } | 532 } |
534 | 533 |
535 void DataTransfer::trace(Visitor* visitor) | 534 void DataTransfer::trace(Visitor* visitor) |
536 { | 535 { |
537 visitor->trace(m_dataObject); | 536 visitor->trace(m_dataObject); |
538 visitor->trace(m_dragImageElement); | 537 visitor->trace(m_dragImageElement); |
539 } | 538 } |
540 | 539 |
541 } // namespace blink | 540 } // namespace blink |
OLD | NEW |