Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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).
16 */
18 class nsAString;
19 class nsIContent;
20 class nsINodeInfo;
21 class imgRequestProxy;
22 class nsNodeInfoManager;
23 class nsGenericHTMLElement;
25 namespace mozilla {
26 namespace dom {
27 class Element;
28 } // namespace dom
29 } // namespace mozilla
31 nsresult
32 NS_NewElement(mozilla::dom::Element** aResult,
33 already_AddRefed<nsINodeInfo>&& aNodeInfo,
34 mozilla::dom::FromParser aFromParser);
36 nsresult
37 NS_NewXMLElement(mozilla::dom::Element** aResult,
38 already_AddRefed<nsINodeInfo>&& aNodeInfo);
40 nsresult
41 NS_NewHTMLElement(mozilla::dom::Element** aResult,
42 already_AddRefed<nsINodeInfo>&& 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<nsINodeInfo>&& aNodeInfo,
50 mozilla::dom::FromParser aFromParser);
52 nsresult
53 NS_NewMathMLElement(mozilla::dom::Element** aResult,
54 already_AddRefed<nsINodeInfo>&& aNodeInfo);
56 #ifdef MOZ_XUL
57 nsresult
58 NS_NewXULElement(mozilla::dom::Element** aResult,
59 already_AddRefed<nsINodeInfo>&& aNodeInfo);
61 void
62 NS_TrustedNewXULElement(nsIContent** aResult,
63 already_AddRefed<nsINodeInfo>&& aNodeInfo);
64 #endif
66 nsresult
67 NS_NewSVGElement(mozilla::dom::Element** aResult,
68 already_AddRefed<nsINodeInfo>&& aNodeInfo,
69 mozilla::dom::FromParser aFromParser);
71 nsresult
72 NS_NewGenConImageContent(nsIContent** aResult,
73 already_AddRefed<nsINodeInfo>&& aNodeInfo,
74 imgRequestProxy* aImageRequest);
76 #endif // nsContentCreatorFunctions_h__