Index: Source/core/html/MediaDocument.cpp |
diff --git a/Source/core/html/MediaDocument.cpp b/Source/core/html/MediaDocument.cpp |
index aeacbcfec72f6fb0448537c6d18f9004811ddb07..c3a5511e02b0e11faae1565722cebe9dc7efcbf6 100644 |
--- a/Source/core/html/MediaDocument.cpp |
+++ b/Source/core/html/MediaDocument.cpp |
@@ -90,7 +90,7 @@ void MediaDocumentParser::createDocumentStructure() |
RefPtr<Element> mediaElement = document()->createElement(videoTag, false); |
- m_mediaElement = static_cast<HTMLVideoElement*>(mediaElement.get()); |
+ m_mediaElement = toHTMLVideoElement(mediaElement.get()); |
m_mediaElement->setAttribute(controlsAttr, ""); |
m_mediaElement->setAttribute(autoplayAttr, ""); |
@@ -133,13 +133,13 @@ static inline HTMLVideoElement* descendentVideoElement(Node* node) |
{ |
ASSERT(node); |
- if (node->hasTagName(videoTag)) |
- return static_cast<HTMLVideoElement*>(node); |
+ if (isHTMLVideoElement(node)) |
+ return toHTMLVideoElement(node); |
RefPtr<NodeList> nodeList = node->getElementsByTagNameNS(videoTag.namespaceURI(), videoTag.localName()); |
- |
+ |
if (nodeList.get()->length() > 0) |
- return static_cast<HTMLVideoElement*>(nodeList.get()->item(0)); |
+ return toHTMLVideoElement(nodeList.get()->item(0)); |
return 0; |
} |