Bumping manifests a=b2g-bump
[gecko.git] / dom / base / nsContentCreatorFunctions.h
blobb00a77ebde3b247acebe70e0052323ee2aec5942
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__
9 #include "nsError.h"
10 #include "nsCOMPtr.h"
11 #include "mozilla/dom/FromParser.h"
13 /**
14 * Functions to create content, to be used only inside Gecko
15 * (mozilla/content and mozilla/layout).
18 class nsAString;
19 class nsIContent;
20 class imgRequestProxy;
21 class nsNodeInfoManager;
22 class nsGenericHTMLElement;
24 namespace mozilla {
25 namespace dom {
26 class Element;
27 class NodeInfo;
28 } // namespace dom
29 } // namespace mozilla
31 nsresult
32 NS_NewElement(mozilla::dom::Element** aResult,
33 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
34 mozilla::dom::FromParser aFromParser);
36 nsresult
37 NS_NewXMLElement(mozilla::dom::Element** aResult,
38 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
40 nsresult
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);
52 nsresult
53 NS_NewMathMLElement(mozilla::dom::Element** aResult,
54 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
56 #ifdef MOZ_XUL
57 nsresult
58 NS_NewXULElement(mozilla::dom::Element** aResult,
59 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
61 void
62 NS_TrustedNewXULElement(nsIContent** aResult,
63 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
64 #endif
66 nsresult
67 NS_NewSVGElement(mozilla::dom::Element** aResult,
68 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
69 mozilla::dom::FromParser aFromParser);
71 nsresult
72 NS_NewGenConImageContent(nsIContent** aResult,
73 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
74 imgRequestProxy* aImageRequest);
76 #endif // nsContentCreatorFunctions_h__