Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Unified Diff: Source/core/clipboard/Clipboard.cpp

Issue 193623002: Use new is*Element() helper functions more in core/ code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/loader/FormSubmission.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | Source/core/loader/FormSubmission.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698