Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
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 | #include "nsISupports.idl" |
michael@0 | 7 | |
michael@0 | 8 | interface nsIAtom; |
michael@0 | 9 | interface nsIDOMNode; |
michael@0 | 10 | interface nsIRDFResource; |
michael@0 | 11 | |
michael@0 | 12 | /** |
michael@0 | 13 | * A single result generated from a template query. Each result is identified |
michael@0 | 14 | * by an id, which must be unique within the set of results produced from a |
michael@0 | 15 | * query. The result may optionally be identified by an RDF resource. |
michael@0 | 16 | * |
michael@0 | 17 | * Generally, the result and its id will be able to uniquely identify a node |
michael@0 | 18 | * in the source data, such as an RDF or XML node. In other contexts, such as |
michael@0 | 19 | * a database query, a result would represent a particular record. |
michael@0 | 20 | * |
michael@0 | 21 | * A result is expected to only be created by a query processor. |
michael@0 | 22 | * |
michael@0 | 23 | * Each result also contains a set of variable bindings. The value for a |
michael@0 | 24 | * particular variable may be retrieved using the getBindingFor and |
michael@0 | 25 | * getBindingObjectFor methods. |
michael@0 | 26 | */ |
michael@0 | 27 | [scriptable, uuid(ebea0230-36fa-41b7-8e31-760806057965)] |
michael@0 | 28 | interface nsIXULTemplateResult : nsISupports |
michael@0 | 29 | { |
michael@0 | 30 | /** |
michael@0 | 31 | * True if the result represents a container. |
michael@0 | 32 | */ |
michael@0 | 33 | readonly attribute boolean isContainer; |
michael@0 | 34 | |
michael@0 | 35 | /** |
michael@0 | 36 | * True if the result represents an empty container. |
michael@0 | 37 | */ |
michael@0 | 38 | readonly attribute boolean isEmpty; |
michael@0 | 39 | |
michael@0 | 40 | /** |
michael@0 | 41 | * True if the template builder may use this result as the reference point |
michael@0 | 42 | * for additional recursive processing of the template. The template builder |
michael@0 | 43 | * will reprocess the template using this result as the reference point and |
michael@0 | 44 | * generate output content that is expected to be inserted as children of the |
michael@0 | 45 | * output generated for this result. If false, child content is not |
michael@0 | 46 | * processed. This property identifies only the default handling and may be |
michael@0 | 47 | * overriden by syntax used in the template. |
michael@0 | 48 | */ |
michael@0 | 49 | readonly attribute boolean mayProcessChildren; |
michael@0 | 50 | |
michael@0 | 51 | /** |
michael@0 | 52 | * ID of the result. The DOM element created for this result, if any, will |
michael@0 | 53 | * have its id attribute set to this value. The id must be unique for a |
michael@0 | 54 | * query. |
michael@0 | 55 | */ |
michael@0 | 56 | readonly attribute AString id; |
michael@0 | 57 | |
michael@0 | 58 | /** |
michael@0 | 59 | * Resource for the result, which may be null. If set, the resource uri |
michael@0 | 60 | * must be the same as the ID property. |
michael@0 | 61 | */ |
michael@0 | 62 | readonly attribute nsIRDFResource resource; |
michael@0 | 63 | |
michael@0 | 64 | /** |
michael@0 | 65 | * The type of the object. The predefined value 'separator' may be used |
michael@0 | 66 | * for separators. Other values may be used for application specific |
michael@0 | 67 | * purposes. |
michael@0 | 68 | */ |
michael@0 | 69 | readonly attribute AString type; |
michael@0 | 70 | |
michael@0 | 71 | /** |
michael@0 | 72 | * Get the string representation of the value of a variable for this |
michael@0 | 73 | * result. This string will be used in the action body from a template as |
michael@0 | 74 | * the replacement text. For instance, if the text ?name appears in an |
michael@0 | 75 | * attribute within the action body, it will be replaced with the result |
michael@0 | 76 | * of this method. The question mark is considered part of the variable |
michael@0 | 77 | * name, thus aVar should be ?name and not simply name. |
michael@0 | 78 | * |
michael@0 | 79 | * @param aVar the variable to look up |
michael@0 | 80 | * |
michael@0 | 81 | * @return the value for the variable or a null string if it has no value |
michael@0 | 82 | */ |
michael@0 | 83 | AString getBindingFor(in nsIAtom aVar); |
michael@0 | 84 | |
michael@0 | 85 | /** |
michael@0 | 86 | * Get an object value for a variable such as ?name for this result. |
michael@0 | 87 | * |
michael@0 | 88 | * This method may return null for a variable, even if getBindingFor returns |
michael@0 | 89 | * a non-null value for the same variable. This method is provided as a |
michael@0 | 90 | * convenience when sorting results. |
michael@0 | 91 | * |
michael@0 | 92 | * @param aVar the variable to look up |
michael@0 | 93 | * |
michael@0 | 94 | * @return the value for the variable or null if it has no value |
michael@0 | 95 | */ |
michael@0 | 96 | nsISupports getBindingObjectFor(in nsIAtom aVar); |
michael@0 | 97 | |
michael@0 | 98 | /** |
michael@0 | 99 | * Indicate that a particular rule of a query has matched and that output |
michael@0 | 100 | * will be generated for it. Both the query as compiled by the query |
michael@0 | 101 | * processor's compileQuery method and the XUL <rule> element are supplied. |
michael@0 | 102 | * The query must always be one that was compiled by the query processor |
michael@0 | 103 | * that created this result. The <rule> element must always be a child of |
michael@0 | 104 | * the <query> element that was used to compile the query. |
michael@0 | 105 | * |
michael@0 | 106 | * @param aQuery the query that matched |
michael@0 | 107 | * @param aRuleNode the rule node that matched |
michael@0 | 108 | */ |
michael@0 | 109 | void ruleMatched(in nsISupports aQuery, in nsIDOMNode aRuleNode); |
michael@0 | 110 | |
michael@0 | 111 | /** |
michael@0 | 112 | * Indicate that the output for a result has beeen removed and that the |
michael@0 | 113 | * result is no longer being used by the builder. |
michael@0 | 114 | */ |
michael@0 | 115 | void hasBeenRemoved(); |
michael@0 | 116 | }; |