Bug 1890793: Assert CallArgs::newTarget is not gray. r=spidermonkey-reviewers,sfink...
[gecko.git] / dom / svg / SVGElementFactory.h
blob36a32f69042cb0a0109158a81373a5a646c17994
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef DOM_SVG_SVGELEMENTFACTORY_H_
8 #define DOM_SVG_SVGELEMENTFACTORY_H_
10 #include "nsError.h"
11 #include "mozilla/AlreadyAddRefed.h"
12 #include "mozilla/dom/FromParser.h"
13 #include "mozilla/dom/NodeInfo.h"
15 class nsAtom;
16 class nsIContent;
18 namespace mozilla::dom {
20 class SVGElementFactory {
21 public:
22 static void Init();
23 static void Shutdown();
26 using SVGContentCreatorFunction = nsresult (*)(
27 nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
28 mozilla::dom::FromParser aFromParser);
30 } // namespace mozilla::dom
32 #define SVG_TAG(_tag, _classname) \
33 nsresult NS_NewSVG##_classname##Element( \
34 nsIContent** aResult, \
35 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo, \
36 mozilla::dom::FromParser aFromParser);
38 #define SVG_FROM_PARSER_TAG(_tag, _classname) \
39 nsresult NS_NewSVG##_classname##Element( \
40 nsIContent** aResult, \
41 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo, \
42 mozilla::dom::FromParser aFromParser);
43 #include "mozilla/SVGTagList.h"
44 #undef SVG_TAG
45 #undef SVG_FROM_PARSER_TAG
47 nsresult NS_NewSVGUnknownElement(
48 nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
49 mozilla::dom::FromParser aFromParser);
51 #endif // DOM_SVG_SVGELEMENTFACTORY_H_