Tue, 06 Jan 2015 21:39:09 +0100
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 | #include "nsISupports.idl" |
michael@0 | 7 | #include "nsIArray.idl" |
michael@0 | 8 | |
michael@0 | 9 | interface nsIPersistentProperties; |
michael@0 | 10 | interface nsIDOMCSSPrimitiveValue; |
michael@0 | 11 | interface nsIDOMNode; |
michael@0 | 12 | interface nsIAccessibleDocument; |
michael@0 | 13 | interface nsIAccessibleRelation; |
michael@0 | 14 | |
michael@0 | 15 | /** |
michael@0 | 16 | * A cross-platform interface that supports platform-specific |
michael@0 | 17 | * accessibility APIs like MSAA and ATK. Contains the sum of what's needed |
michael@0 | 18 | * to support IAccessible as well as ATK's generic accessibility objects. |
michael@0 | 19 | * Can also be used by in-process accessibility clients to get information |
michael@0 | 20 | * about objects in the accessible tree. The accessible tree is a subset of |
michael@0 | 21 | * nodes in the DOM tree -- such as documents, focusable elements and text. |
michael@0 | 22 | * Mozilla creates the implementations of nsIAccessible on demand. |
michael@0 | 23 | * See http://www.mozilla.org/projects/ui/accessibility for more information. |
michael@0 | 24 | */ |
michael@0 | 25 | [scriptable, uuid(ee62158b-bb83-424b-a88d-d7d7f9cf460d)] |
michael@0 | 26 | interface nsIAccessible : nsISupports |
michael@0 | 27 | { |
michael@0 | 28 | /** |
michael@0 | 29 | * Parent node in accessible tree. |
michael@0 | 30 | */ |
michael@0 | 31 | readonly attribute nsIAccessible parent; |
michael@0 | 32 | |
michael@0 | 33 | /** |
michael@0 | 34 | * Next sibling in accessible tree |
michael@0 | 35 | */ |
michael@0 | 36 | readonly attribute nsIAccessible nextSibling; |
michael@0 | 37 | |
michael@0 | 38 | /** |
michael@0 | 39 | * Previous sibling in accessible tree |
michael@0 | 40 | */ |
michael@0 | 41 | readonly attribute nsIAccessible previousSibling; |
michael@0 | 42 | |
michael@0 | 43 | /** |
michael@0 | 44 | * First child in accessible tree |
michael@0 | 45 | */ |
michael@0 | 46 | readonly attribute nsIAccessible firstChild; |
michael@0 | 47 | |
michael@0 | 48 | /** |
michael@0 | 49 | * Last child in accessible tree |
michael@0 | 50 | */ |
michael@0 | 51 | readonly attribute nsIAccessible lastChild; |
michael@0 | 52 | |
michael@0 | 53 | /** |
michael@0 | 54 | * Array of all this element's children. |
michael@0 | 55 | */ |
michael@0 | 56 | readonly attribute nsIArray children; |
michael@0 | 57 | |
michael@0 | 58 | /** |
michael@0 | 59 | * Number of accessible children |
michael@0 | 60 | */ |
michael@0 | 61 | readonly attribute long childCount; |
michael@0 | 62 | |
michael@0 | 63 | /** |
michael@0 | 64 | * The 0-based index of this accessible in its parent's list of children, |
michael@0 | 65 | * or -1 if this accessible does not have a parent. |
michael@0 | 66 | */ |
michael@0 | 67 | readonly attribute long indexInParent; |
michael@0 | 68 | |
michael@0 | 69 | /** |
michael@0 | 70 | * The DOM node this nsIAccessible is associated with. |
michael@0 | 71 | */ |
michael@0 | 72 | readonly attribute nsIDOMNode DOMNode; |
michael@0 | 73 | |
michael@0 | 74 | /** |
michael@0 | 75 | * The document accessible that this access node resides in. |
michael@0 | 76 | */ |
michael@0 | 77 | readonly attribute nsIAccessibleDocument document; |
michael@0 | 78 | |
michael@0 | 79 | /** |
michael@0 | 80 | * The root document accessible that this access node resides in. |
michael@0 | 81 | */ |
michael@0 | 82 | readonly attribute nsIAccessibleDocument rootDocument; |
michael@0 | 83 | |
michael@0 | 84 | /** |
michael@0 | 85 | * The language for the current DOM node, e.g. en, de, etc. |
michael@0 | 86 | */ |
michael@0 | 87 | readonly attribute DOMString language; |
michael@0 | 88 | |
michael@0 | 89 | /** |
michael@0 | 90 | * Accessible name -- the main text equivalent for this node. The name is |
michael@0 | 91 | * specified by ARIA or by native markup. Example of ARIA markup is |
michael@0 | 92 | * aria-labelledby attribute placed on element of this accessible. Example |
michael@0 | 93 | * of native markup is HTML label linked with HTML element of this accessible. |
michael@0 | 94 | * |
michael@0 | 95 | * Value can be string or null. A null value indicates that AT may attempt to |
michael@0 | 96 | * compute the name. Any string value, including the empty string, should be |
michael@0 | 97 | * considered author-intentional, and respected. |
michael@0 | 98 | */ |
michael@0 | 99 | attribute AString name; |
michael@0 | 100 | |
michael@0 | 101 | /** |
michael@0 | 102 | * Accessible value -- a number or a secondary text equivalent for this node |
michael@0 | 103 | * Widgets that use role attribute can force a value using the valuenow attribute |
michael@0 | 104 | */ |
michael@0 | 105 | readonly attribute AString value; |
michael@0 | 106 | |
michael@0 | 107 | /** |
michael@0 | 108 | * Accessible description -- long text associated with this node |
michael@0 | 109 | */ |
michael@0 | 110 | readonly attribute AString description; |
michael@0 | 111 | |
michael@0 | 112 | /** |
michael@0 | 113 | * Provides localized string of accesskey name, such as Alt+D. |
michael@0 | 114 | * The modifier may be affected by user and platform preferences. |
michael@0 | 115 | * Usually alt+letter, or just the letter alone for menu items. |
michael@0 | 116 | */ |
michael@0 | 117 | readonly attribute AString accessKey; |
michael@0 | 118 | |
michael@0 | 119 | /** |
michael@0 | 120 | * Provides localized string of global keyboard accelerator for default |
michael@0 | 121 | * action, such as Ctrl+O for Open file |
michael@0 | 122 | */ |
michael@0 | 123 | readonly attribute AString keyboardShortcut; |
michael@0 | 124 | |
michael@0 | 125 | /** |
michael@0 | 126 | * Enumerated accessible role (see the constants defined in nsIAccessibleRole). |
michael@0 | 127 | * |
michael@0 | 128 | * @note The values might depend on platform because of variations. Widgets |
michael@0 | 129 | * can use ARIA role attribute to force the final role. |
michael@0 | 130 | */ |
michael@0 | 131 | readonly attribute unsigned long role; |
michael@0 | 132 | |
michael@0 | 133 | /** |
michael@0 | 134 | * Accessible states -- bit fields which describe boolean properties of node. |
michael@0 | 135 | * Many states are only valid given a certain role attribute that supports |
michael@0 | 136 | * them. |
michael@0 | 137 | * |
michael@0 | 138 | * @param aState - the first bit field (see nsIAccessibleStates::STATE_* |
michael@0 | 139 | * constants) |
michael@0 | 140 | * @param aExtraState - the second bit field |
michael@0 | 141 | * (see nsIAccessibleStates::EXT_STATE_* constants) |
michael@0 | 142 | */ |
michael@0 | 143 | void getState(out unsigned long aState, out unsigned long aExtraState); |
michael@0 | 144 | |
michael@0 | 145 | /** |
michael@0 | 146 | * Help text associated with node |
michael@0 | 147 | */ |
michael@0 | 148 | readonly attribute AString help; |
michael@0 | 149 | |
michael@0 | 150 | /** |
michael@0 | 151 | * Focused accessible child of node |
michael@0 | 152 | */ |
michael@0 | 153 | readonly attribute nsIAccessible focusedChild; |
michael@0 | 154 | |
michael@0 | 155 | /** |
michael@0 | 156 | * Attributes of accessible |
michael@0 | 157 | */ |
michael@0 | 158 | readonly attribute nsIPersistentProperties attributes; |
michael@0 | 159 | |
michael@0 | 160 | /** |
michael@0 | 161 | * Returns grouping information. Used for tree items, list items, tab panel |
michael@0 | 162 | * labels, radio buttons, etc. Also used for collectons of non-text objects. |
michael@0 | 163 | * |
michael@0 | 164 | * @param groupLevel - 1-based, similar to ARIA 'level' property |
michael@0 | 165 | * @param similarItemsInGroup - 1-based, similar to ARIA 'setsize' property, |
michael@0 | 166 | * inclusive of the current item |
michael@0 | 167 | * @param positionInGroup - 1-based, similar to ARIA 'posinset' property |
michael@0 | 168 | */ |
michael@0 | 169 | [binaryname(ScriptableGroupPosition)] |
michael@0 | 170 | void groupPosition(out long aGroupLevel, out long aSimilarItemsInGroup, |
michael@0 | 171 | out long aPositionInGroup); |
michael@0 | 172 | |
michael@0 | 173 | /** |
michael@0 | 174 | * Accessible child which contains the coordinate at (x, y) in screen pixels. |
michael@0 | 175 | * If the point is in the current accessible but not in a child, the |
michael@0 | 176 | * current accessible will be returned. |
michael@0 | 177 | * If the point is in neither the current accessible or a child, then |
michael@0 | 178 | * null will be returned. |
michael@0 | 179 | * |
michael@0 | 180 | * @param x screen's x coordinate |
michael@0 | 181 | * @param y screen's y coordinate |
michael@0 | 182 | * @return the deepest accessible child containing the given point |
michael@0 | 183 | */ |
michael@0 | 184 | nsIAccessible getChildAtPoint(in long x, in long y); |
michael@0 | 185 | |
michael@0 | 186 | /** |
michael@0 | 187 | * Deepest accessible child which contains the coordinate at (x, y) in screen |
michael@0 | 188 | * pixels. If the point is in the current accessible but not in a child, the |
michael@0 | 189 | * current accessible will be returned. If the point is in neither the current |
michael@0 | 190 | * accessible or a child, then null will be returned. |
michael@0 | 191 | * |
michael@0 | 192 | * @param x screen's x coordinate |
michael@0 | 193 | * @param y screen's y coordinate |
michael@0 | 194 | * @return the deepest accessible child containing the given point |
michael@0 | 195 | */ |
michael@0 | 196 | nsIAccessible getDeepestChildAtPoint(in long x, in long y); |
michael@0 | 197 | |
michael@0 | 198 | /** |
michael@0 | 199 | * Nth accessible child using zero-based index or last child if index less than zero |
michael@0 | 200 | */ |
michael@0 | 201 | nsIAccessible getChildAt(in long aChildIndex); |
michael@0 | 202 | |
michael@0 | 203 | /** |
michael@0 | 204 | * Return accessible relation by the given relation type (see. |
michael@0 | 205 | * constants defined in nsIAccessibleRelation). |
michael@0 | 206 | */ |
michael@0 | 207 | nsIAccessibleRelation getRelationByType(in unsigned long aRelationType); |
michael@0 | 208 | |
michael@0 | 209 | /** |
michael@0 | 210 | * Returns multiple accessible relations for this object. |
michael@0 | 211 | */ |
michael@0 | 212 | nsIArray getRelations(); |
michael@0 | 213 | |
michael@0 | 214 | /** |
michael@0 | 215 | * Return accessible's x and y coordinates relative to the screen and |
michael@0 | 216 | * accessible's width and height. |
michael@0 | 217 | */ |
michael@0 | 218 | void getBounds(out long x, out long y, out long width, out long height); |
michael@0 | 219 | |
michael@0 | 220 | /** |
michael@0 | 221 | * Add or remove this accessible to the current selection |
michael@0 | 222 | */ |
michael@0 | 223 | void setSelected(in boolean isSelected); |
michael@0 | 224 | |
michael@0 | 225 | /** |
michael@0 | 226 | * Extend the current selection from its current accessible anchor node |
michael@0 | 227 | * to this accessible |
michael@0 | 228 | */ |
michael@0 | 229 | void extendSelection(); |
michael@0 | 230 | |
michael@0 | 231 | /** |
michael@0 | 232 | * Select this accessible node only |
michael@0 | 233 | */ |
michael@0 | 234 | void takeSelection(); |
michael@0 | 235 | |
michael@0 | 236 | /** |
michael@0 | 237 | * Focus this accessible node, |
michael@0 | 238 | * The state STATE_FOCUSABLE indicates whether this node is normally focusable. |
michael@0 | 239 | * It is the callers responsibility to determine whether this node is focusable. |
michael@0 | 240 | * accTakeFocus on a node that is not normally focusable (such as a table), |
michael@0 | 241 | * will still set focus on that node, although normally that will not be visually |
michael@0 | 242 | * indicated in most style sheets. |
michael@0 | 243 | */ |
michael@0 | 244 | void takeFocus(); |
michael@0 | 245 | |
michael@0 | 246 | /** |
michael@0 | 247 | * The number of accessible actions associated with this accessible |
michael@0 | 248 | */ |
michael@0 | 249 | readonly attribute uint8_t actionCount; |
michael@0 | 250 | |
michael@0 | 251 | /** |
michael@0 | 252 | * The name of the accessible action at the given zero-based index |
michael@0 | 253 | */ |
michael@0 | 254 | AString getActionName(in uint8_t index); |
michael@0 | 255 | |
michael@0 | 256 | /** |
michael@0 | 257 | * The description of the accessible action at the given zero-based index |
michael@0 | 258 | */ |
michael@0 | 259 | AString getActionDescription(in uint8_t aIndex); |
michael@0 | 260 | |
michael@0 | 261 | /** |
michael@0 | 262 | * Perform the accessible action at the given zero-based index |
michael@0 | 263 | * Action number 0 is the default action |
michael@0 | 264 | */ |
michael@0 | 265 | void doAction(in uint8_t index); |
michael@0 | 266 | |
michael@0 | 267 | /** |
michael@0 | 268 | * Makes an object visible on screen. |
michael@0 | 269 | * |
michael@0 | 270 | * @param scrollType - defines where the object should be placed on |
michael@0 | 271 | * the screen (see nsIAccessibleScrollType for |
michael@0 | 272 | * available constants). |
michael@0 | 273 | */ |
michael@0 | 274 | void scrollTo(in unsigned long aScrollType); |
michael@0 | 275 | |
michael@0 | 276 | /** |
michael@0 | 277 | * Moves the top left of an object to a specified location. |
michael@0 | 278 | * |
michael@0 | 279 | * @param coordinateType [in] - specifies whether the coordinates are relative to |
michael@0 | 280 | * the screen or the parent object (for available |
michael@0 | 281 | * constants refer to nsIAccessibleCoordinateType) |
michael@0 | 282 | * @param x [in] - defines the x coordinate |
michael@0 | 283 | * @param y [in] - defines the y coordinate |
michael@0 | 284 | */ |
michael@0 | 285 | void scrollToPoint(in unsigned long coordinateType, in long x, in long y); |
michael@0 | 286 | |
michael@0 | 287 | /** |
michael@0 | 288 | * Get a pointer to accessibility interface for this node, which is specific |
michael@0 | 289 | * to the OS/accessibility toolkit we're running on. |
michael@0 | 290 | */ |
michael@0 | 291 | [noscript] void getNativeInterface(out voidPtr aOutAccessible); |
michael@0 | 292 | }; |
michael@0 | 293 |