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

Unified Diff: Source/core/html/shadow/HTMLShadowElement.h

Issue 36973002: Clean up toHTMLFooElement() using DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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/shadow/HTMLContentElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/shadow/HTMLShadowElement.h
diff --git a/Source/core/html/shadow/HTMLShadowElement.h b/Source/core/html/shadow/HTMLShadowElement.h
index b9943bd3364e6dfd5719bfd1d49db613c0e63052..c528127c25cabf31007fdd5f4040bd6205d13738 100644
--- a/Source/core/html/shadow/HTMLShadowElement.h
+++ b/Source/core/html/shadow/HTMLShadowElement.h
@@ -55,17 +55,7 @@ inline bool isHTMLShadowElement(const Node* node)
return node->hasTagName(HTMLNames::shadowTag);
}
-inline HTMLShadowElement* toHTMLShadowElement(Node* node)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLShadowElement(node));
- return static_cast<HTMLShadowElement*>(node);
-}
-
-inline const HTMLShadowElement* toHTMLShadowElement(const Node* node)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLShadowElement(node));
- return static_cast<const HTMLShadowElement*>(node);
-}
+DEFINE_NODE_TYPE_CASTS(HTMLShadowElement, hasTagName(HTMLNames::shadowTag));
inline bool isActiveShadowInsertionPoint(const Node* node)
{
« no previous file with comments | « Source/core/html/shadow/HTMLContentElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698