2015-05-03 19:32:37 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 11:12:37 +00: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/. */
|
2004-06-25 12:26:02 +00:00
|
|
|
|
|
|
|
#ifndef nsContentCreatorFunctions_h__
|
|
|
|
#define nsContentCreatorFunctions_h__
|
|
|
|
|
2013-10-21 21:23:33 +00:00
|
|
|
#include "nsError.h"
|
2006-10-13 22:54:12 +00:00
|
|
|
#include "nsCOMPtr.h"
|
2010-10-25 12:17:38 +00:00
|
|
|
#include "mozilla/dom/FromParser.h"
|
2004-07-14 22:19:22 +00:00
|
|
|
|
2004-06-25 12:26:02 +00:00
|
|
|
/**
|
|
|
|
* Functions to create content, to be used only inside Gecko
|
|
|
|
* (mozilla/content and mozilla/layout).
|
|
|
|
*/
|
|
|
|
|
|
|
|
class nsIContent;
|
2012-10-12 12:43:01 +00:00
|
|
|
class imgRequestProxy;
|
2006-10-13 22:54:12 +00:00
|
|
|
class nsGenericHTMLElement;
|
2004-06-25 12:26:02 +00:00
|
|
|
|
2013-12-03 14:40:10 +00:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
class Element;
|
2014-06-20 02:01:40 +00:00
|
|
|
class NodeInfo;
|
2013-12-03 14:40:10 +00:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2004-06-25 12:26:02 +00:00
|
|
|
nsresult
|
2013-12-03 14:40:11 +00:00
|
|
|
NS_NewElement(mozilla::dom::Element** aResult,
|
2014-06-20 02:01:40 +00:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
|
2010-10-25 12:17:38 +00:00
|
|
|
mozilla::dom::FromParser aFromParser);
|
2004-06-25 12:26:02 +00:00
|
|
|
|
|
|
|
nsresult
|
2013-12-03 14:40:11 +00:00
|
|
|
NS_NewXMLElement(mozilla::dom::Element** aResult,
|
2014-06-20 02:01:40 +00:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
2004-06-25 12:26:02 +00:00
|
|
|
|
|
|
|
nsresult
|
2013-12-03 14:40:10 +00:00
|
|
|
NS_NewHTMLElement(mozilla::dom::Element** aResult,
|
2014-06-20 02:01:40 +00:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
|
2010-10-25 12:17:38 +00:00
|
|
|
mozilla::dom::FromParser aFromParser);
|
2004-06-25 12:26:02 +00:00
|
|
|
|
2006-10-13 22:54:12 +00:00
|
|
|
// First argument should be nsHTMLTag, but that adds dependency to parser
|
|
|
|
// for a bunch of files.
|
|
|
|
already_AddRefed<nsGenericHTMLElement>
|
2014-03-15 19:00:17 +00:00
|
|
|
CreateHTMLElement(uint32_t aNodeType,
|
2014-06-20 02:01:40 +00:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
|
2010-10-25 12:17:38 +00:00
|
|
|
mozilla::dom::FromParser aFromParser);
|
2006-10-13 22:54:12 +00:00
|
|
|
|
2004-06-25 12:26:02 +00:00
|
|
|
nsresult
|
2013-12-03 14:40:11 +00:00
|
|
|
NS_NewMathMLElement(mozilla::dom::Element** aResult,
|
2014-06-20 02:01:40 +00:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
2004-06-25 12:26:02 +00:00
|
|
|
|
|
|
|
#ifdef MOZ_XUL
|
|
|
|
nsresult
|
2013-12-03 14:40:11 +00:00
|
|
|
NS_NewXULElement(mozilla::dom::Element** aResult,
|
2014-06-20 02:01:40 +00:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
2010-08-19 23:12:46 +00:00
|
|
|
|
|
|
|
void
|
2014-03-15 19:00:17 +00:00
|
|
|
NS_TrustedNewXULElement(nsIContent** aResult,
|
2014-06-20 02:01:40 +00:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
2004-06-25 12:26:02 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
nsresult
|
2013-12-03 14:40:11 +00:00
|
|
|
NS_NewSVGElement(mozilla::dom::Element** aResult,
|
2014-06-20 02:01:40 +00:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
|
2010-10-25 12:17:38 +00:00
|
|
|
mozilla::dom::FromParser aFromParser);
|
2004-06-25 12:26:02 +00:00
|
|
|
|
2004-07-14 22:19:22 +00:00
|
|
|
nsresult
|
2010-07-23 09:49:57 +00:00
|
|
|
NS_NewGenConImageContent(nsIContent** aResult,
|
2014-06-20 02:01:40 +00:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
|
2012-10-12 12:43:01 +00:00
|
|
|
imgRequestProxy* aImageRequest);
|
2004-07-14 22:19:22 +00:00
|
|
|
|
2004-06-25 12:26:02 +00:00
|
|
|
#endif // nsContentCreatorFunctions_h__
|