Index: Source/web/ContextMenuClientImpl.cpp |
diff --git a/Source/web/ContextMenuClientImpl.cpp b/Source/web/ContextMenuClientImpl.cpp |
index 059e0f9be2a64fad4db6301dac15f49c2ab5a487..c0f957c22dc68f73a22a862ab2583c037a966c28 100644 |
--- a/Source/web/ContextMenuClientImpl.cpp |
+++ b/Source/web/ContextMenuClientImpl.cpp |
@@ -54,6 +54,7 @@ |
#include "core/html/HTMLInputElement.h" |
#include "core/html/HTMLMediaElement.h" |
#include "core/html/HTMLPlugInImageElement.h" |
+#include "core/html/HTMLVideoElement.h" |
#include "core/html/MediaError.h" |
#include "core/loader/DocumentLoader.h" |
#include "core/loader/FrameLoader.h" |
@@ -221,7 +222,7 @@ void ContextMenuClientImpl::showContextMenu(const WebCore::ContextMenu* defaultM |
// is a media element. |
HTMLMediaElement* mediaElement = |
toMediaElement(r.innerNonSharedNode()); |
- if (mediaElement->hasTagName(HTMLNames::videoTag)) |
+ if (isHTMLVideoElement(mediaElement)) |
data.mediaType = WebContextMenuData::MediaTypeVideo; |
else if (mediaElement->hasTagName(HTMLNames::audioTag)) |
data.mediaType = WebContextMenuData::MediaTypeAudio; |