| 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 } | 211 } |
| 212 | 212 |
| 213 void DataTransfer::setDragImage(Element* image, int x, int y) | 213 void DataTransfer::setDragImage(Element* image, int x, int y) |
| 214 { | 214 { |
| 215 ASSERT(image); | 215 ASSERT(image); |
| 216 | 216 |
| 217 if (!isForDragAndDrop()) | 217 if (!isForDragAndDrop()) |
| 218 return; | 218 return; |
| 219 | 219 |
| 220 IntPoint location(x, y); | 220 IntPoint location(x, y); |
| 221 if (isHTMLImageElement(*image) && !image->inShadowIncludingDocument()) | 221 if (isHTMLImageElement(*image) && !image->isConnected()) |
| 222 setDragImageResource(toHTMLImageElement(*image).cachedImage(), location)
; | 222 setDragImageResource(toHTMLImageElement(*image).cachedImage(), location)
; |
| 223 else | 223 else |
| 224 setDragImageElement(image, location); | 224 setDragImageElement(image, location); |
| 225 } | 225 } |
| 226 | 226 |
| 227 void DataTransfer::clearDragImage() | 227 void DataTransfer::clearDragImage() |
| 228 { | 228 { |
| 229 if (!canSetDragImage()) | 229 if (!canSetDragImage()) |
| 230 return; | 230 return; |
| 231 | 231 |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 } | 510 } |
| 511 | 511 |
| 512 DEFINE_TRACE(DataTransfer) | 512 DEFINE_TRACE(DataTransfer) |
| 513 { | 513 { |
| 514 visitor->trace(m_dataObject); | 514 visitor->trace(m_dataObject); |
| 515 visitor->trace(m_dragImage); | 515 visitor->trace(m_dragImage); |
| 516 visitor->trace(m_dragImageElement); | 516 visitor->trace(m_dragImageElement); |
| 517 } | 517 } |
| 518 | 518 |
| 519 } // namespace blink | 519 } // namespace blink |
| OLD | NEW |