1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/base/public/nsContentCreatorFunctions.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,76 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef nsContentCreatorFunctions_h__ 1.10 +#define nsContentCreatorFunctions_h__ 1.11 + 1.12 +#include "nsError.h" 1.13 +#include "nsCOMPtr.h" 1.14 +#include "mozilla/dom/FromParser.h" 1.15 + 1.16 +/** 1.17 + * Functions to create content, to be used only inside Gecko 1.18 + * (mozilla/content and mozilla/layout). 1.19 + */ 1.20 + 1.21 +class nsAString; 1.22 +class nsIContent; 1.23 +class nsINodeInfo; 1.24 +class imgRequestProxy; 1.25 +class nsNodeInfoManager; 1.26 +class nsGenericHTMLElement; 1.27 + 1.28 +namespace mozilla { 1.29 +namespace dom { 1.30 +class Element; 1.31 +} // namespace dom 1.32 +} // namespace mozilla 1.33 + 1.34 +nsresult 1.35 +NS_NewElement(mozilla::dom::Element** aResult, 1.36 + already_AddRefed<nsINodeInfo>&& aNodeInfo, 1.37 + mozilla::dom::FromParser aFromParser); 1.38 + 1.39 +nsresult 1.40 +NS_NewXMLElement(mozilla::dom::Element** aResult, 1.41 + already_AddRefed<nsINodeInfo>&& aNodeInfo); 1.42 + 1.43 +nsresult 1.44 +NS_NewHTMLElement(mozilla::dom::Element** aResult, 1.45 + already_AddRefed<nsINodeInfo>&& aNodeInfo, 1.46 + mozilla::dom::FromParser aFromParser); 1.47 + 1.48 +// First argument should be nsHTMLTag, but that adds dependency to parser 1.49 +// for a bunch of files. 1.50 +already_AddRefed<nsGenericHTMLElement> 1.51 +CreateHTMLElement(uint32_t aNodeType, 1.52 + already_AddRefed<nsINodeInfo>&& aNodeInfo, 1.53 + mozilla::dom::FromParser aFromParser); 1.54 + 1.55 +nsresult 1.56 +NS_NewMathMLElement(mozilla::dom::Element** aResult, 1.57 + already_AddRefed<nsINodeInfo>&& aNodeInfo); 1.58 + 1.59 +#ifdef MOZ_XUL 1.60 +nsresult 1.61 +NS_NewXULElement(mozilla::dom::Element** aResult, 1.62 + already_AddRefed<nsINodeInfo>&& aNodeInfo); 1.63 + 1.64 +void 1.65 +NS_TrustedNewXULElement(nsIContent** aResult, 1.66 + already_AddRefed<nsINodeInfo>&& aNodeInfo); 1.67 +#endif 1.68 + 1.69 +nsresult 1.70 +NS_NewSVGElement(mozilla::dom::Element** aResult, 1.71 + already_AddRefed<nsINodeInfo>&& aNodeInfo, 1.72 + mozilla::dom::FromParser aFromParser); 1.73 + 1.74 +nsresult 1.75 +NS_NewGenConImageContent(nsIContent** aResult, 1.76 + already_AddRefed<nsINodeInfo>&& aNodeInfo, 1.77 + imgRequestProxy* aImageRequest); 1.78 + 1.79 +#endif // nsContentCreatorFunctions_h__