Index: Source/core/rendering/HitTestResult.cpp |
diff --git a/Source/core/rendering/HitTestResult.cpp b/Source/core/rendering/HitTestResult.cpp |
index cd95be8312a5b4538ddc2a0baca4e636ba238ee1..614afa8d5d6fe03fa97c3ae181362c9c58e67a98 100644 |
--- a/Source/core/rendering/HitTestResult.cpp |
+++ b/Source/core/rendering/HitTestResult.cpp |
@@ -34,6 +34,7 @@ |
#include "core/html/HTMLImageElement.h" |
#include "core/html/HTMLInputElement.h" |
#include "core/html/HTMLMediaElement.h" |
+#include "core/html/HTMLVideoElement.h" |
#include "core/html/parser/HTMLParserIdioms.h" |
#include "core/loader/cache/CachedImage.h" |
#include "core/page/Frame.h" |
@@ -314,7 +315,7 @@ HTMLMediaElement* HitTestResult::mediaElement() const |
if (!(m_innerNonSharedNode->renderer() && m_innerNonSharedNode->renderer()->isMedia())) |
return 0; |
- if (m_innerNonSharedNode->hasTagName(HTMLNames::videoTag) || m_innerNonSharedNode->hasTagName(HTMLNames::audioTag)) |
+ if (isHTMLVideoElement(m_innerNonSharedNode.get()) || m_innerNonSharedNode->hasTagName(HTMLNames::audioTag)) |
return static_cast<HTMLMediaElement*>(m_innerNonSharedNode.get()); |
return 0; |
} |