michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef nsContentCreatorFunctions_h__ michael@0: #define nsContentCreatorFunctions_h__ michael@0: michael@0: #include "nsError.h" michael@0: #include "nsCOMPtr.h" michael@0: #include "mozilla/dom/FromParser.h" michael@0: michael@0: /** michael@0: * Functions to create content, to be used only inside Gecko michael@0: * (mozilla/content and mozilla/layout). michael@0: */ michael@0: michael@0: class nsAString; michael@0: class nsIContent; michael@0: class nsINodeInfo; michael@0: class imgRequestProxy; michael@0: class nsNodeInfoManager; michael@0: class nsGenericHTMLElement; michael@0: michael@0: namespace mozilla { michael@0: namespace dom { michael@0: class Element; michael@0: } // namespace dom michael@0: } // namespace mozilla michael@0: michael@0: nsresult michael@0: NS_NewElement(mozilla::dom::Element** aResult, michael@0: already_AddRefed&& aNodeInfo, michael@0: mozilla::dom::FromParser aFromParser); michael@0: michael@0: nsresult michael@0: NS_NewXMLElement(mozilla::dom::Element** aResult, michael@0: already_AddRefed&& aNodeInfo); michael@0: michael@0: nsresult michael@0: NS_NewHTMLElement(mozilla::dom::Element** aResult, michael@0: already_AddRefed&& aNodeInfo, michael@0: mozilla::dom::FromParser aFromParser); michael@0: michael@0: // First argument should be nsHTMLTag, but that adds dependency to parser michael@0: // for a bunch of files. michael@0: already_AddRefed michael@0: CreateHTMLElement(uint32_t aNodeType, michael@0: already_AddRefed&& aNodeInfo, michael@0: mozilla::dom::FromParser aFromParser); michael@0: michael@0: nsresult michael@0: NS_NewMathMLElement(mozilla::dom::Element** aResult, michael@0: already_AddRefed&& aNodeInfo); michael@0: michael@0: #ifdef MOZ_XUL michael@0: nsresult michael@0: NS_NewXULElement(mozilla::dom::Element** aResult, michael@0: already_AddRefed&& aNodeInfo); michael@0: michael@0: void michael@0: NS_TrustedNewXULElement(nsIContent** aResult, michael@0: already_AddRefed&& aNodeInfo); michael@0: #endif michael@0: michael@0: nsresult michael@0: NS_NewSVGElement(mozilla::dom::Element** aResult, michael@0: already_AddRefed&& aNodeInfo, michael@0: mozilla::dom::FromParser aFromParser); michael@0: michael@0: nsresult michael@0: NS_NewGenConImageContent(nsIContent** aResult, michael@0: already_AddRefed&& aNodeInfo, michael@0: imgRequestProxy* aImageRequest); michael@0: michael@0: #endif // nsContentCreatorFunctions_h__