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

Unified Diff: Source/core/html/HTMLElement.h

Issue 195993009: Generate better isFooElement() helper functions for HTML Elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/build/scripts/templates/ElementTypeHelpers.h.tmpl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLElement.h
diff --git a/Source/core/html/HTMLElement.h b/Source/core/html/HTMLElement.h
index d7ead8bdbe5698051603efb7f7235448d2a1e4fc..90c3963d63f8677f35c46a7f6541f614d5e854c8 100644
--- a/Source/core/html/HTMLElement.h
+++ b/Source/core/html/HTMLElement.h
@@ -23,7 +23,6 @@
#ifndef HTMLElement_h
#define HTMLElement_h
-#include "HTMLElementTypeHelpers.h"
#include "core/dom/Element.h"
namespace WebCore {
@@ -128,6 +127,9 @@ private:
DEFINE_ELEMENT_TYPE_CASTS(HTMLElement, isHTMLElement());
+template <typename T> bool isElementOfType(const HTMLElement&);
+template <> inline bool isElementOfType<HTMLElement>(const HTMLElement&) { return true; }
+
inline HTMLElement::HTMLElement(const QualifiedName& tagName, Document& document, ConstructionType type = CreateHTMLElement)
: Element(tagName, &document, type)
{
@@ -137,4 +139,6 @@ inline HTMLElement::HTMLElement(const QualifiedName& tagName, Document& document
} // namespace WebCore
+#include "HTMLElementTypeHelpers.h"
+
#endif // HTMLElement_h
« no previous file with comments | « Source/build/scripts/templates/ElementTypeHelpers.h.tmpl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698