2015-05-03 22:32:37 +03: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 15:12:37 +04: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 16:26:02 +04:00
|
|
|
|
|
|
|
#ifndef nsContentCreatorFunctions_h__
|
|
|
|
#define nsContentCreatorFunctions_h__
|
|
|
|
|
2013-10-22 01:23:33 +04:00
|
|
|
#include "nsError.h"
|
2006-10-14 02:54:12 +04:00
|
|
|
#include "nsCOMPtr.h"
|
2010-10-25 16:17:38 +04:00
|
|
|
#include "mozilla/dom/FromParser.h"
|
2004-07-15 02:19:22 +04:00
|
|
|
|
2004-06-25 16:26:02 +04:00
|
|
|
/**
|
|
|
|
* Functions to create content, to be used only inside Gecko
|
|
|
|
* (mozilla/content and mozilla/layout).
|
|
|
|
*/
|
|
|
|
|
|
|
|
class nsIContent;
|
2012-10-12 16:43:01 +04:00
|
|
|
class imgRequestProxy;
|
2006-10-14 02:54:12 +04:00
|
|
|
class nsGenericHTMLElement;
|
2004-06-25 16:26:02 +04:00
|
|
|
|
2013-12-03 18:40:10 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
class Element;
|
2014-06-20 06:01:40 +04:00
|
|
|
class NodeInfo;
|
2013-12-03 18:40:10 +04:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2004-06-25 16:26:02 +04:00
|
|
|
nsresult
|
2013-12-03 18:40:11 +04:00
|
|
|
NS_NewElement(mozilla::dom::Element** aResult,
|
2014-06-20 06:01:40 +04:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
|
2016-06-06 13:43:39 +03:00
|
|
|
mozilla::dom::FromParser aFromParser,
|
2016-09-01 13:08:50 +03:00
|
|
|
const nsAString* aIs = nullptr);
|
2004-06-25 16:26:02 +04:00
|
|
|
|
|
|
|
nsresult
|
2013-12-03 18:40:11 +04:00
|
|
|
NS_NewXMLElement(mozilla::dom::Element** aResult,
|
2014-06-20 06:01:40 +04:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
2004-06-25 16:26:02 +04:00
|
|
|
|
|
|
|
nsresult
|
2013-12-03 18:40:10 +04:00
|
|
|
NS_NewHTMLElement(mozilla::dom::Element** aResult,
|
2014-06-20 06:01:40 +04:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
|
2016-06-06 13:43:39 +03:00
|
|
|
mozilla::dom::FromParser aFromParser,
|
2016-09-01 13:08:50 +03:00
|
|
|
const nsAString* aIs = nullptr);
|
2004-06-25 16:26:02 +04:00
|
|
|
|
2006-10-14 02:54:12 +04:00
|
|
|
// First argument should be nsHTMLTag, but that adds dependency to parser
|
|
|
|
// for a bunch of files.
|
|
|
|
already_AddRefed<nsGenericHTMLElement>
|
2014-03-15 23:00:17 +04:00
|
|
|
CreateHTMLElement(uint32_t aNodeType,
|
2014-06-20 06:01:40 +04:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
|
2010-10-25 16:17:38 +04:00
|
|
|
mozilla::dom::FromParser aFromParser);
|
2006-10-14 02:54:12 +04:00
|
|
|
|
2004-06-25 16:26:02 +04:00
|
|
|
nsresult
|
2013-12-03 18:40:11 +04:00
|
|
|
NS_NewMathMLElement(mozilla::dom::Element** aResult,
|
2014-06-20 06:01:40 +04:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
2004-06-25 16:26:02 +04:00
|
|
|
|
|
|
|
#ifdef MOZ_XUL
|
|
|
|
nsresult
|
2013-12-03 18:40:11 +04:00
|
|
|
NS_NewXULElement(mozilla::dom::Element** aResult,
|
2014-06-20 06:01:40 +04:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
2010-08-20 03:12:46 +04:00
|
|
|
|
|
|
|
void
|
2014-03-15 23:00:17 +04:00
|
|
|
NS_TrustedNewXULElement(nsIContent** aResult,
|
2014-06-20 06:01:40 +04:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
2004-06-25 16:26:02 +04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
nsresult
|
2013-12-03 18:40:11 +04:00
|
|
|
NS_NewSVGElement(mozilla::dom::Element** aResult,
|
2014-06-20 06:01:40 +04:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
|
2010-10-25 16:17:38 +04:00
|
|
|
mozilla::dom::FromParser aFromParser);
|
2004-06-25 16:26:02 +04:00
|
|
|
|
2004-07-15 02:19:22 +04:00
|
|
|
nsresult
|
2010-07-23 13:49:57 +04:00
|
|
|
NS_NewGenConImageContent(nsIContent** aResult,
|
2014-06-20 06:01:40 +04:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
|
2012-10-12 16:43:01 +04:00
|
|
|
imgRequestProxy* aImageRequest);
|
2004-07-15 02:19:22 +04:00
|
|
|
|
2004-06-25 16:26:02 +04:00
|
|
|
#endif // nsContentCreatorFunctions_h__
|