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_
11 #include "mozilla/AlreadyAddRefed.h"
12 #include "mozilla/dom/FromParser.h"
13 #include "mozilla/dom/NodeInfo.h"
18 namespace mozilla::dom
{
20 class SVGElementFactory
{
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"
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_