Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1033)

Unified Diff: Source/core/html/HTMLVideoElement.h

Issue 18205009: Introduce isHTMLVideoElement and toHTMLVideoElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLImageLoader.cpp ('k') | Source/core/html/MediaDocument.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/core/html/HTMLImageLoader.cpp ('k') | Source/core/html/MediaDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698