Index: Source/core/clipboard/Clipboard.cpp |
diff --git a/Source/core/clipboard/Clipboard.cpp b/Source/core/clipboard/Clipboard.cpp |
index 1e77906d7228bbf58e68cafc7101bbee629f7514..388efc53a989c63a659d57a49a6d9c8c7df5f6b1 100644 |
--- a/Source/core/clipboard/Clipboard.cpp |
+++ b/Source/core/clipboard/Clipboard.cpp |
@@ -221,8 +221,8 @@ void Clipboard::setDragImage(Element* image, int x, int y, ExceptionState& excep |
return; |
} |
IntPoint location(x, y); |
- if (image->hasTagName(HTMLNames::imgTag) && !image->inDocument()) |
- setDragImageResource(toHTMLImageElement(image)->cachedImage(), location); |
+ if (isHTMLImageElement(*image) && !image->inDocument()) |
+ setDragImageResource(toHTMLImageElement(*image).cachedImage(), location); |
else |
setDragImageElement(image, location); |
} |