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

Unified Diff: Source/core/html/HTMLOptGroupElement.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/HTMLOptGroupElement.h
diff --git a/Source/core/html/HTMLOptGroupElement.h b/Source/core/html/HTMLOptGroupElement.h
index b7592189df5e31bb511166e1b1c61f25cdca3edb..8d31e44013eb4a252d69baf413c2e4022af3e606 100644
--- a/Source/core/html/HTMLOptGroupElement.h
+++ b/Source/core/html/HTMLOptGroupElement.h
@@ -68,17 +68,18 @@ inline bool isHTMLOptGroupElement(const Node* node)
return node->hasTagName(HTMLNames::optgroupTag);
}
-inline bool isHTMLOptGroupElement(const Element* element)
+inline bool isHTMLOptGroupElement(const Node& node)
tkent 2013/10/24 01:22:32 Ditto.
{
- return element->hasTagName(HTMLNames::optgroupTag);
+ return node.hasTagName(HTMLNames::optgroupTag);
}
-inline HTMLOptGroupElement* toHTMLOptGroupElement(Node* node)
+inline bool isHTMLOptGroupElement(const Element* element)
{
- ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLOptGroupElement(node));
- return static_cast<HTMLOptGroupElement*>(node);
+ return element->hasTagName(HTMLNames::optgroupTag);
}
+DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLOptGroupElement);
+
} //namespace
#endif

Powered by Google App Engine
This is Rietveld 408576698