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