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

Unified Diff: Source/core/html/HTMLDetailsElement.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/HTMLDetailsElement.h
diff --git a/Source/core/html/HTMLDetailsElement.h b/Source/core/html/HTMLDetailsElement.h
index 55e635c74d3cd9ec0e750d38b085fe2f5043039c..ecd3ecc37a50eaa1b652b6a30e18050c01388d72 100644
--- a/Source/core/html/HTMLDetailsElement.h
+++ b/Source/core/html/HTMLDetailsElement.h
@@ -44,6 +44,11 @@ private:
bool m_isOpen;
};
+inline bool isHTMLDetailsElement(const Node& node)
tkent 2013/10/24 01:22:32 Ditto.
+{
+ return node.hasTagName(HTMLNames::detailsTag);
+}
+
inline bool isHTMLDetailsElement(const Node* node)
{
return node->hasTagName(HTMLNames::detailsTag);
@@ -54,11 +59,7 @@ inline bool isHTMLDetailsElement(const Element* element)
return element->hasTagName(HTMLNames::detailsTag);
}
-inline HTMLDetailsElement* toHTMLDetailsElement(Node* node)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLDetailsElement(node));
- return static_cast<HTMLDetailsElement*>(node);
-}
+DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLDetailsElement);
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698