Index: Source/core/html/HTMLVideoElement.h |
diff --git a/Source/core/html/HTMLVideoElement.h b/Source/core/html/HTMLVideoElement.h |
index d77a4b59a047522609cb1c43524449843139074a..2acf9e327b0c707cc0b305a587fe855a91fcac2e 100644 |
--- a/Source/core/html/HTMLVideoElement.h |
+++ b/Source/core/html/HTMLVideoElement.h |
@@ -93,6 +93,22 @@ private: |
AtomicString m_defaultPosterURL; |
}; |
+inline bool isHTMLVideoElement(const Node* node) |
+{ |
+ return node->hasTagName(HTMLNames::videoTag); |
+} |
+ |
+inline bool isHTMLVideoElement(const Element* element) |
+{ |
+ return element->hasTagName(HTMLNames::videoTag); |
+} |
+ |
+inline HTMLVideoElement* toHTMLVideoElement(Node* node) |
+{ |
+ ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLVideoElement(node)); |
+ return static_cast<HTMLVideoElement*>(node); |
+} |
+ |
} //namespace |
#endif |