1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsContentCreatorFunctions_h__
7 #define nsContentCreatorFunctions_h__
11 #include "mozilla/dom/FromParser.h"
14 * Functions to create content, to be used only inside Gecko
15 * (mozilla/content and mozilla/layout).
20 class imgRequestProxy
;
21 class nsNodeInfoManager
;
22 class nsGenericHTMLElement
;
29 } // namespace mozilla
32 NS_NewElement(mozilla::dom::Element
** aResult
,
33 already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
,
34 mozilla::dom::FromParser aFromParser
);
37 NS_NewXMLElement(mozilla::dom::Element
** aResult
,
38 already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
);
41 NS_NewHTMLElement(mozilla::dom::Element
** aResult
,
42 already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
,
43 mozilla::dom::FromParser aFromParser
);
45 // First argument should be nsHTMLTag, but that adds dependency to parser
46 // for a bunch of files.
47 already_AddRefed
<nsGenericHTMLElement
>
48 CreateHTMLElement(uint32_t aNodeType
,
49 already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
,
50 mozilla::dom::FromParser aFromParser
);
53 NS_NewMathMLElement(mozilla::dom::Element
** aResult
,
54 already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
);
58 NS_NewXULElement(mozilla::dom::Element
** aResult
,
59 already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
);
62 NS_TrustedNewXULElement(nsIContent
** aResult
,
63 already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
);
67 NS_NewSVGElement(mozilla::dom::Element
** aResult
,
68 already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
,
69 mozilla::dom::FromParser aFromParser
);
72 NS_NewGenConImageContent(nsIContent
** aResult
,
73 already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
,
74 imgRequestProxy
* aImageRequest
);
76 #endif // nsContentCreatorFunctions_h__