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__
|
|
|
|
|
2013-10-21 14:23:33 -07:00
|
|
|
#include "nsError.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#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;
|
2012-10-12 05:43:01 -07:00
|
|
|
class imgRequestProxy;
|
2007-03-22 10:30:00 -07:00
|
|
|
class nsNodeInfoManager;
|
|
|
|
class nsGenericHTMLElement;
|
|
|
|
|
2013-12-03 06:40:10 -08:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
class Element;
|
2014-06-19 19:01:40 -07:00
|
|
|
class NodeInfo;
|
2013-12-03 06:40:10 -08:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
nsresult
|
2013-12-03 06:40:11 -08:00
|
|
|
NS_NewElement(mozilla::dom::Element** aResult,
|
2014-06-19 19:01:40 -07:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
|
2010-10-25 05:17:38 -07:00
|
|
|
mozilla::dom::FromParser aFromParser);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
nsresult
|
2013-12-03 06:40:11 -08:00
|
|
|
NS_NewXMLElement(mozilla::dom::Element** aResult,
|
2014-06-19 19:01:40 -07:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
nsresult
|
2013-12-03 06:40:10 -08:00
|
|
|
NS_NewHTMLElement(mozilla::dom::Element** aResult,
|
2014-06-19 19:01:40 -07:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& 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>
|
2014-03-15 12:00:17 -07:00
|
|
|
CreateHTMLElement(uint32_t aNodeType,
|
2014-06-19 19:01:40 -07:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
|
2010-10-25 05:17:38 -07:00
|
|
|
mozilla::dom::FromParser aFromParser);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
nsresult
|
2013-12-03 06:40:11 -08:00
|
|
|
NS_NewMathMLElement(mozilla::dom::Element** aResult,
|
2014-06-19 19:01:40 -07:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifdef MOZ_XUL
|
|
|
|
nsresult
|
2013-12-03 06:40:11 -08:00
|
|
|
NS_NewXULElement(mozilla::dom::Element** aResult,
|
2014-06-19 19:01:40 -07:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
2010-08-19 16:12:46 -07:00
|
|
|
|
|
|
|
void
|
2014-03-15 12:00:17 -07:00
|
|
|
NS_TrustedNewXULElement(nsIContent** aResult,
|
2014-06-19 19:01:40 -07:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
2007-03-22 10:30:00 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
nsresult
|
2013-12-03 06:40:11 -08:00
|
|
|
NS_NewSVGElement(mozilla::dom::Element** aResult,
|
2014-06-19 19:01:40 -07:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& 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,
|
2014-06-19 19:01:40 -07:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
|
2012-10-12 05:43:01 -07:00
|
|
|
imgRequestProxy* aImageRequest);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#endif // nsContentCreatorFunctions_h__
|