content/base/public/nsContentCreatorFunctions.h

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:352fa3788710
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/. */
5
6 #ifndef nsContentCreatorFunctions_h__
7 #define nsContentCreatorFunctions_h__
8
9 #include "nsError.h"
10 #include "nsCOMPtr.h"
11 #include "mozilla/dom/FromParser.h"
12
13 /**
14 * Functions to create content, to be used only inside Gecko
15 * (mozilla/content and mozilla/layout).
16 */
17
18 class nsAString;
19 class nsIContent;
20 class nsINodeInfo;
21 class imgRequestProxy;
22 class nsNodeInfoManager;
23 class nsGenericHTMLElement;
24
25 namespace mozilla {
26 namespace dom {
27 class Element;
28 } // namespace dom
29 } // namespace mozilla
30
31 nsresult
32 NS_NewElement(mozilla::dom::Element** aResult,
33 already_AddRefed<nsINodeInfo>&& aNodeInfo,
34 mozilla::dom::FromParser aFromParser);
35
36 nsresult
37 NS_NewXMLElement(mozilla::dom::Element** aResult,
38 already_AddRefed<nsINodeInfo>&& aNodeInfo);
39
40 nsresult
41 NS_NewHTMLElement(mozilla::dom::Element** aResult,
42 already_AddRefed<nsINodeInfo>&& aNodeInfo,
43 mozilla::dom::FromParser aFromParser);
44
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<nsINodeInfo>&& aNodeInfo,
50 mozilla::dom::FromParser aFromParser);
51
52 nsresult
53 NS_NewMathMLElement(mozilla::dom::Element** aResult,
54 already_AddRefed<nsINodeInfo>&& aNodeInfo);
55
56 #ifdef MOZ_XUL
57 nsresult
58 NS_NewXULElement(mozilla::dom::Element** aResult,
59 already_AddRefed<nsINodeInfo>&& aNodeInfo);
60
61 void
62 NS_TrustedNewXULElement(nsIContent** aResult,
63 already_AddRefed<nsINodeInfo>&& aNodeInfo);
64 #endif
65
66 nsresult
67 NS_NewSVGElement(mozilla::dom::Element** aResult,
68 already_AddRefed<nsINodeInfo>&& aNodeInfo,
69 mozilla::dom::FromParser aFromParser);
70
71 nsresult
72 NS_NewGenConImageContent(nsIContent** aResult,
73 already_AddRefed<nsINodeInfo>&& aNodeInfo,
74 imgRequestProxy* aImageRequest);
75
76 #endif // nsContentCreatorFunctions_h__

mercurial