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).
|
|
|
|
*/
|
|
|
|
|
2018-03-20 03:44:28 +03:00
|
|
|
class nsAtom;
|
2004-06-25 16:26:02 +04:00
|
|
|
class nsIContent;
|
2019-01-02 16:05:23 +03:00
|
|
|
|
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;
|
2017-10-26 09:55:41 +03:00
|
|
|
struct CustomElementDefinition;
|
2013-12-03 18:40:10 +04:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2013-12-03 18:40:11 +04:00
|
|
|
nsresult 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
|
|
|
|
2013-12-03 18:40:11 +04:00
|
|
|
nsresult 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
|
|
|
|
2013-12-03 18:40:10 +04:00
|
|
|
nsresult 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, nsAtom* aIsAtom = nullptr,
|
2017-10-26 09:55:41 +03:00
|
|
|
mozilla::dom::CustomElementDefinition* aDefinition = 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> CreateHTMLElement(
|
2014-06-20 06:01:40 +04:00
|
|
|
uint32_t aNodeType, 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
|
|
|
|
2013-12-03 18:40:11 +04:00
|
|
|
nsresult 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
|
2013-12-03 18:40:11 +04:00
|
|
|
nsresult NS_NewXULElement(
|
|
|
|
mozilla::dom::Element** aResult,
|
2017-10-11 01:25:10 +03:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
|
2018-05-11 22:44:46 +03:00
|
|
|
mozilla::dom::FromParser aFromParser, nsAtom* aIsAtom = nullptr,
|
|
|
|
mozilla::dom::CustomElementDefinition* aDefinition = nullptr);
|
2010-08-20 03:12:46 +04:00
|
|
|
|
2017-12-05 20:05:51 +03:00
|
|
|
void NS_TrustedNewXULElement(
|
|
|
|
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
|
|
|
#endif
|
|
|
|
|
2013-12-03 18:40:11 +04:00
|
|
|
nsresult 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
|
|
|
|
|
|
|
#endif // nsContentCreatorFunctions_h__
|