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

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

Powered by Google App Engine
This is Rietveld 408576698