Adopt is/toHTMLImageElement for code cleanup
[WebKit-https.git] / Source / WebCore / page / DragController.cpp
index 54446a7..d41eb31 100644 (file)
@@ -51,6 +51,7 @@
 #include "FrameSelection.h"
 #include "FrameView.h"
 #include "HTMLAnchorElement.h"
+#include "HTMLImageElement.h"
 #include "HTMLInputElement.h"
 #include "HTMLNames.h"
 #include "HTMLPlugInElement.h"
@@ -659,7 +660,7 @@ Element* DragController::draggableElement(const Frame* sourceFrame, Element* sta
             }
             if (dragMode == DRAG_AUTO) {
                 if ((m_dragSourceAction & DragSourceActionImage)
-                    && node->hasTagName(HTMLNames::imgTag)
+                    && isHTMLImageElement(node)
                     && sourceFrame->settings()
                     && sourceFrame->settings()->loadsImagesAutomatically()) {
                     state.type = static_cast<DragSourceAction>(state.type | DragSourceActionImage);