dom/xslt/nsIXSLTProcessor.idl

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: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #include "domstubs.idl"
michael@0 7
michael@0 8 interface nsIVariant;
michael@0 9
michael@0 10 [scriptable, uuid(4a91aeb3-4100-43ee-a21e-9866268757c5)]
michael@0 11 interface nsIXSLTProcessor : nsISupports
michael@0 12 {
michael@0 13 /**
michael@0 14 * Import the stylesheet into this XSLTProcessor for transformations.
michael@0 15 *
michael@0 16 * @param style The root-node of a XSLT stylesheet. This can be either
michael@0 17 * a document node or an element node. If a document node
michael@0 18 * then the document can contain either a XSLT stylesheet
michael@0 19 * or a LRE stylesheet.
michael@0 20 * If the argument is an element node it must be the
michael@0 21 * xsl:stylesheet (or xsl:transform) element of an XSLT
michael@0 22 * stylesheet.
michael@0 23 *
michael@0 24 * @exception nsIXSLTException
michael@0 25 */
michael@0 26 void importStylesheet(in nsIDOMNode style);
michael@0 27
michael@0 28 /**
michael@0 29 * Transforms the node source applying the stylesheet given by
michael@0 30 * the importStylesheet() function. The owner document of the output node
michael@0 31 * owns the returned document fragment.
michael@0 32 *
michael@0 33 * @param source The node to be transformed
michael@0 34 * @param output This document is used to generate the output
michael@0 35 * @return DocumentFragment The result of the transformation
michael@0 36 *
michael@0 37 * @exception nsIXSLTException
michael@0 38 */
michael@0 39 nsIDOMDocumentFragment transformToFragment(in nsIDOMNode source,
michael@0 40 in nsIDOMDocument output);
michael@0 41
michael@0 42 /**
michael@0 43 * Transforms the node source applying the stylesheet given by the
michael@0 44 * importStylesheet() function.
michael@0 45 *
michael@0 46 * @param source The node to be transformed
michael@0 47 * @return Document The result of the transformation
michael@0 48 *
michael@0 49 * @exception nsIXSLTException
michael@0 50 */
michael@0 51 nsIDOMDocument transformToDocument(in nsIDOMNode source);
michael@0 52
michael@0 53 /**
michael@0 54 * Sets a parameter to be used in subsequent transformations with this
michael@0 55 * nsIXSLTProcessor. If the parameter doesn't exist in the stylesheet the
michael@0 56 * parameter will be ignored.
michael@0 57 *
michael@0 58 * @param namespaceURI The namespaceURI of the XSLT parameter
michael@0 59 * @param localName The local name of the XSLT parameter
michael@0 60 * @param value The new value of the XSLT parameter
michael@0 61 *
michael@0 62 * @exception NS_ERROR_ILLEGAL_VALUE The datatype of value is
michael@0 63 * not supported
michael@0 64 */
michael@0 65 void setParameter(in DOMString namespaceURI,
michael@0 66 in DOMString localName,
michael@0 67 in nsIVariant value);
michael@0 68
michael@0 69 /**
michael@0 70 * Gets a parameter if previously set by setParameter. Returns null
michael@0 71 * otherwise.
michael@0 72 *
michael@0 73 * @param namespaceURI The namespaceURI of the XSLT parameter
michael@0 74 * @param localName The local name of the XSLT parameter
michael@0 75 * @return nsIVariant The value of the XSLT parameter
michael@0 76 */
michael@0 77 nsIVariant getParameter(in DOMString namespaceURI,
michael@0 78 in DOMString localName);
michael@0 79 /**
michael@0 80 * Removes a parameter, if set. This will make the processor use the
michael@0 81 * default-value for the parameter as specified in the stylesheet.
michael@0 82 *
michael@0 83 * @param namespaceURI The namespaceURI of the XSLT parameter
michael@0 84 * @param localName The local name of the XSLT parameter
michael@0 85 */
michael@0 86 void removeParameter(in DOMString namespaceURI,
michael@0 87 in DOMString localName);
michael@0 88
michael@0 89 /**
michael@0 90 * Removes all set parameters from this nsIXSLTProcessor. This will make
michael@0 91 * the processor use the default-value for all parameters as specified in
michael@0 92 * the stylesheet.
michael@0 93 */
michael@0 94 void clearParameters();
michael@0 95
michael@0 96 /**
michael@0 97 * Remove all parameters and stylesheets from this nsIXSLTProcessor.
michael@0 98 */
michael@0 99 void reset();
michael@0 100 };

mercurial