2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef nsContentCreatorFunctions_h__
|
|
|
|
#define nsContentCreatorFunctions_h__
|
|
|
|
|
|
|
|
#include "nscore.h"
|
|
|
|
#include "nsCOMPtr.h"
|
2010-10-25 05:17:38 -07:00
|
|
|
#include "mozilla/dom/FromParser.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Functions to create content, to be used only inside Gecko
|
|
|
|
* (mozilla/content and mozilla/layout).
|
|
|
|
*/
|
|
|
|
|
|
|
|
class nsAString;
|
|
|
|
class nsIContent;
|
|
|
|
class nsINodeInfo;
|
|
|
|
class imgIRequest;
|
|
|
|
class nsNodeInfoManager;
|
|
|
|
class nsGenericHTMLElement;
|
|
|
|
|
|
|
|
nsresult
|
2011-11-15 23:50:19 -08:00
|
|
|
NS_NewElement(nsIContent** aResult,
|
2010-10-25 05:17:38 -07:00
|
|
|
already_AddRefed<nsINodeInfo> aNodeInfo,
|
|
|
|
mozilla::dom::FromParser aFromParser);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
nsresult
|
2010-07-23 02:49:57 -07:00
|
|
|
NS_NewXMLElement(nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* aNodeInfoManager must not be null.
|
|
|
|
*/
|
|
|
|
nsresult
|
|
|
|
NS_NewTextNode(nsIContent **aResult, nsNodeInfoManager *aNodeInfoManager);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* aNodeInfoManager must not be null.
|
|
|
|
*/
|
|
|
|
nsresult
|
|
|
|
NS_NewCommentNode(nsIContent **aResult, nsNodeInfoManager *aNodeInfoManager);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* aNodeInfoManager must not be null.
|
|
|
|
*/
|
|
|
|
nsresult
|
|
|
|
NS_NewXMLProcessingInstruction(nsIContent** aInstancePtrResult,
|
|
|
|
nsNodeInfoManager *aNodeInfoManager,
|
|
|
|
const nsAString& aTarget,
|
|
|
|
const nsAString& aData);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* aNodeInfoManager must not be null.
|
|
|
|
*/
|
|
|
|
nsresult
|
|
|
|
NS_NewXMLStylesheetProcessingInstruction(nsIContent** aInstancePtrResult,
|
|
|
|
nsNodeInfoManager *aNodeInfoManager,
|
|
|
|
const nsAString& aData);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* aNodeInfoManager must not be null.
|
|
|
|
*/
|
|
|
|
nsresult
|
|
|
|
NS_NewXMLCDATASection(nsIContent** aInstancePtrResult,
|
|
|
|
nsNodeInfoManager *aNodeInfoManager);
|
|
|
|
|
|
|
|
nsresult
|
2010-07-23 02:49:57 -07:00
|
|
|
NS_NewHTMLElement(nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo,
|
2010-10-25 05:17:38 -07:00
|
|
|
mozilla::dom::FromParser aFromParser);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
// First argument should be nsHTMLTag, but that adds dependency to parser
|
|
|
|
// for a bunch of files.
|
|
|
|
already_AddRefed<nsGenericHTMLElement>
|
2012-08-22 08:56:38 -07:00
|
|
|
CreateHTMLElement(uint32_t aNodeType, already_AddRefed<nsINodeInfo> aNodeInfo,
|
2010-10-25 05:17:38 -07:00
|
|
|
mozilla::dom::FromParser aFromParser);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
nsresult
|
2010-07-23 02:49:57 -07:00
|
|
|
NS_NewMathMLElement(nsIContent** aResult,
|
|
|
|
already_AddRefed<nsINodeInfo> aNodeInfo);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifdef MOZ_XUL
|
|
|
|
nsresult
|
2010-07-23 02:49:57 -07:00
|
|
|
NS_NewXULElement(nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo);
|
2010-08-19 16:12:46 -07:00
|
|
|
|
|
|
|
void
|
|
|
|
NS_TrustedNewXULElement(nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo);
|
2007-03-22 10:30:00 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
nsresult
|
2010-07-23 02:49:57 -07:00
|
|
|
NS_NewSVGElement(nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo,
|
2010-10-25 05:17:38 -07:00
|
|
|
mozilla::dom::FromParser aFromParser);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
nsresult
|
2010-07-23 02:49:57 -07:00
|
|
|
NS_NewGenConImageContent(nsIContent** aResult,
|
|
|
|
already_AddRefed<nsINodeInfo> aNodeInfo,
|
2007-03-22 10:30:00 -07:00
|
|
|
imgIRequest* aImageRequest);
|
|
|
|
|
|
|
|
nsresult
|
2010-07-23 02:49:57 -07:00
|
|
|
NS_NewXMLEventsElement(nsIContent** aResult,
|
|
|
|
already_AddRefed<nsINodeInfo> aNodeInfo);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#endif // nsContentCreatorFunctions_h__
|