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

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

Issue 327133002: Intorudce DECLARE/DEFINE_ELEMENT_FACTORY_WITH_TAGNAME macros. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix a duplicated symbol issue Created 6 years, 6 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 | « no previous file | Source/core/html/HTMLElement.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 6603fbe744caf828e3eaa7c1b7cc872e251dbe2a..2b0e931ae0f9f315e19e09af6b4de087baae1752 100644
--- a/Source/core/dom/Element.h
+++ b/Source/core/dom/Element.h
@@ -878,6 +878,14 @@ inline bool isShadowHost(const Element* element)
template <> inline bool isElementOfType<const thisType>(const Element& element) { return is##thisType(element); } \
DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(thisType)
+#define DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
+ static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&)
+#define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
+ PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \
+ { \
+ return adoptRefWillBeRefCountedGarbageCollected(new T(tagName, document)); \
+ }
+
} // namespace
#endif
« no previous file with comments | « no previous file | Source/core/html/HTMLElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698