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

Unified Diff: Source/core/dom/Element.h

Issue 182583002: Revert of Add template parameter to ElementTraversal to iterate over Elements of a specific type (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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/core.gypi ('k') | Source/core/dom/ElementTraversal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.h
diff --git a/Source/core/dom/Element.h b/Source/core/dom/Element.h
index 77d70e063c1948a9a1466e6386ec66babaaa73e6..6db11f9558b94d9bbed6a02d1b81a55b338f8c0f 100644
--- a/Source/core/dom/Element.h
+++ b/Source/core/dom/Element.h
@@ -673,29 +673,6 @@
template <typename T> inline bool isElementOfType(const Node& node) { return node.isElementNode() && isElementOfType<const T>(toElement(node)); }
template <> inline bool isElementOfType<const Element>(const Element&) { return true; }
-// Type casting.
-template<typename T> inline T& toElement(Node& node)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(isElementOfType<const T>(node));
- return static_cast<T&>(node);
-}
-template<typename T> inline T* toElement(Node* node)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!node || isElementOfType<const T>(*node));
- return static_cast<T*>(node);
-}
-template<typename T> inline const T& toElement(const Node& node)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(isElementOfType<const T>(node));
- return static_cast<const T&>(node);
-}
-template<typename T> inline const T* toElement(const Node* node)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!node || isElementOfType<const T>(*node));
- return static_cast<const T*>(node);
-}
-template<typename T, typename U> inline T* toElement(const RefPtr<U>& node) { return toElement<T>(node.get()); }
-
inline bool isDisabledFormControl(const Node* node)
{
return node->isElementNode() && toElement(node)->isDisabledFormControl();
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/ElementTraversal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698