2004-06-25 12:26:02 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 12:12:37 +01: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 17:23:33 -04:00
|
|
|
#include "nsError.h"
|
2006-10-13 22:54:12 +00:00
|
|
|
#include "nsCOMPtr.h"
|
2010-10-25 15:17:38 +03: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 nsAString;
|
|
|
|
class nsIContent;
|
|
|
|
class nsINodeInfo;
|
2012-10-12 08:43:01 -04:00
|
|
|
class imgRequestProxy;
|
2005-09-24 18:43:15 +00:00
|
|
|
class nsNodeInfoManager;
|
2006-10-13 22:54:12 +00:00
|
|
|
class nsGenericHTMLElement;
|
2004-06-25 12:26:02 +00:00
|
|
|
|
2013-12-03 09:40:10 -05:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
class Element;
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2004-06-25 12:26:02 +00:00
|
|
|
nsresult
|
2013-12-03 09:40:11 -05:00
|
|
|
NS_NewElement(mozilla::dom::Element** aResult,
|
2014-03-15 12:00:17 -07:00
|
|
|
already_AddRefed<nsINodeInfo>&& aNodeInfo,
|
2010-10-25 15:17:38 +03:00
|
|
|
mozilla::dom::FromParser aFromParser);
|
2004-06-25 12:26:02 +00:00
|
|
|
|
|
|
|
nsresult
|
2013-12-03 09:40:11 -05:00
|
|
|
NS_NewXMLElement(mozilla::dom::Element** aResult,
|
2014-03-15 12:00:17 -07:00
|
|
|
already_AddRefed<nsINodeInfo>&& aNodeInfo);
|
2004-06-25 12:26:02 +00:00
|
|
|
|
|
|
|
nsresult
|
2013-12-03 09:40:10 -05:00
|
|
|
NS_NewHTMLElement(mozilla::dom::Element** aResult,
|
2014-03-15 12:00:17 -07:00
|
|
|
already_AddRefed<nsINodeInfo>&& aNodeInfo,
|
2010-10-25 15:17:38 +03: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 12:00:17 -07:00
|
|
|
CreateHTMLElement(uint32_t aNodeType,
|
|
|
|
already_AddRefed<nsINodeInfo>&& aNodeInfo,
|
2010-10-25 15:17:38 +03: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 09:40:11 -05:00
|
|
|
NS_NewMathMLElement(mozilla::dom::Element** aResult,
|
2014-03-15 12:00:17 -07:00
|
|
|
already_AddRefed<nsINodeInfo>&& aNodeInfo);
|
2004-06-25 12:26:02 +00:00
|
|
|
|
|
|
|
#ifdef MOZ_XUL
|
|
|
|
nsresult
|
2013-12-03 09:40:11 -05:00
|
|
|
NS_NewXULElement(mozilla::dom::Element** aResult,
|
2014-03-15 12:00:17 -07:00
|
|
|
already_AddRefed<nsINodeInfo>&& aNodeInfo);
|
2010-08-19 16:12:46 -07:00
|
|
|
|
|
|
|
void
|
2014-03-15 12:00:17 -07:00
|
|
|
NS_TrustedNewXULElement(nsIContent** aResult,
|
|
|
|
already_AddRefed<nsINodeInfo>&& aNodeInfo);
|
2004-06-25 12:26:02 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
nsresult
|
2013-12-03 09:40:11 -05:00
|
|
|
NS_NewSVGElement(mozilla::dom::Element** aResult,
|
2014-03-15 12:00:17 -07:00
|
|
|
already_AddRefed<nsINodeInfo>&& aNodeInfo,
|
2010-10-25 15:17:38 +03: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 12:49:57 +03:00
|
|
|
NS_NewGenConImageContent(nsIContent** aResult,
|
2014-03-15 12:00:17 -07:00
|
|
|
already_AddRefed<nsINodeInfo>&& aNodeInfo,
|
2012-10-12 08:43:01 -04:00
|
|
|
imgRequestProxy* aImageRequest);
|
2004-07-14 22:19:22 +00:00
|
|
|
|
2004-06-25 12:26:02 +00:00
|
|
|
#endif // nsContentCreatorFunctions_h__
|