content/base/public/nsContentCreatorFunctions.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #ifndef nsContentCreatorFunctions_h__
michael@0 7 #define nsContentCreatorFunctions_h__
michael@0 8
michael@0 9 #include "nsError.h"
michael@0 10 #include "nsCOMPtr.h"
michael@0 11 #include "mozilla/dom/FromParser.h"
michael@0 12
michael@0 13 /**
michael@0 14 * Functions to create content, to be used only inside Gecko
michael@0 15 * (mozilla/content and mozilla/layout).
michael@0 16 */
michael@0 17
michael@0 18 class nsAString;
michael@0 19 class nsIContent;
michael@0 20 class nsINodeInfo;
michael@0 21 class imgRequestProxy;
michael@0 22 class nsNodeInfoManager;
michael@0 23 class nsGenericHTMLElement;
michael@0 24
michael@0 25 namespace mozilla {
michael@0 26 namespace dom {
michael@0 27 class Element;
michael@0 28 } // namespace dom
michael@0 29 } // namespace mozilla
michael@0 30
michael@0 31 nsresult
michael@0 32 NS_NewElement(mozilla::dom::Element** aResult,
michael@0 33 already_AddRefed<nsINodeInfo>&& aNodeInfo,
michael@0 34 mozilla::dom::FromParser aFromParser);
michael@0 35
michael@0 36 nsresult
michael@0 37 NS_NewXMLElement(mozilla::dom::Element** aResult,
michael@0 38 already_AddRefed<nsINodeInfo>&& aNodeInfo);
michael@0 39
michael@0 40 nsresult
michael@0 41 NS_NewHTMLElement(mozilla::dom::Element** aResult,
michael@0 42 already_AddRefed<nsINodeInfo>&& aNodeInfo,
michael@0 43 mozilla::dom::FromParser aFromParser);
michael@0 44
michael@0 45 // First argument should be nsHTMLTag, but that adds dependency to parser
michael@0 46 // for a bunch of files.
michael@0 47 already_AddRefed<nsGenericHTMLElement>
michael@0 48 CreateHTMLElement(uint32_t aNodeType,
michael@0 49 already_AddRefed<nsINodeInfo>&& aNodeInfo,
michael@0 50 mozilla::dom::FromParser aFromParser);
michael@0 51
michael@0 52 nsresult
michael@0 53 NS_NewMathMLElement(mozilla::dom::Element** aResult,
michael@0 54 already_AddRefed<nsINodeInfo>&& aNodeInfo);
michael@0 55
michael@0 56 #ifdef MOZ_XUL
michael@0 57 nsresult
michael@0 58 NS_NewXULElement(mozilla::dom::Element** aResult,
michael@0 59 already_AddRefed<nsINodeInfo>&& aNodeInfo);
michael@0 60
michael@0 61 void
michael@0 62 NS_TrustedNewXULElement(nsIContent** aResult,
michael@0 63 already_AddRefed<nsINodeInfo>&& aNodeInfo);
michael@0 64 #endif
michael@0 65
michael@0 66 nsresult
michael@0 67 NS_NewSVGElement(mozilla::dom::Element** aResult,
michael@0 68 already_AddRefed<nsINodeInfo>&& aNodeInfo,
michael@0 69 mozilla::dom::FromParser aFromParser);
michael@0 70
michael@0 71 nsresult
michael@0 72 NS_NewGenConImageContent(nsIContent** aResult,
michael@0 73 already_AddRefed<nsINodeInfo>&& aNodeInfo,
michael@0 74 imgRequestProxy* aImageRequest);
michael@0 75
michael@0 76 #endif // nsContentCreatorFunctions_h__

mercurial