accessible/public/nsIAccessibleHyperLink.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: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
michael@0 2 *
michael@0 3 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 6
michael@0 7 #include "nsISupports.idl"
michael@0 8
michael@0 9 interface nsIURI;
michael@0 10 interface nsIAccessible;
michael@0 11
michael@0 12 /**
michael@0 13 * A cross-platform interface that supports hyperlink-specific properties and
michael@0 14 * methods. Anchors, image maps, xul:labels with class="text-link" implement this interface.
michael@0 15 */
michael@0 16 [scriptable, uuid(883643d4-93a5-4f32-922c-6f06e01363c1)]
michael@0 17 interface nsIAccessibleHyperLink : nsISupports
michael@0 18 {
michael@0 19 /**
michael@0 20 * Returns the offset of the link within the parent accessible.
michael@0 21 */
michael@0 22 readonly attribute long startIndex;
michael@0 23
michael@0 24 /**
michael@0 25 * Returns the end index of the link within the parent accessible.
michael@0 26 *
michael@0 27 * @note The link itself is represented by one embedded character within the
michael@0 28 * parent text, so the endIndex should be startIndex + 1.
michael@0 29 */
michael@0 30 readonly attribute long endIndex;
michael@0 31
michael@0 32 /**
michael@0 33 * Determines whether the link is valid (e. g. points to a valid URL).
michael@0 34 *
michael@0 35 * @note XXX Currently only used with ARIA links, and the author has to
michael@0 36 * specify that the link is invalid via the aria-invalid="true" attribute.
michael@0 37 * In all other cases, TRUE is returned.
michael@0 38 */
michael@0 39 readonly attribute boolean valid;
michael@0 40
michael@0 41 /**
michael@0 42 * The numbber of anchors within this Hyperlink. Is normally 1 for anchors.
michael@0 43 * This anchor is, for example, the visible output of the html:a tag.
michael@0 44 * With an Image Map, reflects the actual areas within the map.
michael@0 45 */
michael@0 46 readonly attribute long anchorCount;
michael@0 47
michael@0 48 /**
michael@0 49 * Returns the URI at the given index.
michael@0 50 *
michael@0 51 * @note ARIA hyperlinks do not have an URI to point to, since clicks are
michael@0 52 * processed via JavaScript. Therefore this property does not work on ARIA
michael@0 53 * links.
michael@0 54 *
michael@0 55 * @param index The 0-based index of the URI to be returned.
michael@0 56 *
michael@0 57 * @return the nsIURI object containing the specifications for the URI.
michael@0 58 */
michael@0 59 nsIURI getURI (in long index);
michael@0 60
michael@0 61 /**
michael@0 62 * Returns a reference to the object at the given index.
michael@0 63 *
michael@0 64 * @param index The 0-based index whose object is to be returned.
michael@0 65 *
michael@0 66 * @return the nsIAccessible object at the desired index.
michael@0 67 */
michael@0 68 nsIAccessible getAnchor (in long index);
michael@0 69 };
michael@0 70
michael@0 71 /*
michael@0 72 Assumptions:
michael@0 73
michael@0 74 The object associated with object or anchor index
michael@0 75 is an nsIAccessible.
michael@0 76 A URI can be represented by the nsIURI interface
michael@0 77 (or nsIURL interface).
michael@0 78
michael@0 79 Note that an object which supports nsIAccessibleHyperlink
michael@0 80 does *not* generally implement nsIAccessible, unlike the
michael@0 81 case of the other nsiAccessible* interfaces in this directory.
michael@0 82
michael@0 83 Aaron: would the nsISupports return from
michael@0 84 getObject be queryable for nsIURI and nsIURL directly?
michael@0 85
michael@0 86 */

mercurial