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

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

Issue 175693007: Generate isHTML*Element() / toHTML*Element() helper functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make toHTMLObjectElement() work for FormAssociatedElement input 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
Index: Source/core/dom/Element.h
diff --git a/Source/core/dom/Element.h b/Source/core/dom/Element.h
index e4a49bc025def86a4edbcab79a95eda96eabf97a..d127439615bbaeaea20ea17a48c56aad6a41375d 100644
--- a/Source/core/dom/Element.h
+++ b/Source/core/dom/Element.h
@@ -668,6 +668,9 @@ private:
};
DEFINE_NODE_TYPE_CASTS(Element, isElementNode());
+template <typename T> bool isElementOfType(const Element&);
+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; }
inline bool isDisabledFormControl(const Node* node)
{

Powered by Google App Engine
This is Rietveld 408576698