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

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
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..53ca8f688c4e1dde2558ccaa2ccf45d5f54fed84 100644
--- a/Source/core/html/shadow/HTMLShadowElement.h
+++ b/Source/core/html/shadow/HTMLShadowElement.h
@@ -49,23 +49,18 @@ private:
virtual InsertionNotificationRequest insertedInto(ContainerNode* insertionPoint) OVERRIDE;
};
-inline bool isHTMLShadowElement(const Node* node)
+inline bool isHTMLShadowElement(const Node& node)
tkent 2013/10/24 01:22:32 Ditto.
{
- ASSERT(node);
- return node->hasTagName(HTMLNames::shadowTag);
+ return node.hasTagName(HTMLNames::shadowTag);
}
-inline HTMLShadowElement* toHTMLShadowElement(Node* node)
+inline bool isHTMLShadowElement(const Node* node)
{
- ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLShadowElement(node));
- return static_cast<HTMLShadowElement*>(node);
+ ASSERT(node);
+ return node->hasTagName(HTMLNames::shadowTag);
}
-inline const HTMLShadowElement* toHTMLShadowElement(const Node* node)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLShadowElement(node));
- return static_cast<const HTMLShadowElement*>(node);
-}
+DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLShadowElement);
inline bool isActiveShadowInsertionPoint(const Node* node)
{
« Source/core/html/shadow/HTMLContentElement.h ('K') | « Source/core/html/shadow/HTMLContentElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698