Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Properties
nsAccessible Class Reference

#include <nsAccessible.h>

Inheritance diagram for nsAccessible:
Inheritance graph
[legend]
Collaboration diagram for nsAccessible:
Collaboration graph
[legend]

List of all members.

Public Types

enum  {
  eAction_Switch = 0, eAction_Jump = 0, eAction_Click = 0, eAction_Select = 0,
  eAction_Expand = 1
}
enum  { eNo_Action = 0, eSingle_Action = 1, eDouble_Action = 2 }
enum  { ROLE_TITLEBAR = 1U }
enum  { ROLE_MENUBAR = 2U }
enum  { ROLE_SCROLLBAR = 3U }
enum  { ROLE_GRIP = 4U }
enum  { ROLE_SOUND = 5U }
enum  { ROLE_CURSOR = 6U }
enum  { ROLE_CARET = 7U }
enum  { ROLE_ALERT = 8U }
enum  { ROLE_WINDOW = 9U }
enum  { ROLE_CLIENT = 10U }
enum  { ROLE_MENUPOPUP = 11U }
enum  { ROLE_MENUITEM = 12U }
enum  { ROLE_RADIO_MENU_ITEM = 12U }
enum  { ROLE_CHECK_MENU_ITEM = 12U }
enum  { ROLE_TOOLTIP = 13U }
enum  { ROLE_APPLICATION = 14U }
enum  { ROLE_DOCUMENT = 15U }
enum  { ROLE_PANE = 16U }
enum  { ROLE_CHART = 17U }
enum  { ROLE_DIALOG = 18U }
enum  { ROLE_BORDER = 19U }
enum  { ROLE_GROUPING = 20U }
enum  { ROLE_SEPARATOR = 21U }
enum  { ROLE_TOOLBAR = 22U }
enum  { ROLE_STATUSBAR = 23U }
enum  { ROLE_TABLE = 24U }
enum  { ROLE_COLUMNHEADER = 25U }
enum  { ROLE_ROWHEADER = 26U }
enum  { ROLE_COLUMN = 27U }
enum  { ROLE_ROW = 28U }
enum  { ROLE_CELL = 29U }
enum  { ROLE_LINK = 30U }
enum  { ROLE_HELPBALLOON = 31U }
enum  { ROLE_CHARACTER = 32U }
enum  { ROLE_LIST = 33U }
enum  { ROLE_LISTITEM = 34U }
enum  { ROLE_OUTLINE = 35U }
enum  { ROLE_TREE_TABLE = 35U }
enum  { ROLE_OUTLINEITEM = 36U }
enum  { ROLE_PAGETAB = 37U }
enum  { ROLE_PROPERTYPAGE = 38U }
enum  { ROLE_INDICATOR = 39U }
enum  { ROLE_GRAPHIC = 40U }
enum  { ROLE_STATICTEXT = 41U }
enum  { ROLE_TEXT = 42U }
enum  { ROLE_PUSHBUTTON = 43U }
enum  { ROLE_CHECKBUTTON = 44U }
enum  { ROLE_RADIOBUTTON = 45U }
enum  { ROLE_COMBOBOX = 46U }
enum  { ROLE_DROPLIST = 47U }
enum  { ROLE_PROGRESSBAR = 48U }
enum  { ROLE_DIAL = 49U }
enum  { ROLE_HOTKEYFIELD = 50U }
enum  { ROLE_SLIDER = 51U }
enum  { ROLE_SPINBUTTON = 52U }
enum  { ROLE_DIAGRAM = 53U }
enum  { ROLE_ANIMATION = 54U }
enum  { ROLE_EQUATION = 55U }
enum  { ROLE_BUTTONDROPDOWN = 56U }
enum  { ROLE_BUTTONMENU = 57U }
enum  { ROLE_BUTTONDROPDOWNGRID = 58U }
enum  { ROLE_WHITESPACE = 59U }
enum  { ROLE_PAGETABLIST = 60U }
enum  { ROLE_CLOCK = 61U }
enum  { ROLE_SPLITBUTTON = 62U }
enum  { ROLE_IPADDRESS = 63U }
enum  { ROLE_NOTHING = 4294967295U }
enum  { ROLE_ICON = ROLE_NOTHING }
enum  { ROLE_PASSWORD_TEXT = ROLE_TEXT }
enum  { ROLE_AUTOCOMPLETE = ROLE_COMBOBOX }
enum  { ROLE_EDITBAR = ROLE_NOTHING }
enum  { ROLE_EMBEDDED = ROLE_NOTHING }
enum  { ROLE_ENTRY = ROLE_NOTHING }
enum  { ROLE_CAPTION = ROLE_NOTHING }
enum  { ROLE_DOCUMENT_FRAME = ROLE_NOTHING }
enum  { ROLE_HEADING = ROLE_NOTHING }
enum  { ROLE_PAGE = ROLE_NOTHING }
enum  { ROLE_SECTION = ROLE_NOTHING }
enum  { ROLE_REDUNDANT_OBJECT = ROLE_NOTHING }
enum  { NAVRELATION_CONTROLLED_BY = 0x1000 }
enum  { NAVRELATION_CONTROLLER_FOR = 0x1001 }
enum  { NAVRELATION_LABEL_FOR = 0x1002 }
enum  { NAVRELATION_LABELLED_BY = 0x1003 }
enum  { NAVRELATION_MEMBER_OF = 0x1004 }
enum  { NAVRELATION_NODE_CHILD_OF = 0x1005 }
enum  { NAVRELATION_FLOWS_TO = 0x1006 }
enum  { NAVRELATION_FLOWS_FROM = 0x1007 }
enum  { NAVRELATION_SUBWINDOW_OF = 0x1008 }
enum  { NAVRELATION_EMBEDS = 0x1009 }
enum  { NAVRELATION_EMBEDDED_BY = 0x100a }
enum  { NAVRELATION_POPUP_FOR = 0x100b }
enum  { NAVRELATION_PARENT_WINDOW_OF = 0x100c }
enum  { NAVRELATION_DEFAULT_BUTTON = 0x100d }
enum  { NAVRELATION_DESCRIBED_BY = 0x100e }
enum  { NAVRELATION_DESCRIPTION_FOR = 0x100f }
enum  { eSelection_Add = 0U, eSelection_Remove = 1U, eSelection_GetState = 2U }

Public Member Functions

 nsAccessible (nsIDOMNode *aNode, nsIWeakReference *aShell)
virtual ~nsAccessible ()
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLE
NS_DECL_NSPIACCESSIBLE
NS_DECL_NSIACCESSIBLESELECTABLE
NS_IMETHOD 
Init ()
NS_IMETHOD Shutdown ()
NS_IMETHOD GetState (PRUint32 *aState)
NS_IMETHOD GetValue (nsAString &aValue)
 STDMETHODIMP_ (ULONG) AddRef()
 STDMETHODIMP_ (ULONG) Release()
STDMETHODIMP QueryInterface (REFIID, void **)
NS_IMETHOD QueryInterface (REFNSIID aIID, void **aInstancePtr)
virtual long QueryInterface ()=0
virtual HRESULT STDMETHODCALLTYPE get_nodeInfo (BSTR __RPC_FAR *tagName, short __RPC_FAR *nameSpaceID, BSTR __RPC_FAR *nodeValue, unsigned int __RPC_FAR *numChildren, unsigned int __RPC_FAR *aUniqueID, unsigned short __RPC_FAR *nodeType)
virtual HRESULT STDMETHODCALLTYPE get_attributes (unsigned short maxAttribs, BSTR __RPC_FAR *attribNames, short __RPC_FAR *nameSpaceID, BSTR __RPC_FAR *attribValues, unsigned short __RPC_FAR *numAttribs)
virtual HRESULT STDMETHODCALLTYPE get_attributesForNames (unsigned short maxAttribs, BSTR __RPC_FAR *attribNames, short __RPC_FAR *nameSpaceID, BSTR __RPC_FAR *attribValues)
virtual HRESULT STDMETHODCALLTYPE get_computedStyle (unsigned short maxStyleProperties, boolean useAlternateView, BSTR __RPC_FAR *styleProperties, BSTR __RPC_FAR *styleValues, unsigned short __RPC_FAR *numStyleProperties)
virtual HRESULT STDMETHODCALLTYPE get_computedStyleForProperties (unsigned short numStyleProperties, boolean useAlternateView, BSTR __RPC_FAR *styleProperties, BSTR __RPC_FAR *styleValues)
virtual HRESULT STDMETHODCALLTYPE scrollTo (boolean scrollTopLeft)
virtual HRESULT STDMETHODCALLTYPE get_parentNode (ISimpleDOMNode __RPC_FAR *__RPC_FAR *node)
virtual HRESULT STDMETHODCALLTYPE get_firstChild (ISimpleDOMNode __RPC_FAR *__RPC_FAR *node)
virtual HRESULT STDMETHODCALLTYPE get_lastChild (ISimpleDOMNode __RPC_FAR *__RPC_FAR *node)
virtual HRESULT STDMETHODCALLTYPE get_previousSibling (ISimpleDOMNode __RPC_FAR *__RPC_FAR *node)
virtual HRESULT STDMETHODCALLTYPE get_nextSibling (ISimpleDOMNode __RPC_FAR *__RPC_FAR *node)
virtual HRESULT STDMETHODCALLTYPE get_childAt (unsigned childIndex, ISimpleDOMNode __RPC_FAR *__RPC_FAR *node)
virtual HRESULT STDMETHODCALLTYPE get_innerHTML (BSTR __RPC_FAR *innerHTML)
virtual HRESULT STDMETHODCALLTYPE get_localInterface (void __RPC_FAR *__RPC_FAR *localInterface)
virtual HRESULT STDMETHODCALLTYPE get_language (BSTR __RPC_FAR *language)
 NS_IMETHOD_ (nsrefcnt) AddRef(void)
 NS_IMETHOD_ (nsrefcnt) Release(void)
nsIAccessNode getChildNodeAt (in long childNum)
 Get the nth child of this node.
DOMString getComputedStyleValue (in DOMString pseudoElt, in DOMString propertyName)
 Retrieve the computed style value for this DOM node, if it is a DOM element.
void init ()
void shutdown ()
nsIFrame GetFrame ()
virtual long AddRef ()=0
virtual long Release ()=0
nsIAccessible getChildAtPoint (in long x, in long y)
 Accessible child which contains the coordinate at x,y.
nsIAccessible getChildAt (in long aChildIndex)
 Nth accessible child using zero-based index or last child if index less than zero.
nsIAccessible getAccessibleToRight ()
 Accessible node geometrically to the right of this one.
nsIAccessible getAccessibleToLeft ()
 Accessible node geometrically to the left of this one.
nsIAccessible getAccessibleAbove ()
 Accessible node geometrically above this one.
nsIAccessible getAccessibleBelow ()
 Accessible node geometrically below this one.
nsIAccessible getAccessibleRelated (in unsigned long aRelationType)
 Accessible node related to this one.
void getBounds (out long x, out long y, out long width, out long height)
void addSelection ()
 Add this accessible to the current selection.
void removeSelection ()
 Remove this accessible from the current selection.
void extendSelection ()
 Extend the current selection from its current accessible anchor node to this accessible.
void takeSelection ()
 Select this accessible node only.
void takeFocus ()
 Focus this accessible node, The state STATE_FOCUSABLE indicates whether this node is normally focusable.
AString getActionName (in PRUint8 index)
 The name of the accessible action at the given zero-based index.
void doAction (in PRUint8 index)
 Perform the accessible action at the given zero-based index Action number 0 is the default action.
void getNativeInterface (out voidPtr aOutAccessible)
 Get a pointer to accessibility interface for this node, which is specific to the OS/accessibility toolkit we're running on.
void setParent (in nsIAccessible aAccParent)
void setFirstChild (in nsIAccessible aAccFirstChild)
void setNextSibling (in nsIAccessible aAccNextSibling)
void invalidateChildren ()
 Set the child count to -1 (unknown) and null out cached child pointers.
void fireToolkitEvent (in unsigned long aEvent, in nsIAccessible aTarget, in voidPtr aData)
nsIArray GetSelectedChildren ()
 Return an nsIArray of selected nsIAccessible children.
void addChildToSelection (in long index)
 Adds the specified accessible child of the object to the object's selection.
void removeChildFromSelection (in long index)
 Removes the specified child of the object from the object's selection.
void clearSelection ()
 Clears the selection in the object so that no children in the object are selected.
nsIAccessible refSelection (in long index)
 Returns a reference to the accessible object representing the specified selected child of the object.
boolean isChildSelected (in long index)
 Determines if the current child of this object is selected.
boolean selectAllSelection ()
 Select all children.

Static Public Member Functions

static PRBool IsCorrectFrameType (nsIFrame *aFrame, nsIAtom *aAtom)
 Static Helper method to help sub classes make sure they have the proper frame when walking the frame tree to get at children and such.
static void InitAccessibility ()
static void InitAccessibility ()
static void InitAccessibility ()
static void InitAccessibility ()
static void ShutdownAccessibility ()
static void ShutdownAccessibility ()
static void ShutdownAccessibility ()
static void ShutdownAccessibility ()
NS_DECL_NSIACCESSNODE static
NS_DECL_NSPIACCESSNODE void 
InitXPAccessibility ()
static void ShutdownXPAccessibility ()
static void PutCacheEntry (nsInterfaceHashtable< nsVoidHashKey, nsIAccessNode > &aCache, void *aUniqueID, nsIAccessNode *aAccessNode)
static void GetCacheEntry (nsInterfaceHashtable< nsVoidHashKey, nsIAccessNode > &aCache, void *aUniqueID, nsIAccessNode **aAccessNode)
static void ClearCache (nsInterfaceHashtable< nsVoidHashKey, nsIAccessNode > &aCache)
static PLDHashOperator PR_CALLBACK ClearCacheEntry (const void *aKey, nsCOMPtr< nsIAccessNode > &aAccessNode, void *aUserArg)
static already_AddRefed
< nsIAccessibleDocument
GetDocAccessibleFor (nsIWeakReference *aPresShell)
static already_AddRefed
< nsIAccessibleDocument
GetDocAccessibleFor (nsISupports *aContainer)
static already_AddRefed
< nsIAccessibleDocument
GetDocAccessibleFor (nsIDOMNode *aNode)
static already_AddRefed
< nsIDocShellTreeItem
GetDocShellTreeItemFor (nsIDOMNode *aStartNode)
static already_AddRefed
< nsIPresShell
GetPresShellFor (nsIDOMNode *aStartNode)
static PRBool HasRoleAttribute (nsIContent *aContent)
static PRBool GetRoleAttribute (nsIContent *aContent, nsAString &aRole)

Public Attributes

readonly attribute nsIDOMNode DOMNode
 The DOM node this nsIAccessNode is associated with.
readonly attribute long numChildren
 The number of DOM children for the DOM node, which matches the number of nsIAccessNode children for this nsIAccessNode.
readonly attribute nsIAccessNode parentNode
 The parent nsIAccessNode.
readonly attribute nsIAccessNode firstChildNode
 The first nsIAccessNode child.
readonly attribute nsIAccessNode lastChildNode
 The last nsIAccessNode child.
readonly attribute nsIAccessNode previousSiblingNode
 The previous nsIAccessNode sibling.
readonly attribute nsIAccessNode nextSiblingNode
 The next nsIAccessNode sibling.
readonly attribute
nsIAccessibleDocument 
accessibleDocument
 The nsIAccessibleDocument that this nsIAccessNode resides in.
readonly attribute DOMString innerHTML
 The innerHTML for the DOM node This is a text string of all the markup inside the DOM node, not including the start and end tag for the node.
readonly attribute voidPtr ownerWindow
 The OS window handle for the window this node is being displayed in.
readonly attribute voidPtr uniqueID
 A unique ID calculated for this DOM node, for the purposes of caching and referencing this object.
const unsigned short NODETYPE_ELEMENT = 1
const unsigned short NODETYPE_ATTRIBUTE = 2
const unsigned short NODETYPE_TEXT = 3
const unsigned short NODETYPE_CDATA_SECTION = 4
const unsigned short NODETYPE_ENTITY_REFERENCE = 5
const unsigned short NODETYPE_ENTITY = 6
const unsigned short NODETYPE_PROCESSING_INSTRUCTION = 7
const unsigned short NODETYPE_COMMENT = 8
const unsigned short NODETYPE_DOCUMENT = 9
const unsigned short NODETYPE_DOCUMENT_TYPE = 10
const unsigned short NODETYPE_DOCUMENT_FRAGMENT = 11
const unsigned short NODETYPE_NOTATION = 12
readonly attribute nsIAccessible parent
 Parent node in accessible tree.
readonly attribute nsIAccessible nextSibling
 Next sibling in accessible tree.
readonly attribute nsIAccessible previousSibling
 Previous sibling in accessible tree.
readonly attribute nsIAccessible firstChild
 First child in accessible tree.
readonly attribute nsIAccessible lastChild
 Last child in accessible tree.
readonly attribute long childCount
 Number of accessible children.
readonly attribute long indexInParent
 The 0-based index of this accessible in its parent's list of children, or -1 if this accessible does not have a parent.
attribute AString name
 Accessible name -- the main text equivalent for this node.
readonly attribute AString finalValue
 Accessible value -- a number or a secondary text equivalent for this node Widgets that use a role attribute can force a value using the valuenow attribute.
readonly attribute AString description
 Accessible description -- long text associated with this node.
readonly attribute AString keyboardShortcut
 Provides localized string of accesskey name, such as Alt+D.
readonly attribute AString keyBinding
 Provides localized string of global keyboard accelerator, such as Ctrl+O for Open file.
readonly attribute unsigned long role
 Natural enumerated accessible role for the associated element.
readonly attribute unsigned long finalRole
 Enumerated accessible role.
readonly attribute unsigned long finalState
 Accessible states -- bit field which describes boolean properties of node.
readonly attribute unsigned long extState
 Extended accessible states -- second bit field describing node.
readonly attribute AString help
 Help text associated with node.
readonly attribute nsIAccessible focusedChild
 Focused accessible child of node.
readonly attribute PRUint8 numActions
 The number of accessible actions associated with this accessible.
const unsigned long STATE_UNAVAILABLE = 0x00000001
 MSAA State flags - used for bitfield.
const unsigned long STATE_SELECTED = 0x00000002
const unsigned long STATE_FOCUSED = 0x00000004
const unsigned long STATE_PRESSED = 0x00000008
const unsigned long STATE_CHECKED = 0x00000010
const unsigned long STATE_MIXED = 0x00000020
const unsigned long STATE_READONLY = 0x00000040
const unsigned long STATE_HOTTRACKED = 0x00000080
const unsigned long STATE_DEFAULT = 0x00000100
const unsigned long STATE_EXPANDED = 0x00000200
const unsigned long STATE_COLLAPSED = 0x00000400
const unsigned long STATE_BUSY = 0x00000800
const unsigned long STATE_FLOATING = 0x00001000
const unsigned long STATE_MARQUEED = 0x00002000
const unsigned long STATE_ANIMATED = 0x00004000
const unsigned long STATE_INVISIBLE = 0x00008000
const unsigned long STATE_OFFSCREEN = 0x00010000
const unsigned long STATE_SIZEABLE = 0x00020000
const unsigned long STATE_MOVEABLE = 0x00040000
const unsigned long STATE_SELFVOICING = 0x00080000
const unsigned long STATE_FOCUSABLE = 0x00100000
const unsigned long STATE_SELECTABLE = 0x00200000
const unsigned long STATE_LINKED = 0x00400000
const unsigned long STATE_TRAVERSED = 0x00800000
const unsigned long STATE_MULTISELECTABLE = 0x01000000
const unsigned long STATE_EXTSELECTABLE = 0x02000000
const unsigned long STATE_ALERT_LOW = 0x04000000
const unsigned long STATE_ALERT_MEDIUM = 0x08000000
const unsigned long STATE_ALERT_HIGH = 0x10000000
const unsigned long STATE_PROTECTED = 0x20000000
const unsigned long STATE_HASPOPUP = 0x40000000
const unsigned long STATE_REQUIRED = STATE_ALERT_LOW
const unsigned long STATE_IMPORTANT = STATE_ALERT_MEDIUM
const unsigned long STATE_INVALID = STATE_ALERT_HIGH
const unsigned long STATE_CHECKABLE = STATE_MARQUEED
const unsigned long EXT_STATE_EDITABLE = 0x00200000
 Extended state flags (for now non-MSAA, for Java and Gnome/ATK support) "Extended state flags" has seperate value space from "MSAA State flags".
const unsigned long EXT_STATE_ACTIVE = 0x00400000
const unsigned long EXT_STATE_EXPANDABLE = 0x00800000
const unsigned long EXT_STATE_MODAL = 0x01000000
const unsigned long EXT_STATE_MULTI_LINE = 0x02000000
const unsigned long EXT_STATE_SENSITIVE = 0x04000000
const unsigned long EXT_STATE_SHOWING = 0x10000000
const unsigned long EXT_STATE_SINGLE_LINE = 0x20000000
const unsigned long EXT_STATE_TRANSIENT = 0x40000000
const unsigned long EXT_STATE_VERTICAL = 0x80000000
const unsigned long RELATION_NUL = 0x00
 Relation Types -- most of these come from ATK's atkrelationtype.h RELATION_NULL: RELATION_CONTROLLED_BY: Controlled by one or more target objects.
const unsigned long RELATION_CONTROLLED_BY = 0x01
const unsigned long RELATION_CONTROLLER_FOR = 0x02
const unsigned long RELATION_LABEL_FOR = 0x03
const unsigned long RELATION_LABELLED_BY = 0x04
const unsigned long RELATION_MEMBER_OF = 0x05
const unsigned long RELATION_NODE_CHILD_OF = 0x06
const unsigned long RELATION_FLOWS_TO = 0x07
const unsigned long RELATION_FLOWS_FROM = 0x08
const unsigned long RELATION_SUBWINDOW_OF = 0x09
const unsigned long RELATION_EMBEDS = 0x0a
const unsigned long RELATION_EMBEDDED_BY = 0x0b
const unsigned long RELATION_POPUP_FOR = 0x0c
const unsigned long RELATION_PARENT_WINDOW_OF = 0x0d
const unsigned long RELATION_DEFAULT_BUTTON = 0x4000
const unsigned long RELATION_DESCRIBED_BY = 0x4001
const unsigned long RELATION_DESCRIPTION_FOR = 0x4002
readonly attribute long selectionCount
 Returns the number of accessible children currently selected.

Static Public Attributes

static HINSTANCE gmAccLib = nsnull
 the accessible library and cached methods
static HINSTANCE gmUserLib = nsnull
static
LPFNACCESSIBLEOBJECTFROMWINDOW 
gmAccessibleObjectFromWindow = nsnull
static LPFNNOTIFYWINEVENT gmNotifyWinEvent = nsnull
static LPFNGETGUITHREADINFO gmGetGUIThreadInfo = nsnull
static nsIDOMNodegLastFocusedNode = 0

Protected Member Functions

PRBool MappedAttrState (nsIContent *aContent, PRUint32 *aStateInOut, nsStateMapEntry *aStateMapEntry)
virtual nsIFrameGetBoundsFrame ()
virtual void GetBoundsRect (nsRect &aRect, nsIFrame **aRelativeFrame)
PRBool IsPartiallyVisible (PRBool *aIsOffscreen)
nsresult GetTextFromRelationID (nsIAtom *aIDAttrib, nsString &aName)
nsresult GetHTMLName (nsAString &_retval, PRBool aCanAggregateSubtree=PR_TRUE)
 Only called if the element is not a nsIDOMXULControlElement.
nsresult GetXULName (nsAString &aName, PRBool aCanAggregateSubtree=PR_TRUE)
 3 main cases for XUL Controls to be labeled 1 - control contains label="foo" 2 - control has, as a child, a label element
nsresult AppendFlatStringFromSubtree (nsIContent *aContent, nsAString *aFlatString)
nsresult AppendNameFromAccessibleFor (nsIContent *aContent, nsAString *aFlatString, PRBool aFromValue=PR_FALSE)
nsresult AppendFlatStringFromContentNode (nsIContent *aContent, nsAString *aFlatString)
nsresult AppendStringWithSpaces (nsAString *aFlatString, const nsAString &textEquivalent)
void GetScreenOrigin (nsPresContext *aPresContext, nsIFrame *aFrame, nsRect *aRect)
nsresult AppendFlatStringFromSubtreeRecurse (nsIContent *aContent, nsAString *aFlatString)
virtual void CacheChildren (PRBool aWalkAnonContent)
already_AddRefed< nsIAccessibleGetNextWithState (nsIAccessible *aStart, PRUint32 matchState)
nsresult SetNonTextSelection (PRBool aSelect)
nsresult DoCommand (nsIContent *aContent=nsnull)
already_AddRefed< nsIDOMNodeGetInverseRelatedNode (nsIAtom *aRelationAttr, PRUint32 aAncestorLevelsToSearch=0)
void GetAccessibleFor (nsIDOMNode *node, nsIAccessible **newAcc)
ISimpleDOMNodeMakeAccessNode (nsIDOMNode *node)
nsresult MakeAccessNode (nsIDOMNode *aNode, nsIAccessNode **aAccessNode)
NS_IMETHOD GetComputedStyleDeclaration (nsIDOMCSSStyleDeclaration **aCssDecl, PRUint32 *aLength)
already_AddRefed< nsIPresShellGetPresShell ()
nsPresContextGetPresContext ()
already_AddRefed
< nsIAccessibleDocument
GetDocAccessible ()

Static Protected Member Functions

static nsIContentGetContentPointingTo (const nsAString *aId, nsIContent *aLookContent, nsIAtom *forAttrib, PRUint32 aForAttribNamespace=kNameSpaceID_None, nsIAtom *aTagType=nsAccessibilityAtoms::label)
static nsIContentGetXULLabelContent (nsIContent *aForNode, nsIAtom *aLabelType=nsAccessibilityAtoms::label)
static nsIContentGetHTMLLabelContent (nsIContent *aForNode)
static nsIContentGetLabelContent (nsIContent *aForNode)
static nsIContentGetRoleContent (nsIDOMNode *aDOMNode)
static nsresult GetFullKeyName (const nsAString &aModifierName, const nsAString &aKeyName, nsAString &aStringOut)
static nsresult GetTranslatedString (const nsAString &aKey, nsAString &aStringOut)
static already_AddRefed
< nsIAccessible
GetMultiSelectFor (nsIDOMNode *aNode)
static void DoCommandCallback (nsITimer *aTimer, void *aClosure)

Protected Attributes

nsCOMPtr< nsIAccessiblemParent
nsIAccessiblemFirstChild
nsIAccessiblemNextSibling
nsRoleMapEntrymRoleMapEntry
PRUint32 mAccChildCount
nsCOMPtr< nsIDOMNodemDOMNode
nsCOMPtr< nsIWeakReferencemWeakShell
PRInt32 mRefCnt

Static Protected Attributes

static nsRoleMapEntry gWAIRoleMap []
static nsStateMapEntry gUnivStateMap []
static PRBool gIsEnumVariantSupportDisabled = 0
static NS_DECL_OWNINGTHREAD
nsIStringBundle
gStringBundle = 0
static nsIStringBundlegKeyStringBundle = 0
static nsITimergDoCommandTimer = 0
static PRBool gIsAccessibilityActive = PR_FALSE
static PRBool gIsCacheDisabled = PR_FALSE
static nsInterfaceHashtable
< nsVoidHashKey, nsIAccessNode
gGlobalDocAccessibleCache

Properties

ISimpleDOMNode parentNode [get]
BSTR innerHTML [get]
short nodeInfo ([out] BSTR nodeName,[out] short nameSpaceID,[out] BSTR nodeValue,[out] int numChildren,[out] int uniqueID) [get]
short attributes ([in] short maxAttribs,[out, size_is(maxAttribs), length_is(*numAttribs)] BSTR attribNames,[out, size_is(maxAttribs), length_is(*numAttribs)] short nameSpaceID,[out, size_is(maxAttribs), length_is(*numAttribs)] BSTR attribValues) [get]
BSTR attributesForNames ([in] short numAttribs,[in, size_is(numAttribs), length_is(numAttribs)] BSTR attribNames,[in, size_is(numAttribs), length_is(numAttribs)] short nameSpaceID) [get]
short computedStyle ([in] short maxStyleProperties,[in] boolean useAlternateView,[out, size_is(maxStyleProperties), length_is(*numStyleProperties)] BSTR styleProperties,[out, size_is(maxStyleProperties), length_is(*numStyleProperties)] BSTR styleValues) [get]
BSTR computedStyleForProperties ([in] short numStyleProperties,[in] boolean useAlternateView,[in, size_is(numStyleProperties), length_is(numStyleProperties)] BSTR styleProperties) [get]
ISimpleDOMNode firstChild [get]
ISimpleDOMNode lastChild [get]
ISimpleDOMNode previousSibling [get]
ISimpleDOMNode nextSibling [get]
ISimpleDOMNode childAt ([in] unsigned childIndex) [get]
void localInterface [get]
BSTR language [get]

Detailed Description

Definition at line 114 of file nsAccessible.h.


Member Enumeration Documentation

anonymous enum [inherited]
Enumerator:
ROLE_TITLEBAR 

Definition at line 539 of file nsIAccessible.idl.

{ ROLE_TITLEBAR = 1U };
anonymous enum [inherited]
Enumerator:
ROLE_MENUBAR 

Definition at line 540 of file nsIAccessible.idl.

{ ROLE_MENUBAR = 2U };
anonymous enum [inherited]
Enumerator:
ROLE_MENUPOPUP 

Definition at line 549 of file nsIAccessible.idl.

{ ROLE_MENUPOPUP = 11U };
anonymous enum [inherited]
Enumerator:
ROLE_MENUITEM 

Definition at line 550 of file nsIAccessible.idl.

{ ROLE_MENUITEM = 12U };
anonymous enum [inherited]
Enumerator:
ROLE_RADIO_MENU_ITEM 

Definition at line 551 of file nsIAccessible.idl.

{ ROLE_RADIO_MENU_ITEM = 12U }; // Same as ROLE_MENUITEM
anonymous enum [inherited]
Enumerator:
ROLE_CHECK_MENU_ITEM 

Definition at line 552 of file nsIAccessible.idl.

{ ROLE_CHECK_MENU_ITEM = 12U }; // Same as ROLE_MENUITEM
anonymous enum [inherited]
Enumerator:
ROLE_TOOLTIP 

Definition at line 553 of file nsIAccessible.idl.

{ ROLE_TOOLTIP = 13U };
anonymous enum [inherited]
Enumerator:
ROLE_APPLICATION 

Definition at line 554 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_DOCUMENT 

Definition at line 555 of file nsIAccessible.idl.

{ ROLE_DOCUMENT = 15U };
anonymous enum [inherited]
Enumerator:
ROLE_PANE 

Definition at line 556 of file nsIAccessible.idl.

{ ROLE_PANE = 16U };
anonymous enum [inherited]
Enumerator:
ROLE_CHART 

Definition at line 557 of file nsIAccessible.idl.

{ ROLE_CHART = 17U };
anonymous enum [inherited]
Enumerator:
ROLE_DIALOG 

Definition at line 558 of file nsIAccessible.idl.

{ ROLE_DIALOG = 18U };
anonymous enum [inherited]
Enumerator:
ROLE_SCROLLBAR 

Definition at line 541 of file nsIAccessible.idl.

{ ROLE_SCROLLBAR = 3U };
anonymous enum [inherited]
Enumerator:
ROLE_BORDER 

Definition at line 559 of file nsIAccessible.idl.

{ ROLE_BORDER = 19U };
anonymous enum [inherited]
Enumerator:
ROLE_GROUPING 

Definition at line 560 of file nsIAccessible.idl.

{ ROLE_GROUPING = 20U };
anonymous enum [inherited]
Enumerator:
ROLE_SEPARATOR 

Definition at line 561 of file nsIAccessible.idl.

{ ROLE_SEPARATOR = 21U };
anonymous enum [inherited]
Enumerator:
ROLE_TOOLBAR 

Definition at line 562 of file nsIAccessible.idl.

{ ROLE_TOOLBAR = 22U };
anonymous enum [inherited]
Enumerator:
ROLE_STATUSBAR 

Definition at line 563 of file nsIAccessible.idl.

{ ROLE_STATUSBAR = 23U };
anonymous enum [inherited]
Enumerator:
ROLE_TABLE 

Definition at line 564 of file nsIAccessible.idl.

{ ROLE_TABLE = 24U };
anonymous enum [inherited]
Enumerator:
ROLE_COLUMNHEADER 

Definition at line 565 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_ROWHEADER 

Definition at line 566 of file nsIAccessible.idl.

{ ROLE_ROWHEADER = 26U };
anonymous enum [inherited]
Enumerator:
ROLE_COLUMN 

Definition at line 567 of file nsIAccessible.idl.

{ ROLE_COLUMN = 27U };
anonymous enum [inherited]
Enumerator:
ROLE_ROW 

Definition at line 568 of file nsIAccessible.idl.

{ ROLE_ROW = 28U };
anonymous enum [inherited]
Enumerator:
ROLE_GRIP 

Definition at line 542 of file nsIAccessible.idl.

{ ROLE_GRIP = 4U };
anonymous enum [inherited]
Enumerator:
ROLE_CELL 

Definition at line 569 of file nsIAccessible.idl.

{ ROLE_CELL = 29U };
anonymous enum [inherited]
Enumerator:
ROLE_LINK 

Definition at line 570 of file nsIAccessible.idl.

{ ROLE_LINK = 30U };
anonymous enum [inherited]
Enumerator:
ROLE_HELPBALLOON 

Definition at line 571 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_CHARACTER 

Definition at line 572 of file nsIAccessible.idl.

{ ROLE_CHARACTER = 32U };
anonymous enum [inherited]
Enumerator:
ROLE_LIST 

Definition at line 573 of file nsIAccessible.idl.

{ ROLE_LIST = 33U };
anonymous enum [inherited]
Enumerator:
ROLE_LISTITEM 

Definition at line 574 of file nsIAccessible.idl.

{ ROLE_LISTITEM = 34U };
anonymous enum [inherited]
Enumerator:
ROLE_OUTLINE 

Definition at line 575 of file nsIAccessible.idl.

{ ROLE_OUTLINE = 35U };
anonymous enum [inherited]
Enumerator:
ROLE_TREE_TABLE 

Definition at line 576 of file nsIAccessible.idl.

{ ROLE_TREE_TABLE = 35U }; // Same as ROLE_OUTLINE
anonymous enum [inherited]
Enumerator:
ROLE_OUTLINEITEM 

Definition at line 577 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_PAGETAB 

Definition at line 578 of file nsIAccessible.idl.

{ ROLE_PAGETAB = 37U };
anonymous enum [inherited]
Enumerator:
ROLE_SOUND 

Definition at line 543 of file nsIAccessible.idl.

{ ROLE_SOUND = 5U };
anonymous enum [inherited]
Enumerator:
ROLE_PROPERTYPAGE 

Definition at line 579 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_INDICATOR 

Definition at line 580 of file nsIAccessible.idl.

{ ROLE_INDICATOR = 39U };
anonymous enum [inherited]
Enumerator:
ROLE_GRAPHIC 

Definition at line 581 of file nsIAccessible.idl.

{ ROLE_GRAPHIC = 40U };
anonymous enum [inherited]
Enumerator:
ROLE_STATICTEXT 

Definition at line 582 of file nsIAccessible.idl.

{ ROLE_STATICTEXT = 41U };
anonymous enum [inherited]
Enumerator:
ROLE_TEXT 

Definition at line 583 of file nsIAccessible.idl.

{ ROLE_TEXT = 42U };
anonymous enum [inherited]
Enumerator:
ROLE_PUSHBUTTON 

Definition at line 584 of file nsIAccessible.idl.

{ ROLE_PUSHBUTTON = 43U };
anonymous enum [inherited]
Enumerator:
ROLE_CHECKBUTTON 

Definition at line 585 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_RADIOBUTTON 

Definition at line 586 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_COMBOBOX 

Definition at line 587 of file nsIAccessible.idl.

{ ROLE_COMBOBOX = 46U };
anonymous enum [inherited]
Enumerator:
ROLE_DROPLIST 

Definition at line 588 of file nsIAccessible.idl.

{ ROLE_DROPLIST = 47U };
anonymous enum [inherited]
Enumerator:
ROLE_CURSOR 

Definition at line 544 of file nsIAccessible.idl.

{ ROLE_CURSOR = 6U };
anonymous enum [inherited]
Enumerator:
ROLE_PROGRESSBAR 

Definition at line 589 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_DIAL 

Definition at line 590 of file nsIAccessible.idl.

{ ROLE_DIAL = 49U };
anonymous enum [inherited]
Enumerator:
ROLE_HOTKEYFIELD 

Definition at line 591 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_SLIDER 

Definition at line 592 of file nsIAccessible.idl.

{ ROLE_SLIDER = 51U };
anonymous enum [inherited]
Enumerator:
ROLE_SPINBUTTON 

Definition at line 593 of file nsIAccessible.idl.

{ ROLE_SPINBUTTON = 52U };
anonymous enum [inherited]
Enumerator:
ROLE_DIAGRAM 

Definition at line 594 of file nsIAccessible.idl.

{ ROLE_DIAGRAM = 53U };
anonymous enum [inherited]
Enumerator:
ROLE_ANIMATION 

Definition at line 595 of file nsIAccessible.idl.

{ ROLE_ANIMATION = 54U };
anonymous enum [inherited]
Enumerator:
ROLE_EQUATION 

Definition at line 596 of file nsIAccessible.idl.

{ ROLE_EQUATION = 55U };
anonymous enum [inherited]
Enumerator:
ROLE_BUTTONDROPDOWN 

Definition at line 597 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_BUTTONMENU 

Definition at line 598 of file nsIAccessible.idl.

{ ROLE_BUTTONMENU = 57U };
anonymous enum [inherited]
Enumerator:
ROLE_CARET 

Definition at line 545 of file nsIAccessible.idl.

{ ROLE_CARET = 7U };
anonymous enum [inherited]
Enumerator:
ROLE_BUTTONDROPDOWNGRID 

Definition at line 599 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_WHITESPACE 

Definition at line 600 of file nsIAccessible.idl.

{ ROLE_WHITESPACE = 59U };
anonymous enum [inherited]
Enumerator:
ROLE_PAGETABLIST 

Definition at line 601 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_CLOCK 

Definition at line 602 of file nsIAccessible.idl.

{ ROLE_CLOCK = 61U };
anonymous enum [inherited]
Enumerator:
ROLE_SPLITBUTTON 

Definition at line 603 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_IPADDRESS 

Definition at line 604 of file nsIAccessible.idl.

{ ROLE_IPADDRESS = 63U };
anonymous enum [inherited]
Enumerator:
ROLE_NOTHING 

Definition at line 605 of file nsIAccessible.idl.

{ ROLE_NOTHING = 4294967295U };
anonymous enum [inherited]
Enumerator:
ROLE_ICON 

Definition at line 609 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_PASSWORD_TEXT 

Definition at line 610 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_AUTOCOMPLETE 

Definition at line 611 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_ALERT 

Definition at line 546 of file nsIAccessible.idl.

{ ROLE_ALERT = 8U };
anonymous enum [inherited]
Enumerator:
ROLE_EDITBAR 

Definition at line 612 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_EMBEDDED 

Definition at line 613 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_ENTRY 

Definition at line 614 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_CAPTION 

Definition at line 615 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_DOCUMENT_FRAME 

Definition at line 616 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_HEADING 

Definition at line 617 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_PAGE 

Definition at line 618 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_SECTION 

Definition at line 619 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_REDUNDANT_OBJECT 

Definition at line 620 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
NAVRELATION_CONTROLLED_BY 

Definition at line 623 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_WINDOW 

Definition at line 547 of file nsIAccessible.idl.

{ ROLE_WINDOW = 9U };
anonymous enum [inherited]
Enumerator:
NAVRELATION_CONTROLLER_FOR 

Definition at line 624 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
NAVRELATION_LABEL_FOR 

Definition at line 625 of file nsIAccessible.idl.

{ NAVRELATION_LABEL_FOR = 0x1002 };
anonymous enum [inherited]
Enumerator:
NAVRELATION_LABELLED_BY 

Definition at line 626 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
NAVRELATION_MEMBER_OF 

Definition at line 627 of file nsIAccessible.idl.

{ NAVRELATION_MEMBER_OF = 0x1004 };
anonymous enum [inherited]
Enumerator:
NAVRELATION_NODE_CHILD_OF 

Definition at line 628 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
NAVRELATION_FLOWS_TO 

Definition at line 629 of file nsIAccessible.idl.

{ NAVRELATION_FLOWS_TO = 0x1006 };
anonymous enum [inherited]
Enumerator:
NAVRELATION_FLOWS_FROM 

Definition at line 630 of file nsIAccessible.idl.

{ NAVRELATION_FLOWS_FROM = 0x1007 };
anonymous enum [inherited]
Enumerator:
NAVRELATION_SUBWINDOW_OF 

Definition at line 631 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
NAVRELATION_EMBEDS 

Definition at line 632 of file nsIAccessible.idl.

{ NAVRELATION_EMBEDS = 0x1009 };
anonymous enum [inherited]
Enumerator:
NAVRELATION_EMBEDDED_BY 

Definition at line 633 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
ROLE_CLIENT 

Definition at line 548 of file nsIAccessible.idl.

{ ROLE_CLIENT = 10U };
anonymous enum [inherited]
Enumerator:
NAVRELATION_POPUP_FOR 

Definition at line 634 of file nsIAccessible.idl.

{ NAVRELATION_POPUP_FOR = 0x100b };
anonymous enum [inherited]
Enumerator:
NAVRELATION_PARENT_WINDOW_OF 

Definition at line 635 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
NAVRELATION_DEFAULT_BUTTON 

Definition at line 636 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
NAVRELATION_DESCRIBED_BY 

Definition at line 637 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
NAVRELATION_DESCRIPTION_FOR 

Definition at line 638 of file nsIAccessible.idl.

anonymous enum [inherited]
Enumerator:
eSelection_Add 
eSelection_Remove 
eSelection_GetState 

Definition at line 56 of file nsIAccessibleSelectable.idl.

anonymous enum
Enumerator:
eAction_Switch 
eAction_Jump 
eAction_Click 
eAction_Select 
eAction_Expand 

Definition at line 121 of file nsAccessible.h.

anonymous enum
Enumerator:
eNo_Action 
eSingle_Action 
eDouble_Action 

Definition at line 123 of file nsAccessible.h.


Constructor & Destructor Documentation

Definition at line 156 of file nsAccessible.cpp.

                                                                     : nsAccessNodeWrap(aNode, aShell), 
  mParent(nsnull), mFirstChild(nsnull), mNextSibling(nsnull), mRoleMapEntry(nsnull),
  mAccChildCount(eChildCountUninitialized)
{
#ifdef NS_DEBUG_X
   {
     nsCOMPtr<nsIPresShell> shell(do_QueryReferent(aShell));
     printf(">>> %p Created Acc - Con: %p  Acc: %p  PS: %p", 
             (nsIAccessible*)this, aContent, aAccessible, shell.get());
     if (shell && aContent != nsnull) {
       nsIFrame* frame;
       shell->GetPrimaryFrameFor(aContent, &frame);
       char * name;
       if (GetNameForFrame(frame, &name)) {
         printf(" Name:[%s]", name);
         nsMemory::Free(name);
       }
     }
     printf("\n");
   }
#endif
}

Here is the call graph for this function:

Definition at line 182 of file nsAccessible.cpp.

{
}

Member Function Documentation

Adds the specified accessible child of the object to the object's selection.

If the specified object is already selected, then it does nothing.

Exceptions:
NS_ERROR_FAILUREif the specified object is not selectable.
virtual long IUnknown::AddRef ( ) [pure virtual, inherited]

Here is the caller graph for this function:

Add this accessible to the current selection.

nsresult nsAccessible::AppendFlatStringFromContentNode ( nsIContent aContent,
nsAString *  aFlatString 
) [protected]

Definition at line 1299 of file nsAccessible.cpp.

{
  if (aContent->IsContentOfType(nsIContent::eTEXT)) {
    nsCOMPtr<nsITextContent> textContent(do_QueryInterface(aContent));
    NS_ASSERTION(textContent, "No text content for text content type");
    // If it's a text node, append the text
    PRBool isHTMLBlock = PR_FALSE;
    nsCOMPtr<nsIPresShell> shell = GetPresShell();
    if (!shell) {
      return NS_ERROR_FAILURE;  
    }

    nsIContent *parentContent = aContent->GetParent();
    nsCOMPtr<nsIContent> appendedSubtreeStart(do_QueryInterface(mDOMNode));
    if (parentContent && parentContent != appendedSubtreeStart) {
      nsIFrame *frame;
      shell->GetPrimaryFrameFor(parentContent, &frame);
      if (frame) {
        // If this text is inside a block level frame (as opposed to span level), we need to add spaces around that 
        // block's text, so we don't get words jammed together in final name
        // Extra spaces will be trimmed out later
        const nsStyleDisplay* display = frame->GetStyleDisplay();
        if (display->IsBlockLevel() ||
          display->mDisplay == NS_STYLE_DISPLAY_TABLE_CELL) {
          isHTMLBlock = PR_TRUE;
          if (!aFlatString->IsEmpty()) {
            aFlatString->Append(PRUnichar(' '));
          }
        }
      }
    }
    if (textContent->TextLength() > 0) {
      nsAutoString text;
      textContent->AppendTextTo(text);
      if (!text.IsEmpty())
        aFlatString->Append(text);
      if (isHTMLBlock && !aFlatString->IsEmpty())
        aFlatString->Append(PRUnichar(' '));
    }
    return NS_OK;
  }

  nsAutoString textEquivalent;
  if (!aContent->IsContentOfType(nsIContent::eHTML)) {
    if (aContent->IsContentOfType(nsIContent::eXUL)) {
      nsCOMPtr<nsIPresShell> shell = GetPresShell();
      if (!shell) {
        return NS_ERROR_FAILURE;  
      }
      nsIFrame *frame;
      shell->GetPrimaryFrameFor(aContent, &frame);
      if (!frame || !frame->GetStyleVisibility()->IsVisible()) {
        return NS_OK;
      }
 
      nsCOMPtr<nsIDOMXULLabeledControlElement> labeledEl(do_QueryInterface(aContent));
      if (labeledEl) {
        labeledEl->GetLabel(textEquivalent);
      }
      else {
        aContent->GetAttr(kNameSpaceID_None,
                          nsAccessibilityAtoms::tooltiptext, textEquivalent);
      }
      AppendNameFromAccessibleFor(aContent, &textEquivalent, PR_TRUE /* use value */);

      return AppendStringWithSpaces(aFlatString, textEquivalent);
    }
    return NS_OK; // Not HTML and not XUL -- we don't handle it yet
  }

  nsCOMPtr<nsIAtom> tag = aContent->Tag();
  if (tag == nsAccessibilityAtoms::img) {
    return AppendNameFromAccessibleFor(aContent, aFlatString);
  }

  if (tag == nsAccessibilityAtoms::input) {
    nsAutoString inputType;
    aContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::type, inputType);
    if (inputType.LowerCaseEqualsLiteral("button") ||
        inputType.LowerCaseEqualsLiteral("submit") ||
        inputType.LowerCaseEqualsLiteral("reset") ||
        inputType.LowerCaseEqualsLiteral("image")) {
      return AppendNameFromAccessibleFor(aContent, aFlatString);
    }
  }

  if (tag == nsAccessibilityAtoms::object && !aContent->GetChildCount()) {
    // If object has no alternative content children, try title
    aContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::title, textEquivalent);
  }
  else if (tag == nsAccessibilityAtoms::br) {
    // If it's a line break, insert a space so that words aren't jammed together
    aFlatString->AppendLiteral("\r\n");
    return NS_OK;
  }
  else if (tag != nsAccessibilityAtoms::a && tag != nsAccessibilityAtoms::area) { 
    AppendNameFromAccessibleFor(aContent, aFlatString, PR_TRUE /* use value */);
  }

  textEquivalent.CompressWhitespace();
  return AppendStringWithSpaces(aFlatString, textEquivalent);
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsAccessible::AppendFlatStringFromSubtree ( nsIContent aContent,
nsAString *  aFlatString 
) [protected]

Reimplemented in nsXULSelectableAccessible.

Definition at line 1403 of file nsAccessible.cpp.

{
  nsresult rv = AppendFlatStringFromSubtreeRecurse(aContent, aFlatString);
  if (NS_SUCCEEDED(rv) && !aFlatString->IsEmpty()) {
    nsAString::const_iterator start, end;
    aFlatString->BeginReading(start);
    aFlatString->EndReading(end);

    PRInt32 spacesToTruncate = 0;
    while (-- end != start && *end == ' ')
      ++ spacesToTruncate;

    if (spacesToTruncate > 0)
      aFlatString->Truncate(aFlatString->Length() - spacesToTruncate);
  }

  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsAccessible::AppendFlatStringFromSubtreeRecurse ( nsIContent aContent,
nsAString *  aFlatString 
) [protected]

Definition at line 1422 of file nsAccessible.cpp.

{
  // Depth first search for all text nodes that are decendants of content node.
  // Append all the text into one flat string
  PRUint32 numChildren = 0;
  nsCOMPtr<nsIDOMXULSelectControlElement> selectControlEl(do_QueryInterface(aContent));
  if (!selectControlEl) {  // Don't walk children of elements with options, just get label directly
    numChildren = aContent->GetChildCount();
  }

  if (numChildren == 0) {
    // There are no children or they are irrelvant: get the text from the current node
    AppendFlatStringFromContentNode(aContent, aFlatString);
    return NS_OK;
  }

  // There are relevant children: use them to get the text.
  PRUint32 index;
  for (index = 0; index < numChildren; index++) {
    AppendFlatStringFromSubtreeRecurse(aContent->GetChildAt(index), aFlatString);
  }
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsAccessible::AppendNameFromAccessibleFor ( nsIContent aContent,
nsAString *  aFlatString,
PRBool  aFromValue = PR_FALSE 
) [protected]

Definition at line 1260 of file nsAccessible.cpp.

{
  nsAutoString textEquivalent, value;

  nsCOMPtr<nsIDOMNode> domNode(do_QueryInterface(aContent));
  nsCOMPtr<nsIAccessible> accessible;
  if (domNode == mDOMNode) {
    accessible = this;
  }
  else {
    nsCOMPtr<nsIAccessibilityService> accService =
      do_GetService("@mozilla.org/accessibilityService;1");
    NS_ENSURE_TRUE(accService, NS_ERROR_FAILURE);
    accService->GetAccessibleInWeakShell(domNode, mWeakShell, getter_AddRefs(accessible));
  }
  if (accessible) {
    if (aFromValue) {
      accessible->GetFinalValue(textEquivalent);
    }
    else {
      accessible->GetName(textEquivalent);
    }
  }

  textEquivalent.CompressWhitespace();
  return AppendStringWithSpaces(aFlatString, textEquivalent);
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsAccessible::AppendStringWithSpaces ( nsAString *  aFlatString,
const nsAString &  textEquivalent 
) [protected]

Definition at line 1248 of file nsAccessible.cpp.

{
  // Insert spaces to insure that words from controls aren't jammed together
  if (!textEquivalent.IsEmpty()) {
    if (!aFlatString->IsEmpty())
      aFlatString->Append(PRUnichar(' '));
    aFlatString->Append(textEquivalent);
    aFlatString->Append(PRUnichar(' '));
  }
  return NS_OK;
}

Here is the caller graph for this function:

void nsAccessible::CacheChildren ( PRBool  aWalkAnonContent) [protected, virtual]

Reimplemented in nsHTMLSelectListAccessible, nsHTMLLIAccessible, nsHTMLGroupboxAccessible, nsHTMLImageAccessible, nsOuterDocAccessible, and nsXULButtonAccessible.

Definition at line 619 of file nsAccessible.cpp.

{
  if (!mWeakShell) {
    // This node has been shut down
    mAccChildCount = -1;
    return;
  }

  if (mAccChildCount == eChildCountUninitialized) {
    nsAccessibleTreeWalker walker(mWeakShell, mDOMNode, aWalkAnonContent);
    // Seed the frame hint early while we're still on a container node.
    // This is better than doing the GetPrimaryFrameFor() later on
    // a text node, because text nodes aren't in the frame map.
    walker.mState.frame = GetFrame();

    nsCOMPtr<nsPIAccessible> privatePrevAccessible;
    mAccChildCount = 0;
    walker.GetFirstChild();
    SetFirstChild(walker.mState.accessible);

    while (walker.mState.accessible) {
      ++mAccChildCount;
      privatePrevAccessible = do_QueryInterface(walker.mState.accessible);
      privatePrevAccessible->SetParent(this);
      walker.GetNextSibling();
      privatePrevAccessible->SetNextSibling(walker.mState.accessible);
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 535 of file nsAccessNode.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

PLDHashOperator nsAccessNode::ClearCacheEntry ( const void aKey,
nsCOMPtr< nsIAccessNode > &  aAccessNode,
void aUserArg 
) [static, inherited]

Definition at line 527 of file nsAccessNode.cpp.

{
  nsCOMPtr<nsPIAccessNode> privateAccessNode(do_QueryInterface(aAccessNode));
  privateAccessNode->Shutdown();

  return PL_DHASH_REMOVE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Clears the selection in the object so that no children in the object are selected.

void nsIAccessible::doAction ( in PRUint8  index) [inherited]

Perform the accessible action at the given zero-based index Action number 0 is the default action.

nsresult nsAccessible::DoCommand ( nsIContent aContent = nsnull) [protected]

Definition at line 2359 of file nsAccessible.cpp.

{
  nsCOMPtr<nsIContent> content = aContent;
  if (!content) {
    content = do_QueryInterface(mDOMNode);
  }
  if (gDoCommandTimer) {
    // Already have timer going for another command
    NS_WARNING("Doubling up on do command timers doesn't work. This wasn't expected.");
    return NS_ERROR_FAILURE;
  }

  nsCOMPtr<nsITimer> timer = do_CreateInstance("@mozilla.org/timer;1");
  if (!timer) {
    return NS_ERROR_OUT_OF_MEMORY;
  } 

  NS_ADDREF(gDoCommandTimer = timer);
  return gDoCommandTimer->InitWithFuncCallback(DoCommandCallback,
                                               (void*)content, 0,
                                               nsITimer::TYPE_ONE_SHOT);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsAccessible::DoCommandCallback ( nsITimer aTimer,
void aClosure 
) [static, protected]

Definition at line 2316 of file nsAccessible.cpp.

{
  NS_ASSERTION(gDoCommandTimer, "How did we get here if there was no gDoCommandTimer?");
  NS_RELEASE(gDoCommandTimer);

  nsIContent *content = NS_REINTERPRET_CAST(nsIContent*, aClosure);
  nsCOMPtr<nsIDOMXULElement> xulElement(do_QueryInterface(content));
  if (xulElement) {
    xulElement->Click();
  }
  else {
    nsIDocument *doc = content->GetDocument();
    if (!doc) {
      return;
    }
    nsCOMPtr<nsIPresShell> presShell = doc->GetShellAt(0);
    nsPIDOMWindow *outerWindow = doc->GetWindow();
    if (presShell && outerWindow) {
      nsAutoPopupStatePusher popupStatePusher(outerWindow, openAllowed);

      nsMouseEvent downEvent(PR_TRUE, NS_MOUSE_LEFT_BUTTON_DOWN, nsnull,
                              nsMouseEvent::eSynthesized);
      nsMouseEvent upEvent(PR_TRUE, NS_MOUSE_LEFT_BUTTON_UP, nsnull,
                              nsMouseEvent::eSynthesized);
      nsMouseEvent clickEvent(PR_TRUE, NS_MOUSE_LEFT_CLICK, nsnull,
                              nsMouseEvent::eSynthesized);

      nsEventStatus eventStatus = nsEventStatus_eIgnore;
      presShell->HandleDOMEventWithTarget(content, &downEvent, &eventStatus);
      presShell->HandleDOMEventWithTarget(content, &upEvent, &eventStatus);
      presShell->HandleDOMEventWithTarget(content, &clickEvent, &eventStatus);
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Extend the current selection from its current accessible anchor node to this accessible.

void nsPIAccessible::fireToolkitEvent ( in unsigned long  aEvent,
in nsIAccessible  aTarget,
in voidPtr  aData 
) [inherited]
STDMETHODIMP nsAccessNodeWrap::get_attributes ( unsigned short  maxAttribs,
BSTR __RPC_FAR *  attribNames,
short __RPC_FAR *  nameSpaceID,
BSTR __RPC_FAR *  attribValues,
unsigned short __RPC_FAR *  numAttribs 
) [virtual, inherited]

Definition at line 175 of file nsAccessNodeWrap.cpp.

{
  *aNumAttribs = 0;

  nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
  if (!content) 
    return E_FAIL;

  PRUint32 numAttribs = content->GetAttrCount();

  if (numAttribs > aMaxAttribs)
    numAttribs = aMaxAttribs;
  *aNumAttribs = NS_STATIC_CAST(unsigned short, numAttribs);

  PRInt32 nameSpaceID;
  nsCOMPtr<nsIAtom> nameAtom, prefixAtom;

  for (PRUint32 index = 0; index < numAttribs; index++) {
    aNameSpaceIDs[index] = 0; aAttribValues[index] = aAttribNames[index] = nsnull;
    nsAutoString attributeValue;
    const char *pszAttributeName; 

    if (NS_SUCCEEDED(content->GetAttrNameAt(index, &nameSpaceID, getter_AddRefs(nameAtom), getter_AddRefs(prefixAtom)))) {
      aNameSpaceIDs[index] = NS_STATIC_CAST(short, nameSpaceID);
      nameAtom->GetUTF8String(&pszAttributeName);
      aAttribNames[index] = ::SysAllocString(NS_ConvertUTF8toUCS2(pszAttributeName).get());
      if (NS_SUCCEEDED(content->GetAttr(nameSpaceID, nameAtom, attributeValue))) 
        aAttribValues[index] = ::SysAllocString(attributeValue.get());
    }
  }

  return S_OK; 
}

Here is the call graph for this function:

STDMETHODIMP nsAccessNodeWrap::get_attributesForNames ( unsigned short  maxAttribs,
BSTR __RPC_FAR *  attribNames,
short __RPC_FAR *  nameSpaceID,
BSTR __RPC_FAR *  attribValues 
) [virtual, inherited]

Definition at line 215 of file nsAccessNodeWrap.cpp.

{
  nsCOMPtr<nsIDOMElement> domElement(do_QueryInterface(mDOMNode));
  nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));

  if (!domElement || !content) 
    return E_FAIL;

  if (!content->GetDocument())
    return E_FAIL;

  nsCOMPtr<nsINameSpaceManager> nameSpaceManager =
    do_GetService(NS_NAMESPACEMANAGER_CONTRACTID);

  PRInt32 index;

  for (index = 0; index < aNumAttribs; index++) {
    aAttribValues[index] = nsnull;
    if (aAttribNames[index]) {
      nsAutoString attributeValue, nameSpaceURI;
      nsAutoString attributeName(nsDependentString(NS_STATIC_CAST(PRUnichar*,aAttribNames[index])));
      nsresult rv;

      if (aNameSpaceID[index]>0 && 
        NS_SUCCEEDED(nameSpaceManager->GetNameSpaceURI(aNameSpaceID[index], nameSpaceURI)))
          rv = domElement->GetAttributeNS(nameSpaceURI, attributeName, attributeValue);
      else 
        rv = domElement->GetAttribute(attributeName, attributeValue);

      if (NS_SUCCEEDED(rv))
        aAttribValues[index] = ::SysAllocString(attributeValue.get());
    }
  }

  return S_OK; 
}

Here is the call graph for this function:

STDMETHODIMP nsAccessNodeWrap::get_childAt ( unsigned  childIndex,
ISimpleDOMNode __RPC_FAR *__RPC_FAR *  node 
) [virtual, inherited]

Definition at line 483 of file nsAccessNodeWrap.cpp.

{
  *aNode = nsnull;

  nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
  if (!content)
    return E_FAIL;  // Node already shut down

  nsCOMPtr<nsIDOMNode> node =
    do_QueryInterface(content->GetChildAt(aChildIndex));

  if (!node)
    return E_FAIL; // No such child

  *aNode = MakeAccessNode(node);

  return S_OK;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessNodeWrap::get_computedStyle ( unsigned short  maxStyleProperties,
boolean  useAlternateView,
BSTR __RPC_FAR *  styleProperties,
BSTR __RPC_FAR *  styleValues,
unsigned short __RPC_FAR *  numStyleProperties 
) [virtual, inherited]

Definition at line 293 of file nsAccessNodeWrap.cpp.

{
  if (!mDOMNode)
    return E_FAIL;
 
  *aNumStyleProperties = 0;
  PRUint32 length;
  nsCOMPtr<nsIDOMCSSStyleDeclaration> cssDecl;
  if (NS_FAILED(GetComputedStyleDeclaration(getter_AddRefs(cssDecl), &length)))
    return E_FAIL;

  PRUint32 index, realIndex;
  for (index = realIndex = 0; index < length && realIndex < aMaxStyleProperties; index ++) {
    nsAutoString property, value;
    if (NS_SUCCEEDED(cssDecl->Item(index, property)) && property.CharAt(0) != '-')  // Ignore -moz-* properties
      cssDecl->GetPropertyValue(property, value);  // Get property value
    if (!value.IsEmpty()) {
      aStyleProperties[realIndex] =   ::SysAllocString(property.get());
      aStyleValues[realIndex]     =   ::SysAllocString(value.get());
      ++realIndex;
    }
  }
  *aNumStyleProperties = NS_STATIC_CAST(unsigned short, realIndex);

  return S_OK;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessNodeWrap::get_computedStyleForProperties ( unsigned short  numStyleProperties,
boolean  useAlternateView,
BSTR __RPC_FAR *  styleProperties,
BSTR __RPC_FAR *  styleValues 
) [virtual, inherited]

Definition at line 326 of file nsAccessNodeWrap.cpp.

{
  if (!mDOMNode)
    return E_FAIL;
 
  PRUint32 length = 0;
  nsCOMPtr<nsIDOMCSSStyleDeclaration> cssDecl;
  nsresult rv = GetComputedStyleDeclaration(getter_AddRefs(cssDecl), &length);
  if (NS_FAILED(rv))
    return E_FAIL;

  PRUint32 index;
  for (index = 0; index < aNumStyleProperties; index ++) {
    nsAutoString value;
    if (aStyleProperties[index])
      cssDecl->GetPropertyValue(nsDependentString(NS_STATIC_CAST(PRUnichar*,aStyleProperties[index])), value);  // Get property value
    aStyleValues[index] = ::SysAllocString(value.get());
  }

  return S_OK;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessNodeWrap::get_firstChild ( ISimpleDOMNode __RPC_FAR *__RPC_FAR *  node) [virtual, inherited]

Definition at line 434 of file nsAccessNodeWrap.cpp.

{
  if (!mDOMNode)
    return E_FAIL;
 
  nsCOMPtr<nsIDOMNode> node;
  mDOMNode->GetFirstChild(getter_AddRefs(node));
  *aNode = MakeAccessNode(node);

  return S_OK;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessNodeWrap::get_innerHTML ( BSTR __RPC_FAR *  innerHTML) [virtual, inherited]

Definition at line 504 of file nsAccessNodeWrap.cpp.

{
  *aInnerHTML = nsnull;

  nsCOMPtr<nsIDOMNSHTMLElement> domNSElement(do_QueryInterface(mDOMNode));
  if (!domNSElement)
    return E_FAIL; // Node already shut down

  nsAutoString innerHTML;
  domNSElement->GetInnerHTML(innerHTML);
  *aInnerHTML = ::SysAllocString(innerHTML.get());

  return S_OK;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessNodeWrap::get_language ( BSTR __RPC_FAR *  language) [virtual, inherited]

Definition at line 520 of file nsAccessNodeWrap.cpp.

{
  *aLanguage = nsnull;
  nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
  if (!content) {
    return E_FAIL;
  }

  nsAutoString language;
  for (nsIContent *walkUp = content; walkUp = walkUp->GetParent(); walkUp) {
    if (NS_CONTENT_ATTR_HAS_VALUE ==
        walkUp->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::lang, language)) {
      break;
    }
  }

  if (language.IsEmpty()) { // Nothing found, so use document's language
    nsIDocument *doc = content->GetOwnerDoc();
    if (doc) {
      doc->GetHeaderData(nsAccessibilityAtoms::headerContentLanguage, language);
    }
  }
 
  *aLanguage = ::SysAllocString(language.get());
  return S_OK;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessNodeWrap::get_lastChild ( ISimpleDOMNode __RPC_FAR *__RPC_FAR *  node) [virtual, inherited]

Definition at line 446 of file nsAccessNodeWrap.cpp.

{
  if (!mDOMNode)
    return E_FAIL;

  nsCOMPtr<nsIDOMNode> node;
  mDOMNode->GetLastChild(getter_AddRefs(node));
  *aNode = MakeAccessNode(node);

  return S_OK;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessNodeWrap::get_localInterface ( void __RPC_FAR *__RPC_FAR *  localInterface) [virtual, inherited]

Definition at line 548 of file nsAccessNodeWrap.cpp.

STDMETHODIMP nsAccessNodeWrap::get_nextSibling ( ISimpleDOMNode __RPC_FAR *__RPC_FAR *  node) [virtual, inherited]

Definition at line 470 of file nsAccessNodeWrap.cpp.

{
  if (!mDOMNode)
    return E_FAIL;

  nsCOMPtr<nsIDOMNode> node;
  mDOMNode->GetNextSibling(getter_AddRefs(node));
  *aNode = MakeAccessNode(node);

  return S_OK;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessNodeWrap::get_nodeInfo ( BSTR __RPC_FAR *  tagName,
short __RPC_FAR *  nameSpaceID,
BSTR __RPC_FAR *  nodeValue,
unsigned int __RPC_FAR *  numChildren,
unsigned int __RPC_FAR *  aUniqueID,
unsigned short __RPC_FAR *  nodeType 
) [virtual, inherited]

Definition at line 125 of file nsAccessNodeWrap.cpp.

{
  if (!mDOMNode)
    return E_FAIL;
 
  *aNodeName = nsnull;
  nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));

  PRUint16 nodeType = 0;
  mDOMNode->GetNodeType(&nodeType);
  *aNodeType=NS_STATIC_CAST(unsigned short, nodeType);

  if (*aNodeType !=  NODETYPE_TEXT) {
    nsAutoString nodeName;
    mDOMNode->GetNodeName(nodeName);
    *aNodeName =   ::SysAllocString(nodeName.get());
  }

  nsAutoString nodeValue;

  mDOMNode->GetNodeValue(nodeValue);
  *aNodeValue = ::SysAllocString(nodeValue.get());
  *aNameSpaceID = content ? NS_STATIC_CAST(short, content->GetNameSpaceID()) : 0;

  // This is a unique ID for every content node.  The 3rd party
  // accessibility application can compare this to the childID we
  // return for events such as focus events, to correlate back to
  // data nodes in their internal object model.
  void *uniqueID;
  GetUniqueID(&uniqueID);
  *aUniqueID = - NS_PTR_TO_INT32(uniqueID);

  *aNumChildren = 0;
  PRUint32 numChildren = 0;
  nsCOMPtr<nsIDOMNodeList> nodeList;
  mDOMNode->GetChildNodes(getter_AddRefs(nodeList));
  if (nodeList && NS_OK == nodeList->GetLength(&numChildren))
    *aNumChildren = NS_STATIC_CAST(unsigned int, numChildren);

  return S_OK;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessNodeWrap::get_parentNode ( ISimpleDOMNode __RPC_FAR *__RPC_FAR *  node) [virtual, inherited]

Definition at line 422 of file nsAccessNodeWrap.cpp.

{
  if (!mDOMNode)
    return E_FAIL;
 
  nsCOMPtr<nsIDOMNode> node;
  mDOMNode->GetParentNode(getter_AddRefs(node));
  *aNode = MakeAccessNode(node);

  return S_OK;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessNodeWrap::get_previousSibling ( ISimpleDOMNode __RPC_FAR *__RPC_FAR *  node) [virtual, inherited]

Definition at line 458 of file nsAccessNodeWrap.cpp.

{
  if (!mDOMNode)
    return E_FAIL;

  nsCOMPtr<nsIDOMNode> node;
  mDOMNode->GetPreviousSibling(getter_AddRefs(node));
  *aNode = MakeAccessNode(node);

  return S_OK;
}

Here is the call graph for this function:

Accessible node geometrically above this one.

Accessible node geometrically below this one.

void nsAccessNodeWrap::GetAccessibleFor ( nsIDOMNode node,
nsIAccessible **  newAcc 
) [protected, inherited]
nsIAccessible nsIAccessible::getAccessibleRelated ( in unsigned long  aRelationType) [inherited]

Accessible node related to this one.

Accessible node geometrically to the left of this one.

Accessible node geometrically to the right of this one.

AString nsIAccessible::getActionName ( in PRUint8  index) [inherited]

The name of the accessible action at the given zero-based index.

void nsIAccessible::getBounds ( out long  x,
out long  y,
out long  width,
out long  height 
) [inherited]
nsIFrame * nsAccessible::GetBoundsFrame ( ) [protected, virtual]

Reimplemented in nsHTMLSelectOptionAccessible, and nsXULSelectOptionAccessible.

Definition at line 1087 of file nsAccessible.cpp.

{
  return GetFrame();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsAccessible::GetBoundsRect ( nsRect aRect,
nsIFrame **  aRelativeFrame 
) [protected, virtual]

Reimplemented in nsHTMLComboboxListAccessible, nsHTMLComboboxButtonAccessible, nsHTMLComboboxTextFieldAccessible, and nsDocAccessible.

Definition at line 944 of file nsAccessible.cpp.

{
/*
 * This method is used to determine the bounds of a content node.
 * Because HTML wraps and links are not always rectangular, this
 * method uses the following algorithm:
 *
 * 1) Start with an empty rectangle
 * 2) Add the rect for the primary frame from for the DOM node.
 * 3) For each next frame at the same depth with the same DOM node, add that rect to total
 * 4) If that frame is an inline frame, search deeper at that point in the tree, adding all rects
 */

  // Initialization area
  *aBoundingFrame = nsnull;
  nsIFrame *firstFrame = GetBoundsFrame();
  if (!firstFrame)
    return;

  // Find common relative parent
  // This is an ancestor frame that will incompass all frames for this content node.
  // We need the relative parent so we can get absolute screen coordinates
  nsIFrame *ancestorFrame = firstFrame;

  while (ancestorFrame) {  
    *aBoundingFrame = ancestorFrame;
    // If any other frame type, we only need to deal with the primary frame
    // Otherwise, there may be more frames attached to the same content node
    if (!IsCorrectFrameType(ancestorFrame, nsAccessibilityAtoms::inlineFrame) &&
        !IsCorrectFrameType(ancestorFrame, nsAccessibilityAtoms::textFrame))
      break;
    ancestorFrame = ancestorFrame->GetParent();
  }

  nsIFrame *iterFrame = firstFrame;
  nsCOMPtr<nsIContent> firstContent(do_QueryInterface(mDOMNode));
  nsIContent* iterContent = firstContent;
  PRInt32 depth = 0;

  // Look only at frames below this depth, or at this depth (if we're still on the content node we started with)
  while (iterContent == firstContent || depth > 0) {
    // Coordinates will come back relative to parent frame
    nsRect currFrameBounds = iterFrame->GetRect();
    
    // Make this frame's bounds relative to common parent frame
    currFrameBounds +=
      iterFrame->GetParent()->GetOffsetToExternal(*aBoundingFrame);

    // Add this frame's bounds to total
    aTotalBounds.UnionRect(aTotalBounds, currFrameBounds);

    nsIFrame *iterNextFrame = nsnull;

    if (IsCorrectFrameType(iterFrame, nsAccessibilityAtoms::inlineFrame)) {
      // Only do deeper bounds search if we're on an inline frame
      // Inline frames can contain larger frames inside of them
      iterNextFrame = iterFrame->GetFirstChild(nsnull);
    }

    if (iterNextFrame) 
      ++depth;  // Child was found in code above this: We are going deeper in this iteration of the loop
    else {  
      // Use next sibling if it exists, or go back up the tree to get the first next-in-flow or next-sibling 
      // within our search
      while (iterFrame) {
        iterNextFrame = iterFrame->GetNextInFlow();
        if (!iterNextFrame)
          iterNextFrame = iterFrame->GetNextSibling();
        if (iterNextFrame || --depth < 0) 
          break;
        iterFrame = iterFrame->GetParent();
      }
    }

    // Get ready for the next round of our loop
    iterFrame = iterNextFrame;
    if (iterFrame == nsnull)
      break;
    iterContent = nsnull;
    if (depth == 0)
      iterContent = iterFrame->GetContent();
  }
}

Here is the call graph for this function:

void nsAccessNode::GetCacheEntry ( nsInterfaceHashtable< nsVoidHashKey, nsIAccessNode > &  aCache,
void aUniqueID,
nsIAccessNode **  aAccessNode 
) [static, inherited]

Definition at line 520 of file nsAccessNode.cpp.

{
  aCache.Get(aUniqueID, aAccessNode);  // AddRefs for us
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsIAccessible nsIAccessible::getChildAt ( in long  aChildIndex) [inherited]

Nth accessible child using zero-based index or last child if index less than zero.

Accessible child which contains the coordinate at x,y.

Get the nth child of this node.

Parameters:
childNumZero-based child index
Returns:
The nth nsIAccessNode child
NS_IMETHODIMP nsAccessNodeWrap::GetComputedStyleDeclaration ( nsIDOMCSSStyleDeclaration **  aCssDecl,
PRUint32 aLength 
) [protected, inherited]

Definition at line 257 of file nsAccessNodeWrap.cpp.

{
  nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
  if (!content) 
    return NS_ERROR_FAILURE;   

  if (content->IsContentOfType(nsIContent::eTEXT)) {
    content = content->GetParent();
    NS_ASSERTION(content, "No parent for text node");
  }

  nsCOMPtr<nsIDOMElement> domElement(do_QueryInterface(content));
  nsCOMPtr<nsIDocument> doc = content->GetDocument();

  if (!domElement || !doc) {
    return NS_ERROR_FAILURE;
  }

  nsCOMPtr<nsIDOMViewCSS> viewCSS(do_QueryInterface(doc->GetScriptGlobalObject()));

  if (!viewCSS)
    return NS_ERROR_FAILURE;   

  nsCOMPtr<nsIDOMCSSStyleDeclaration> cssDecl;
  nsAutoString empty;
  viewCSS->GetComputedStyle(domElement, empty, getter_AddRefs(cssDecl));
  if (cssDecl) {
    *aCssDecl = cssDecl;
    NS_ADDREF(*aCssDecl);
    cssDecl->GetLength(aLength);
    return NS_OK;
  }
  return NS_ERROR_FAILURE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

DOMString nsIAccessNode::getComputedStyleValue ( in DOMString  pseudoElt,
in DOMString  propertyName 
) [inherited]

Retrieve the computed style value for this DOM node, if it is a DOM element.

Note: the meanings of width, height and other size measurements depend on the version of CSS being used. Therefore, for bounds information, it is better to use nsIAccessible::accGetBounds.

Parameters:
pseudoEltThe pseudo element to retrieve style for, or NULL for general computed style information for this node.
propertyNameRetrieve the computed style value for this property name, for example "border-bottom".
nsIContent * nsAccessible::GetContentPointingTo ( const nsAString *  aId,
nsIContent aLookContent,
nsIAtom forAttrib,
PRUint32  aForAttribNamespace = kNameSpaceID_None,
nsIAtom aTagType = nsAccessibilityAtoms::label 
) [static, protected]

Definition at line 1577 of file nsAccessible.cpp.

{
  if (!aTagType || aLookContent->Tag() == aTagType) {
    if (aForAttrib) {
      nsAutoString labelIsFor;
      aLookContent->GetAttr(aForAttribNameSpace, aForAttrib, labelIsFor);
      if (labelIsFor.Equals(*aId)) {
        return aLookContent;
      }
    }
    if (aTagType) {
      return nsnull;
    }
  }

  // Recursively search descendents for labels
  PRUint32 count  = 0;
  nsIContent *child;

  while ((child = aLookContent->GetChildAt(count++)) != nsnull) {
    nsIContent *labelContent = GetContentPointingTo(aId, child, aForAttrib,
                                                    aForAttribNameSpace, aTagType);
    if (labelContent) {
      return labelContent;
    }
  }
  return nsnull;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 245 of file nsAccessNode.cpp.

{
  return GetDocAccessibleFor(mWeakShell); // Addref'd
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 440 of file nsAccessNode.cpp.

{
  nsIAccessibleDocument *docAccessible = nsnull;
  nsCOMPtr<nsIAccessNode> accessNode;
  gGlobalDocAccessibleCache.Get(NS_STATIC_CAST(void*, aPresShell), getter_AddRefs(accessNode));
  if (accessNode) {
    CallQueryInterface(accessNode, &docAccessible);
  }
  return docAccessible;
}

Here is the call graph for this function:

Here is the caller graph for this function:

already_AddRefed< nsIAccessibleDocument > nsAccessNode::GetDocAccessibleFor ( nsISupports *  aContainer) [static, inherited]

Definition at line 452 of file nsAccessNode.cpp.

{
  nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(aContainer));
  NS_ASSERTION(docShell, "This method currently only supports docshells");
  nsCOMPtr<nsIPresShell> presShell;
  docShell->GetPresShell(getter_AddRefs(presShell));
  nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(presShell));
  return weakShell ? GetDocAccessibleFor(weakShell) : nsnull;
}

Here is the call graph for this function:

Definition at line 463 of file nsAccessNode.cpp.

{
  nsCOMPtr<nsIPresShell> eventShell = GetPresShellFor(aNode);
  nsCOMPtr<nsIWeakReference> weakEventShell(do_GetWeakReference(eventShell));
  return weakEventShell? GetDocAccessibleFor(weakEventShell) : nsnull;
}

Here is the call graph for this function:

Definition at line 489 of file nsAccessNode.cpp.

{
  nsCOMPtr<nsIDOMDocument> domDoc;
  aStartNode->GetOwnerDocument(getter_AddRefs(domDoc));
  nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
  if (!doc) {
    doc = do_QueryInterface(aStartNode);
  }
  NS_ASSERTION(doc, "No document for node passed in");
  NS_ENSURE_TRUE(doc, nsnull);
  nsCOMPtr<nsISupports> container = doc->GetContainer();
  nsIDocShellTreeItem *docShellTreeItem = nsnull;
  if (container) {
    CallQueryInterface(container, &docShellTreeItem);
  }

  return docShellTreeItem;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

nsresult nsAccessible::GetFullKeyName ( const nsAString &  aModifierName,
const nsAString &  aKeyName,
nsAString &  aStringOut 
) [static, protected]

Definition at line 705 of file nsAccessible.cpp.

{
  nsXPIDLString modifierName, separator;

  if (!gKeyStringBundle ||
      NS_FAILED(gKeyStringBundle->GetStringFromName(PromiseFlatString(aModifierName).get(), 
                                                    getter_Copies(modifierName))) ||
      NS_FAILED(gKeyStringBundle->GetStringFromName(PromiseFlatString(NS_LITERAL_STRING("MODIFIER_SEPARATOR")).get(), 
                                                    getter_Copies(separator)))) {
    return NS_ERROR_FAILURE;
  }

  aStringOut = modifierName + separator + aKeyName; 
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsIContent * nsAccessible::GetHTMLLabelContent ( nsIContent aForNode) [static, protected]

Definition at line 1489 of file nsAccessible.cpp.

{
  nsIContent *walkUpContent = aForNode;

  // go up tree get name of ancestor label if there is one. Don't go up farther than form element
  while ((walkUpContent = walkUpContent->GetParent()) != nsnull) {
    nsIAtom *tag = walkUpContent->Tag();
    if (tag == nsAccessibilityAtoms::label) {
      return walkUpContent;
    }
    if (tag == nsAccessibilityAtoms::form ||
        tag == nsAccessibilityAtoms::body) {
      // Reached top ancestor in form
      // There can be a label targeted at this control using the 
      // for="control_id" attribute. To save computing time, only 
      // look for those inside of a form element
      nsAutoString forId;
      aForNode->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::id, forId);
      // Actually we'll be walking down the content this time, with a depth first search
      if (forId.IsEmpty()) {
        break;
      }
      return GetContentPointingTo(&forId, walkUpContent, nsAccessibilityAtoms::_for); 
    }
  }

  return nsnull;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsAccessible::GetHTMLName ( nsAString &  aLabel,
PRBool  aCanAggregateSubtree = PR_TRUE 
) [protected]

Only called if the element is not a nsIDOMXULControlElement.

Initially walks up the DOM tree to the form, concatonating label elements as it goes. Then checks for labels with the for="controlID" property.

Definition at line 1615 of file nsAccessible.cpp.

{
  nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
  if (!content) {
    return NS_ERROR_FAILURE;   // Node shut down
  }

  // Check for DHTML accessibility labelledby relationship property
  nsAutoString label;
  nsresult rv = GetTextFromRelationID(nsAccessibilityAtoms::labelledby, label);
  if (NS_SUCCEEDED(rv)) {
    aLabel = label;
    return rv;
  }

  nsIContent *labelContent = GetHTMLLabelContent(content);
  if (labelContent) {
    AppendFlatStringFromSubtree(labelContent, &label);
    label.CompressWhitespace();
    if (!label.IsEmpty()) {
      aLabel = label;
      return NS_OK;
    }
  }

  if (aCanAggregateSubtree) {
    // Don't use AppendFlatStringFromSubtree for container widgets like menulist
    nsresult rv = AppendFlatStringFromSubtree(content, &aLabel);
    if (NS_SUCCEEDED(rv)) {
      return NS_OK;
    }
  }

  // Still try the title as as fallback method in that case.
  if (NS_CONTENT_ATTR_NOT_THERE ==
      content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::title, aLabel)) {
    aLabel.SetIsVoid(PR_TRUE);
  }
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

already_AddRefed< nsIDOMNode > nsAccessible::GetInverseRelatedNode ( nsIAtom aRelationAttr,
PRUint32  aAncestorLevelsToSearch = 0 
) [protected]

Definition at line 2067 of file nsAccessible.cpp.

{
  // aAncestorLevelsToSearch is an optimization used for label and description searches.
  // We expect the control to be relatively near the label/description in the DOM tree,
  // so to optimize we don't search the entire DOM tree.
  nsIContent *content = GetRoleContent(mDOMNode);
  if (!content) {
    return nsnull; // Node shut down
  }
  nsAutoString controlID;
  content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::id, controlID);
  if (controlID.IsEmpty()) {
    return nsnull;
  }
  nsIDOMNode *relatedNode = nsnull;
  // Something might be pointing to us
  PRUint32 count = 0;
  nsIContent *start = content;
  while ((!aAncestorLevelsToSearch || ++count <= aAncestorLevelsToSearch) && 
        (start = start->GetParent()) != nsnull) {
    nsIContent *description = GetContentPointingTo(&controlID, start,
                                                   aRelationAttr,
                                                   kNameSpaceID_WAIProperties,
                                                   nsnull);
    if (description) {
      nsIDOMNode *relatedNode;
      CallQueryInterface(description, &relatedNode);
      return relatedNode;
    }
  }
  return nsnull;
}

Here is the call graph for this function:

nsIContent * nsAccessible::GetLabelContent ( nsIContent aForNode) [static, protected]

Definition at line 1446 of file nsAccessible.cpp.

{
  return aForNode->IsContentOfType(nsIContent::eXUL) ? GetXULLabelContent(aForNode) :
                                                       GetHTMLLabelContent(aForNode);
}

Here is the call graph for this function:

Definition at line 1093 of file nsAccessible.cpp.

{
  NS_ENSURE_TRUE(aNode, nsnull);
  nsCOMPtr<nsIAccessibilityService> accService =
    do_GetService("@mozilla.org/accessibilityService;1");
  NS_ENSURE_TRUE(accService, nsnull);
  nsCOMPtr<nsIAccessible> accessible;
  accService->GetAccessibleFor(aNode, getter_AddRefs(accessible));
  if (!accessible) {
    return nsnull;
  }

  PRUint32 state;
  accessible->GetFinalState(&state);
  if (0 == (state & STATE_SELECTABLE)) {
    return nsnull;
  }

  PRUint32 containerRole;
  while (0 == (state & STATE_MULTISELECTABLE)) {
    nsIAccessible *current = accessible;
    current->GetParent(getter_AddRefs(accessible));
    if (!accessible || (NS_SUCCEEDED(accessible->GetFinalRole(&containerRole)) &&
                        containerRole == ROLE_PANE)) {
      return nsnull;
    }
    accessible->GetFinalState(&state);
  }
  nsIAccessible *returnAccessible = nsnull;
  accessible.swap(returnAccessible);
  return returnAccessible;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsIAccessible::getNativeInterface ( out voidPtr  aOutAccessible) [inherited]

Get a pointer to accessibility interface for this node, which is specific to the OS/accessibility toolkit we're running on.

Definition at line 2383 of file nsAccessible.cpp.

{
  // Return the next descendant that matches one of the states in matchState
  // Uses depth first search
  NS_ASSERTION(matchState, "GetNextWithState() not called with a state to match");
  NS_ASSERTION(aStart, "GetNextWithState() not called with an accessible to start with");
  nsCOMPtr<nsIAccessible> look, current = aStart;
  PRUint32 state = 0;
  while (0 == (state & matchState)) {
    current->GetFirstChild(getter_AddRefs(look));
    while (!look) {
      if (current == this) {
        return nsnull; // At top of subtree
      }
      current->GetNextSibling(getter_AddRefs(look));
      if (!look) {
        current->GetParent(getter_AddRefs(look));
        current.swap(look);
        continue;
      }
    }
    current.swap(look);
    current->GetFinalState(&state);
  }

  nsIAccessible *returnAccessible = nsnull;
  current.swap(returnAccessible);

  return returnAccessible;
}

Here is the call graph for this function:

nsPresContext * nsAccessNode::GetPresContext ( ) [protected, inherited]

Definition at line 236 of file nsAccessNode.cpp.

{
  nsCOMPtr<nsIPresShell> presShell(GetPresShell());
  if (!presShell) {
    return nsnull;
  }
  return presShell->GetPresContext();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 219 of file nsAccessNode.cpp.

{
  nsIPresShell *presShell = nsnull;
  if (mWeakShell)
    CallQueryReferent(mWeakShell.get(), &presShell);
  if (!presShell) {
    if (mWeakShell) {
      // If our pres shell has died, but we're still holding onto
      // a weak reference, our accessibles are no longer relevant
      // and should be shut down
      Shutdown();
    }
    return nsnull;
  }
  return presShell;
}

Here is the call graph for this function:

Here is the caller graph for this function:

already_AddRefed< nsIPresShell > nsAccessNode::GetPresShellFor ( nsIDOMNode aStartNode) [static, inherited]

Definition at line 471 of file nsAccessNode.cpp.

{
  nsCOMPtr<nsIDOMDocument> domDocument;
  aNode->GetOwnerDocument(getter_AddRefs(domDocument));
  nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDocument));
  if (!doc) {   // This is necessary when the node is the document node
    doc = do_QueryInterface(aNode);
  }
  nsIPresShell *presShell = nsnull;
  if (doc) {
    presShell = doc->GetShellAt(0);
    NS_IF_ADDREF(presShell);
  }
  return presShell;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static PRBool nsAccessNode::GetRoleAttribute ( nsIContent aContent,
nsAString &  aRole 
) [inline, static, inherited]

Definition at line 135 of file nsAccessNode.h.

    {
      aRole.Truncate();
      return (aContent->IsContentOfType(nsIContent::eHTML) && aContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::role, aRole) != NS_CONTENT_ATTR_NOT_THERE) ||
              aContent->GetAttr(kNameSpaceID_XHTML, nsAccessibilityAtoms::role, aRole) != NS_CONTENT_ATTR_NOT_THERE ||
              aContent->GetAttr(kNameSpaceID_XHTML2_Unofficial, nsAccessibilityAtoms::role, aRole) != NS_CONTENT_ATTR_NOT_THERE;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

nsIContent * nsAccessible::GetRoleContent ( nsIDOMNode aDOMNode) [static, protected]

Definition at line 422 of file nsAccessible.cpp.

{
  // Given the DOM node for an acessible, return content node that
  // we should look at role string from
  // For non-document accessibles, this is the associated content node.
  // For doc accessibles, first try the <body> if it's HTML and there is
  // a role attribute used there.
  // For any other doc accessible , this is the document element.
  nsCOMPtr<nsIContent> content(do_QueryInterface(aDOMNode));
  if (!content) {
    nsCOMPtr<nsIDOMDocument> domDoc(do_QueryInterface(aDOMNode));
    if (domDoc) {
      nsCOMPtr<nsIDOMHTMLDocument> htmlDoc(do_QueryInterface(aDOMNode));
      if (htmlDoc) {
        nsCOMPtr<nsIDOMHTMLElement> bodyElement;
        htmlDoc->GetBody(getter_AddRefs(bodyElement));
        content = do_QueryInterface(bodyElement);
      }
      if (!content || !HasRoleAttribute(content)) {
        nsCOMPtr<nsIDOMElement> docElement;
        domDoc->GetDocumentElement(getter_AddRefs(docElement));
        content = do_QueryInterface(docElement);
      }
    }
  }
  return content;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsAccessible::GetScreenOrigin ( nsPresContext aPresContext,
nsIFrame aFrame,
nsRect aRect 
) [protected]

Definition at line 913 of file nsAccessible.cpp.

{
  aRect->x = aRect->y = 0;

  if (!aPresContext) {
    return;
  }

  nsPoint origin(0,0);
  nsIView *view = aFrame->GetViewExternal();
  if (!view) {
    aFrame->GetOffsetFromView(origin, &view);
    NS_ASSERTION(view, "Frame has no view");
  }

  nsPoint viewOrigin(0,0);
  nsIWidget *widget = view->GetNearestWidget(&viewOrigin);
  origin += viewOrigin;

  // Get the scale from that Presentation Context
  float t2p = aPresContext->TwipsToPixels();

  // Convert to pixels using that scale
  origin.x = NSTwipsToIntPixels(origin.x, t2p);
  origin.y = NSTwipsToIntPixels(origin.y, t2p);
  
  // Add the widget's screen coordinates to the offset we've counted
  NS_ASSERTION(widget, "No widget for top view");
  widget->WidgetToScreen(nsRect(origin.x, origin.y, 1, 1), *aRect);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Return an nsIArray of selected nsIAccessible children.

Reimplemented in nsHTMLComboboxListAccessible, nsHTMLComboboxButtonAccessible, nsHTMLComboboxTextFieldAccessible, nsHTMLComboboxAccessible, nsXULComboboxAccessible, nsHTMLSelectOptGroupAccessible, nsXULTreeColumnitemAccessible, nsHTMLSelectOptionAccessible, nsXULListitemAccessible, nsXULTextFieldAccessible, nsXULToolbarSeparatorAccessible, nsXULTreeColumnsAccessible, nsXULToolbarAccessible, nsXULListboxAccessible, nsHTMLSelectListAccessible, nsXULStatusBarAccessible, nsHTMLLIAccessible, nsXULRadioGroupAccessible, nsXULSelectOptionAccessible, nsHTMLGroupboxAccessible, nsXULRadioButtonAccessible, nsHTMLListAccessible, nsXULTreeitemAccessible, nsXULProgressMeterAccessible, nsHTMLTextFieldAccessible, nsXULSelectListAccessible, nsXULTabsAccessible, nsXULGroupboxAccessible, nsLinkableAccessible, nsXULMenubarAccessible, nsHTMLListBulletAccessible, nsHTML4ButtonAccessible, nsXULTabPanelsAccessible, nsXULMenupopupAccessible, nsDocAccessible, nsXULDropmarkerAccessible, nsHTMLLabelAccessible, nsHTMLButtonAccessible, nsRootAccessible, nsCaretAccessible, nsHTMLTableAccessible, nsXULCheckboxAccessible, nsXULMenuSeparatorAccessible, nsXULTabBoxAccessible, nsXULTreeAccessible, nsHTMLHRAccessible, nsXULTooltipAccessible, nsHTMLRadioButtonAccessible, nsXULColorPickerAccessible, nsHTMLTableCaptionAccessible, nsOuterDocAccessible, nsHTMLImageAccessible, nsHTMLTextAccessible, nsXULMenuitemAccessible, nsHTMLBlockAccessible, nsHTMLLinkAccessible, nsXULButtonAccessible, nsHTMLCheckboxAccessible, nsXULTextAccessible, nsXULAlertAccessible, nsXULTabAccessible, nsHTMLTableCellAccessible, and nsXULColorPickerTileAccessible.

Definition at line 793 of file nsAccessible.cpp.

{ 
  *aState = 0;

  nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
  if (!content) {
    return NS_ERROR_FAILURE;  // Node shut down
  }

  // Set STATE_UNAVAILABLE state based on disabled attribute
  // The disabled attribute is mostly used in XUL elements and HTML forms, but
  // if someone sets it on another attribute, 
  // it seems reasonable to consider it unavailable
  PRBool isDisabled;
  if (content->IsContentOfType(nsIContent::eHTML)) {
    // In HTML, just the presence of the disabled attribute means it is disabled,
    // therefore disabled="false" indicates disabled!
    isDisabled = content->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::disabled);
  }
  else {
    nsAutoString disabled;
    content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::disabled, disabled);
    isDisabled = disabled.EqualsLiteral("true");
  }
  if (isDisabled) {
    *aState |= STATE_UNAVAILABLE;
  }
  else if (content->IsContentOfType(nsIContent::eELEMENT)) {
    if (!mRoleMapEntry) {
      // Default state for element accessible is focusable unless role is manually set
      // Subclasses of nsAccessible will clear focusable state if necessary
      *aState |= STATE_FOCUSABLE;
    }
    else {
      nsIFrame *frame = GetFrame();
      if (frame && frame->IsFocusable()) {
        *aState |= STATE_FOCUSABLE;
      }
    }

    if (gLastFocusedNode == mDOMNode) {
      *aState |= STATE_FOCUSED;
    }
  }

  // Check if STATE_OFFSCREEN bitflag should be turned on for this object
  PRBool isOffscreen;
  if (!IsPartiallyVisible(&isOffscreen)) {
    *aState |= STATE_INVISIBLE;
    if (isOffscreen)
      *aState |= STATE_OFFSCREEN;
  }

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsAccessible::GetTextFromRelationID ( nsIAtom aIDAttrib,
nsString aName 
) [protected]

Definition at line 1518 of file nsAccessible.cpp.

{
  // Get DHTML name from content subtree pointed to by ID attribute
  aName.Truncate();
  nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
  NS_ASSERTION(content, "Called from shutdown accessible");

  nsAutoString ids;
  if (NS_CONTENT_ATTR_NOT_THERE ==
      content->GetAttr(kNameSpaceID_WAIProperties, aIDAttrib, ids)) {
    return NS_ERROR_FAILURE;
  }
  ids.CompressWhitespace(PR_TRUE, PR_TRUE);

  nsCOMPtr<nsIDOMDocument> domDoc;
  mDOMNode->GetOwnerDocument(getter_AddRefs(domDoc));
  NS_ENSURE_TRUE(domDoc, NS_ERROR_FAILURE);
  
  nsresult rv = NS_ERROR_FAILURE;

  // Support idlist as in aaa::labelledby="id1 id2 id3"
  while (PR_TRUE) {
    nsAutoString id;
    PRInt32 idLength = ids.FindChar(' ');  // -1 means end of string, not space found
    NS_ASSERTION(idLength != 0, "Should not be 0 because of CompressWhitespace() call above");
    id = Substring(ids, 0, idLength);
    if (idLength == -1) {
      ids.Truncate();
    }
    else {
      ids.Cut(0, idLength + 1);
    }
    if (!id.IsEmpty() && id.Last() == ' ') {
      id.Truncate(idLength - 1);  // Eliminate trailing space if it's there
    }

    if (id.IsEmpty()) {
      break;
    }
    if (!aName.IsEmpty()) {
      aName += ' '; // Need whitespace between multiple labels or descriptions
    }
    nsCOMPtr<nsIDOMElement> labelElement;
    domDoc->GetElementById(id, getter_AddRefs(labelElement));
    content = do_QueryInterface(labelElement);
    if (!content) {
      return NS_OK;
    }
    // We have a label content
    rv = AppendFlatStringFromSubtree(content, &aName);
    if (NS_SUCCEEDED(rv)) {
      aName.CompressWhitespace();
    }
  }
  
  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsAccessible::GetTranslatedString ( const nsAString &  aKey,
nsAString &  aStringOut 
) [static, protected]

Definition at line 693 of file nsAccessible.cpp.

{
  nsXPIDLString xsValue;

  if (!gStringBundle || 
    NS_FAILED(gStringBundle->GetStringFromName(PromiseFlatString(aKey).get(), getter_Copies(xsValue)))) 
    return NS_ERROR_FAILURE;

  aStringOut.Assign(xsValue);
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP nsAccessible::GetValue ( nsAString &  aValue)
nsIContent * nsAccessible::GetXULLabelContent ( nsIContent aForNode,
nsIAtom aLabelType = nsAccessibilityAtoms::label 
) [static, protected]

Definition at line 1452 of file nsAccessible.cpp.

{
  nsAutoString controlID;
  nsIContent *labelContent = GetContentPointingTo(&controlID, aForNode, nsnull,
                                                  kNameSpaceID_None, aLabelType);
  if (labelContent) {
    return labelContent;
  }

  // If we're in anonymous content, determine whether we should use
  // the binding parent based on where the id for this control is
  aForNode->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::id, controlID);
  if (controlID.IsEmpty()) {
    // If no control ID and we're anonymous content
    // get ID from parent that inserted us.
    aForNode = aForNode->GetBindingParent();
    if (aForNode) {
      aForNode->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::id, controlID);
    }
    if (controlID.IsEmpty()) {
      return nsnull;
    }
  }
  
  // Look for label in subtrees of nearby ancestors
  static const PRUint32 kAncestorLevelsToSearch = 5;
  PRUint32 count = 0;
  while (!labelContent && ++count <= kAncestorLevelsToSearch && 
         (aForNode = aForNode->GetParent()) != nsnull) {
    labelContent = GetContentPointingTo(&controlID, aForNode,
                                        nsAccessibilityAtoms::control,
                                        kNameSpaceID_None, aLabelType);
  }

  return labelContent;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsAccessible::GetXULName ( nsAString &  aLabel,
PRBool  aCanAggregateSubtree = PR_TRUE 
) [protected]

3 main cases for XUL Controls to be labeled 1 - control contains label="foo" 2 - control has, as a child, a label element

   - label has either value="foo" or children

3 - non-child label contains control="controlID"

  • label has either value="foo" or children Once a label is found, the search is discontinued, so a control that has a label child as well as having a label external to the control that uses the control="controlID" syntax will use the child label for its Name.

Definition at line 1668 of file nsAccessible.cpp.

{
  nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
  NS_ASSERTION(content, "No nsIContent for DOM node");

  // First check for label override via accessibility labelledby relationship
  nsAutoString label;
  nsresult rv = GetTextFromRelationID(nsAccessibilityAtoms::labelledby, label);
  if (NS_SUCCEEDED(rv)) {
    aLabel = label;
    return rv;
  }

  // CASE #1 (via label attribute) -- great majority of the cases
  nsCOMPtr<nsIDOMXULLabeledControlElement> labeledEl(do_QueryInterface(mDOMNode));
  if (labeledEl) {
    rv = labeledEl->GetLabel(label);
  }
  else {
    nsCOMPtr<nsIDOMXULSelectControlItemElement> itemEl(do_QueryInterface(mDOMNode));
    if (itemEl) {
      rv = itemEl->GetLabel(label);
    }
    else {
      nsCOMPtr<nsIDOMXULSelectControlElement> select(do_QueryInterface(mDOMNode));
      // Use label if this is not a select control element which 
      // uses label attribute to indicate which option is selected
      if (!select) {
        nsCOMPtr<nsIDOMXULElement> xulEl(do_QueryInterface(mDOMNode));
        if (xulEl) {
          rv = xulEl->GetAttribute(NS_LITERAL_STRING("label"), label);
        }
      }
    }
  }

  // CASES #2 and #3 ------ label as a child or <label control="id" ... > </label>
  if (NS_FAILED(rv) || label.IsEmpty()) {
    label.Truncate();
    nsIContent *labelContent = GetXULLabelContent(content);
    nsCOMPtr<nsIDOMXULLabelElement> xulLabel(do_QueryInterface(labelContent));
    // Check if label's value attribute is used
    if (xulLabel && NS_SUCCEEDED(xulLabel->GetValue(label)) && label.IsEmpty()) {
      // If no value attribute, a non-empty label must contain
      // children that define it's text -- possibly using HTML
      AppendFlatStringFromSubtree(labelContent, &label);
    }
  }

  // XXX If CompressWhiteSpace worked on nsAString we could avoid a copy
  label.CompressWhitespace();
  if (!label.IsEmpty()) {
    aLabel = label;
    return NS_OK;
  }

  content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::tooltiptext, label);
  label.CompressWhitespace();
  if (!label.IsEmpty()) {
    aLabel = label;
    return NS_OK;
  }

  // Can get text from title of <toolbaritem> if we're a child of a <toolbaritem>
  nsIContent *bindingParent = content->GetBindingParent();
  nsIContent *parent = bindingParent? bindingParent->GetParent() :
                                      content->GetParent();
  while (parent) {
    if (parent->Tag() == nsAccessibilityAtoms::toolbaritem &&
        parent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::title)) {
      parent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::title, label);
      label.CompressWhitespace();
      aLabel = label;
      return NS_OK;
    }
    parent = parent->GetParent();
  }

  // Don't use AppendFlatStringFromSubtree for container widgets like menulist
  return aCanAggregateSubtree? AppendFlatStringFromSubtree(content, &aLabel) : NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static PRBool nsAccessNode::HasRoleAttribute ( nsIContent aContent) [inline, static, inherited]

Definition at line 127 of file nsAccessNode.h.

    {
      return (aContent->IsContentOfType(nsIContent::eHTML) && aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::role)) ||
              aContent->HasAttr(kNameSpaceID_XHTML, nsAccessibilityAtoms::role) ||
              aContent->HasAttr(kNameSpaceID_XHTML2_Unofficial, nsAccessibilityAtoms::role);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void nsPIAccessNode::init ( ) [inherited]

Reimplemented in nsHTMLComboboxAccessible, nsDocAccessible, nsCaretAccessible, nsAppRootAccessible, and nsRootAccessibleWrap.

Definition at line 374 of file nsAccessible.cpp.

{
  nsIContent *content = GetRoleContent(mDOMNode);
  nsAutoString roleString;
  if (content && GetRoleAttribute(content, roleString)) {
    // QI to nsIDOM3Node causes some overhead. Unfortunately we need to do this each
    // time there is a role attribute, because the prefixe to namespace mappings
    // can change within any subtree via the xmlns attribute
    nsCOMPtr<nsIDOM3Node> dom3Node(do_QueryInterface(content));
    if (dom3Node) {
      nsAutoString prefix;
      NS_NAMED_LITERAL_STRING(kWAIRoles_Namespace, "http://www.w3.org/2005/01/wai-rdf/GUIRoleTaxonomy#");
      dom3Node->LookupPrefix(kWAIRoles_Namespace, prefix);
      if (prefix.IsEmpty()) {
        // In HTML we are hardcoded to allow the exact prefix "wairole:" to 
        // always indicate that we are using the WAI roles. This allows DHTML accessibility
        // to be used within HTML
        nsCOMPtr<nsIDOMNSDocument> doc(do_QueryInterface(content->GetDocument()));
        if (doc) {
          nsAutoString mimeType;
          doc->GetContentType(mimeType);
          if (mimeType.EqualsLiteral("text/html")) {
            prefix = NS_LITERAL_STRING("wairole");
          }
        }
      }
      prefix += ':';
      PRUint32 length = prefix.Length();
      if (length > 1 && StringBeginsWith(roleString, prefix)) {
        roleString.Cut(0, length);
        nsCString utf8Role = NS_ConvertUCS2toUTF8(roleString); // For easy comparison
        ToLowerCase(utf8Role);
        PRUint32 index;
        for (index = 0; gWAIRoleMap[index].roleString; index ++) {
          if (utf8Role.Equals(gWAIRoleMap[index].roleString)) {
            break; // The dynamic role attribute maps to an entry in our table
          }
        }
        // Always use some entry if there is a role string
        // If no match, we use the last entry which maps to ROLE_NOTHING
        mRoleMapEntry = &gWAIRoleMap[index];
      }
    }
  }

  return nsAccessNodeWrap::Init();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsAccessNodeWrap::InitAccessibility ( ) [static, inherited]

Definition at line 67 of file nsAccessNodeWrap.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static void nsAccessNodeWrap::InitAccessibility ( ) [static, inherited]
static void nsAccessNodeWrap::InitAccessibility ( ) [static, inherited]
static void nsAccessNodeWrap::InitAccessibility ( ) [static, inherited]
void nsAccessNode::InitXPAccessibility ( ) [static, inherited]

Definition at line 172 of file nsAccessNode.cpp.

{
  if (gIsAccessibilityActive) {
    return;
  }

  nsCOMPtr<nsIStringBundleService> stringBundleService =
    do_GetService(NS_STRINGBUNDLE_CONTRACTID);
  if (stringBundleService) {
    // Static variables are released in ShutdownAllXPAccessibility();
    stringBundleService->CreateBundle(ACCESSIBLE_BUNDLE_URL, 
                                      &gStringBundle);
    stringBundleService->CreateBundle(PLATFORM_KEYS_BUNDLE_URL, 
                                      &gKeyStringBundle);
  }

  nsAccessibilityAtoms::AddRefAtoms();

  gGlobalDocAccessibleCache.Init(4);

  nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
  if (prefBranch) {
    prefBranch->GetBoolPref("accessibility.disablecache", &gIsCacheDisabled);
  }

  gIsAccessibilityActive = PR_TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Set the child count to -1 (unknown) and null out cached child pointers.

Determines if the current child of this object is selected.

Parameters:
Thezero-based accessible child index
Returns:
Returns true if the child is selected, false if not.
PRBool nsAccessible::IsCorrectFrameType ( nsIFrame aFrame,
nsIAtom aAtom 
) [static]

Static Helper method to help sub classes make sure they have the proper frame when walking the frame tree to get at children and such.

Definition at line 1078 of file nsAccessible.cpp.

{
  NS_ASSERTION(aFrame != nsnull, "aFrame is null in call to IsCorrectFrameType!");
  NS_ASSERTION(aAtom != nsnull, "aAtom is null in call to IsCorrectFrameType!");

  return aFrame->GetType() == aAtom;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PRBool nsAccessible::IsPartiallyVisible ( PRBool aIsOffscreen) [protected]

Definition at line 721 of file nsAccessible.cpp.

{
  // We need to know if at least a kMinPixels around the object is visible
  // Otherwise it will be marked STATE_OFFSCREEN and STATE_INVISIBLE
  
  *aIsOffscreen = PR_FALSE;

  const PRUint16 kMinPixels  = 12;
   // Set up the variables we need, return false if we can't get at them all
  nsCOMPtr<nsIPresShell> shell(GetPresShell());
  if (!shell) 
    return PR_FALSE;

  nsIViewManager* viewManager = shell->GetViewManager();
  if (!viewManager)
    return PR_FALSE;

  nsIFrame *frame = GetFrame();
  if (!frame) {
    return PR_FALSE;
  }

  // If visibility:hidden or visibility:collapsed then mark with STATE_INVISIBLE
  if (!frame->GetStyleVisibility()->IsVisible())
  {
      return PR_FALSE;
  }

  nsPresContext *presContext = shell->GetPresContext();
  if (!presContext)
    return PR_FALSE;

  // Get the bounds of the current frame, relative to the current view.
  // We don't use the more accurate GetBoundsRect, because that is more expensive 
  // and the STATE_OFFSCREEN flag that this is used for only needs to be a rough indicator

  nsRect relFrameRect = frame->GetRect();
  nsPoint frameOffset;
  nsIView *containingView = frame->GetViewExternal();
  if (!containingView) {
    frame->GetOffsetFromView(frameOffset, &containingView);
    if (!containingView)
      return PR_FALSE;  // no view -- not visible
    relFrameRect.x = frameOffset.x;
    relFrameRect.y = frameOffset.y;
  }

  float p2t;
  p2t = presContext->PixelsToTwips();
  nsRectVisibility rectVisibility;
  viewManager->GetRectVisibility(containingView, relFrameRect, 
                                 NS_STATIC_CAST(PRUint16, (kMinPixels * p2t)), 
                                 &rectVisibility);

  if (rectVisibility == nsRectVisibility_kVisible ||
      (rectVisibility == nsRectVisibility_kZeroAreaRect && frame->GetNextInFlow())) {
    // This view says it is visible, but we need to check the parent view chain :(
    // Note: zero area rects can occur in the first frame of a multi-frame text flow,
    //       in which case the next frame exists because the text flow is visible
    while ((containingView = containingView->GetParent()) != nsnull) {
      if (containingView->GetVisibility() == nsViewVisibility_kHide) {
        return PR_FALSE;
      }
    }
    return PR_TRUE;
  }

  *aIsOffscreen = rectVisibility != nsRectVisibility_kZeroAreaRect;
  return PR_FALSE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ISimpleDOMNode * nsAccessNodeWrap::MakeAccessNode ( nsIDOMNode node) [protected, inherited]

Definition at line 372 of file nsAccessNodeWrap.cpp.

{
  if (!node) 
    return NULL;

  nsAccessNodeWrap *newNode = NULL;
  
  nsCOMPtr<nsIContent> content(do_QueryInterface(node));
  nsCOMPtr<nsIDocument> doc;

  if (content) 
    doc = content->GetDocument();
  else {
    // Get the document via QueryInterface, since there is no content node
    doc = do_QueryInterface(node);
    content = do_QueryInterface(node);
  }

  if (!doc)
    return NULL;

  nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
  if (!accService)
    return NULL;

  ISimpleDOMNode *iNode = NULL;
  nsCOMPtr<nsIAccessible> nsAcc;
  accService->GetAccessibleInWeakShell(node, mWeakShell, getter_AddRefs(nsAcc));
  if (nsAcc) {
    nsCOMPtr<nsIAccessNode> accessNode(do_QueryInterface(nsAcc));
    NS_ASSERTION(accessNode, "nsIAccessible impl does not inherit from nsIAccessNode");
    IAccessible *msaaAccessible;
    nsAcc->GetNativeInterface((void**)&msaaAccessible); // addrefs
    msaaAccessible->QueryInterface(IID_ISimpleDOMNode, (void**)&iNode); // addrefs
    msaaAccessible->Release(); // Release IAccessible
  }
  else {
    newNode = new nsAccessNodeWrap(node, mWeakShell);
    if (!newNode)
      return NULL;

    newNode->Init();
    iNode = NS_STATIC_CAST(ISimpleDOMNode*, newNode);
    iNode->AddRef();
  }

  return iNode;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsAccessNode::MakeAccessNode ( nsIDOMNode aNode,
nsIAccessNode **  aAccessNode 
) [protected, inherited]

Definition at line 312 of file nsAccessNode.cpp.

{
  nsCOMPtr<nsIAccessibilityService> accService = 
    do_GetService("@mozilla.org/accessibilityService;1");
  NS_ENSURE_TRUE(accService, NS_ERROR_FAILURE);

  nsCOMPtr<nsIAccessNode> accessNode;
  accService->GetCachedAccessNode(aNode, mWeakShell, getter_AddRefs(accessNode));

  if (!accessNode) {
    nsCOMPtr<nsIAccessible> accessible;
    accService->GetAccessibleInWeakShell(aNode, mWeakShell, 
                                         getter_AddRefs(accessible));
    
    accessNode = do_QueryInterface(accessible);
  }

  if (accessNode) {
    NS_ADDREF(*aAccessNode = accessNode);
    return NS_OK;
  }

  nsAccessNode *newAccessNode = new nsAccessNode(aNode, mWeakShell);
  if (!newAccessNode) {
    return NS_ERROR_OUT_OF_MEMORY;
  }

  NS_ADDREF(*aAccessNode = newAccessNode);
  newAccessNode->Init();

  return NS_OK;
}

Here is the call graph for this function:

PRBool nsAccessible::MappedAttrState ( nsIContent aContent,
PRUint32 aStateInOut,
nsStateMapEntry aStateMapEntry 
) [protected]

Definition at line 1897 of file nsAccessible.cpp.

{
  // Return true if we should continue
  if (!aStateMapEntry->attributeName) {
    return PR_FALSE;  // Stop looking -- no more states
  }

  nsAutoString attribValue;
  nsCOMPtr<nsIAtom> attribAtom = do_GetAtom(aStateMapEntry->attributeName); // XXX put atoms directly in entry
  if (NS_CONTENT_ATTR_HAS_VALUE == aContent->GetAttr(kNameSpaceID_WAIProperties,
                                                     attribAtom,
                                                     attribValue)) {
    if (aStateMapEntry->attributeValue == BOOL_STATE) {
      // No attribute value map specified in state map entry indicates state cleared
      if (attribValue.EqualsLiteral("false")) {
        return *aStateInOut &= ~aStateMapEntry->state;
      }
      return *aStateInOut |= aStateMapEntry->state;
    }
    if (NS_ConvertUTF16toUTF8(attribValue).Equals(aStateMapEntry->attributeValue)) {
      return *aStateInOut |= aStateMapEntry->state;
    }
  }

  return PR_TRUE;
}

Here is the call graph for this function:

void nsAccessNode::PutCacheEntry ( nsInterfaceHashtable< nsVoidHashKey, nsIAccessNode > &  aCache,
void aUniqueID,
nsIAccessNode aAccessNode 
) [static, inherited]

Definition at line 508 of file nsAccessNode.cpp.

{
#ifdef DEBUG
  nsCOMPtr<nsIAccessNode> oldAccessNode;
  GetCacheEntry(aCache, aUniqueID, getter_AddRefs(oldAccessNode));
  NS_ASSERTION(!oldAccessNode, "This cache entry shouldn't exist already");
#endif
  aCache.Put(aUniqueID, aAccessNode);
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual long IUnknown::QueryInterface ( ) [pure virtual, inherited]

Here is the caller graph for this function:

STDMETHODIMP nsAccessNodeWrap::QueryInterface ( REFIID  iid,
void **  ppv 
) [inherited]

Reimplemented in nsAccessibleWrap, nsTextAccessibleWrap, and nsDocAccessibleWrap.

Definition at line 106 of file nsAccessNodeWrap.cpp.

{
  *ppv = nsnull;

  if (IID_IUnknown == iid || IID_ISimpleDOMNode == iid)
    *ppv = NS_STATIC_CAST(ISimpleDOMNode*, this);

  if (nsnull == *ppv)
    return E_NOINTERFACE;      //iid not supported.
   
  (NS_REINTERPRET_CAST(IUnknown*, *ppv))->AddRef(); 
  return S_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHOD nsAccessNode::QueryInterface ( REFNSIID  aIID,
void **  aInstancePtr 
) [inherited]

Here is the caller graph for this function:

Returns a reference to the accessible object representing the specified selected child of the object.

Parameters:
indexZero-based selected accessible child index
Returns:
The nth selected accessible child
virtual long IUnknown::Release ( ) [pure virtual, inherited]

Here is the caller graph for this function:

Removes the specified child of the object from the object's selection.

If the specified object was not selected, then it does nothing.

Exceptions:
NS_ERROR_FAILUREif the specified object is not selectable.

Remove this accessible from the current selection.

STDMETHODIMP nsAccessNodeWrap::scrollTo ( boolean  scrollTopLeft) [virtual, inherited]

Implements ISimpleDOMNode.

Definition at line 352 of file nsAccessNodeWrap.cpp.

{
  nsCOMPtr<nsIPresShell> shell(GetPresShell());
  if (!mDOMNode || !shell) {
    return E_FAIL;
  }

  nsIFrame *frame = GetFrame();

  if (frame) {
    PRInt32 percent = NS_PRESSHELL_SCROLL_ANYWHERE;
    if (aScrollTopLeft)
      percent = 0;
    return shell->ScrollFrameIntoView(frame, percent, percent);
  }

  return E_FAIL;
}

Here is the call graph for this function:

Select all children.

Returns:
If the object does not accept multiple selection, return false. Otherwise, returns true.
void nsPIAccessible::setFirstChild ( in nsIAccessible  aAccFirstChild) [inherited]
void nsPIAccessible::setNextSibling ( in nsIAccessible  aAccNextSibling) [inherited]

Definition at line 1126 of file nsAccessible.cpp.

{
  nsCOMPtr<nsIAccessible> multiSelect = GetMultiSelectFor(mDOMNode);
  if (!multiSelect) {
    return aSelect ? TakeFocus() : NS_ERROR_FAILURE;
  }
  nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
  NS_ASSERTION(content, "Called for dead accessible");

  // For DHTML widgets use WAI namespace
  PRUint32 nameSpaceID = mRoleMapEntry ? kNameSpaceID_WAIProperties : kNameSpaceID_None;
  if (aSelect) {
    return content->SetAttr(nameSpaceID, nsAccessibilityAtoms::selected, NS_LITERAL_STRING("true"), PR_TRUE);
  }
  return content->UnsetAttr(nameSpaceID, nsAccessibilityAtoms::selected, PR_TRUE);
}

Here is the call graph for this function:

void nsPIAccessible::setParent ( in nsIAccessible  aAccParent) [inherited]
void nsPIAccessNode::shutdown ( ) [inherited]

Reimplemented in nsHTMLComboboxAccessible, nsHTMLLIAccessible, nsRootAccessible, nsXULTreeitemAccessible, nsLinkableAccessible, nsDocAccessible, nsDocAccessibleWrap, nsCaretAccessible, nsHTMLListBulletAccessible, nsXULTextFieldAccessibleWrap, nsXULTreeAccessible, nsDocAccessibleWrap, nsRootAccessibleWrap, nsHTMLTextFieldAccessibleWrap, nsHTMLWin32ObjectOwnerAccessible, nsHTMLBlockAccessible, and nsHTMLTableCellAccessibleWrap.

Definition at line 450 of file nsAccessible.cpp.

{
  mNextSibling = nsnull;
  // Make sure none of it's children point to this parent
  if (mFirstChild) {
    nsCOMPtr<nsIAccessible> current(mFirstChild), next;
    while (current) {
      nsCOMPtr<nsPIAccessible> privateAcc(do_QueryInterface(current));
      current->GetNextSibling(getter_AddRefs(next));
      privateAcc->SetParent(nsnull);
      current = next;
    }
  }
  // Now invalidate the child count and pointers to other accessibles
  InvalidateChildren();
  if (mParent) {
    nsCOMPtr<nsPIAccessible> privateParent(do_QueryInterface(mParent));
    privateParent->InvalidateChildren();
    mParent = nsnull;
  }

  return nsAccessNodeWrap::Shutdown();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 72 of file nsAccessNodeWrap.cpp.

{
  nsAccessNode::ShutdownXPAccessibility();

  // Shutdown accessibility for ATK
  nsAppRootAccessible::Unload();
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void nsAccessNodeWrap::ShutdownAccessibility ( ) [static, inherited]
static void nsAccessNodeWrap::ShutdownAccessibility ( ) [static, inherited]
static void nsAccessNodeWrap::ShutdownAccessibility ( ) [static, inherited]

Definition at line 200 of file nsAccessNode.cpp.

{
  // Called by nsAccessibilityService::Shutdown()
  // which happens when xpcom is shutting down
  // at exit of program

  if (!gIsAccessibilityActive) {
    return;
  }
  NS_IF_RELEASE(gStringBundle);
  NS_IF_RELEASE(gKeyStringBundle);
  NS_IF_RELEASE(gDoCommandTimer);
  NS_IF_RELEASE(gLastFocusedNode);

  ClearCache(gGlobalDocAccessibleCache);

  gIsAccessibilityActive = PR_FALSE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsIAccessible::takeFocus ( ) [inherited]

Focus this accessible node, The state STATE_FOCUSABLE indicates whether this node is normally focusable.

It is the callers responsibility to determine whether this node is focusable. accTakeFocus on a node that is not normally focusable (such as a table), will still set focus on that node, although normally that will not be visually indicated in most style sheets.

Select this accessible node only.


Member Data Documentation

The nsIAccessibleDocument that this nsIAccessNode resides in.

Definition at line 109 of file nsIAccessNode.idl.

Number of accessible children.

Definition at line 86 of file nsIAccessible.idl.

readonly attribute AString nsIAccessible::description [inherited]

Accessible description -- long text associated with this node.

Definition at line 108 of file nsIAccessible.idl.

The DOM node this nsIAccessNode is associated with.

Definition at line 64 of file nsIAccessNode.idl.

const unsigned long nsIAccessible::EXT_STATE_ACTIVE = 0x00400000 [inherited]

Definition at line 301 of file nsIAccessible.idl.

const unsigned long nsIAccessible::EXT_STATE_EDITABLE = 0x00200000 [inherited]

Extended state flags (for now non-MSAA, for Java and Gnome/ATK support) "Extended state flags" has seperate value space from "MSAA State flags".

Definition at line 300 of file nsIAccessible.idl.

const unsigned long nsIAccessible::EXT_STATE_EXPANDABLE = 0x00800000 [inherited]

Definition at line 302 of file nsIAccessible.idl.

const unsigned long nsIAccessible::EXT_STATE_MODAL = 0x01000000 [inherited]

Definition at line 303 of file nsIAccessible.idl.

const unsigned long nsIAccessible::EXT_STATE_MULTI_LINE = 0x02000000 [inherited]

Definition at line 304 of file nsIAccessible.idl.

const unsigned long nsIAccessible::EXT_STATE_SENSITIVE = 0x04000000 [inherited]

Definition at line 305 of file nsIAccessible.idl.

const unsigned long nsIAccessible::EXT_STATE_SHOWING = 0x10000000 [inherited]

Definition at line 306 of file nsIAccessible.idl.

const unsigned long nsIAccessible::EXT_STATE_SINGLE_LINE = 0x20000000 [inherited]

Definition at line 307 of file nsIAccessible.idl.

const unsigned long nsIAccessible::EXT_STATE_TRANSIENT = 0x40000000 [inherited]

Definition at line 308 of file nsIAccessible.idl.

const unsigned long nsIAccessible::EXT_STATE_VERTICAL = 0x80000000 [inherited]

Definition at line 309 of file nsIAccessible.idl.

readonly attribute unsigned long nsIAccessible::extState [inherited]

Extended accessible states -- second bit field describing node.

Definition at line 148 of file nsIAccessible.idl.

readonly attribute unsigned long nsIAccessible::finalRole [inherited]

Enumerated accessible role.

The values depend on platform because of variations. See the ROLE_* constants defined later in this file. Widgets can use role attribute to force the final role

Definition at line 136 of file nsIAccessible.idl.

readonly attribute unsigned long nsIAccessible::finalState [inherited]

Accessible states -- bit field which describes boolean properties of node.

See the STATE_* constants defined later in this file. Many states are only valid given a certain role attribute that supports them

Definition at line 143 of file nsIAccessible.idl.

readonly attribute AString nsIAccessible::finalValue [inherited]

Accessible value -- a number or a secondary text equivalent for this node Widgets that use a role attribute can force a value using the valuenow attribute.

Definition at line 103 of file nsIAccessible.idl.

First child in accessible tree.

Definition at line 76 of file nsIAccessible.idl.

The first nsIAccessNode child.

Definition at line 88 of file nsIAccessNode.idl.

Focused accessible child of node.

Definition at line 158 of file nsIAccessible.idl.

nsITimer * nsAccessNode::gDoCommandTimer = 0 [static, protected, inherited]

Definition at line 164 of file nsAccessNode.h.

Definition at line 168 of file nsAccessNode.h.

PRBool nsAccessNode::gIsAccessibilityActive = PR_FALSE [static, protected, inherited]

Definition at line 165 of file nsAccessNode.h.

PRBool nsAccessNode::gIsCacheDisabled = PR_FALSE [static, protected, inherited]

Definition at line 166 of file nsAccessNode.h.

PRBool nsAccessNodeWrap::gIsEnumVariantSupportDisabled = 0 [static, protected, inherited]

Definition at line 141 of file nsAccessNodeWrap.h.

nsIStringBundle * nsAccessNode::gKeyStringBundle = 0 [static, protected, inherited]

Definition at line 163 of file nsAccessNode.h.

nsIDOMNode * nsAccessNode::gLastFocusedNode = 0 [static, inherited]

Definition at line 143 of file nsAccessNode.h.

LPFNACCESSIBLEOBJECTFROMWINDOW nsAccessNodeWrap::gmAccessibleObjectFromWindow = nsnull [static, inherited]

Definition at line 132 of file nsAccessNodeWrap.h.

the accessible library and cached methods

Definition at line 130 of file nsAccessNodeWrap.h.

Definition at line 134 of file nsAccessNodeWrap.h.

Definition at line 133 of file nsAccessNodeWrap.h.

Definition at line 131 of file nsAccessNodeWrap.h.

nsIStringBundle * nsAccessNode::gStringBundle = 0 [static, protected, inherited]

Definition at line 162 of file nsAccessNode.h.

Initial value:
 {
  {"disabled", BOOL_STATE, STATE_UNAVAILABLE},
  {"required", BOOL_STATE, STATE_REQUIRED},
  {"invalid", BOOL_STATE, STATE_INVALID}
}

Definition at line 205 of file nsAccessible.h.

Definition at line 204 of file nsAccessible.h.

readonly attribute AString nsIAccessible::help [inherited]

Help text associated with node.

Definition at line 153 of file nsIAccessible.idl.

The 0-based index of this accessible in its parent's list of children, or -1 if this accessible does not have a parent.

Definition at line 92 of file nsIAccessible.idl.

readonly attribute DOMString nsIAccessNode::innerHTML [inherited]

The innerHTML for the DOM node This is a text string of all the markup inside the DOM node, not including the start and end tag for the node.

Definition at line 116 of file nsIAccessNode.idl.

readonly attribute AString nsIAccessible::keyBinding [inherited]

Provides localized string of global keyboard accelerator, such as Ctrl+O for Open file.

Definition at line 121 of file nsIAccessible.idl.

readonly attribute AString nsIAccessible::keyboardShortcut [inherited]

Provides localized string of accesskey name, such as Alt+D.

The modifier may be affected by user and platform preferences. Usually alt+letter, or just the letter alone for menu items.

Definition at line 115 of file nsIAccessible.idl.

Last child in accessible tree.

Definition at line 81 of file nsIAccessible.idl.

The last nsIAccessNode child.

Definition at line 93 of file nsIAccessNode.idl.

Definition at line 202 of file nsAccessible.h.

nsCOMPtr<nsIDOMNode> nsAccessNode::mDOMNode [protected, inherited]

Definition at line 151 of file nsAccessNode.h.

Definition at line 200 of file nsAccessible.h.

Definition at line 200 of file nsAccessible.h.

Definition at line 199 of file nsAccessible.h.

PRInt32 nsAccessNode::mRefCnt [protected, inherited]

Definition at line 154 of file nsAccessNode.h.

Definition at line 201 of file nsAccessible.h.

Definition at line 152 of file nsAccessNode.h.

attribute AString nsIAccessible::name [inherited]

Accessible name -- the main text equivalent for this node.

Definition at line 97 of file nsIAccessible.idl.

Next sibling in accessible tree.

Definition at line 66 of file nsIAccessible.idl.

The next nsIAccessNode sibling.

Definition at line 103 of file nsIAccessNode.idl.

const unsigned short ISimpleDOMNode::NODETYPE_ATTRIBUTE = 2 [inherited]

Definition at line 148 of file ISimpleDOMNode.idl.

const unsigned short ISimpleDOMNode::NODETYPE_CDATA_SECTION = 4 [inherited]

Definition at line 150 of file ISimpleDOMNode.idl.

const unsigned short ISimpleDOMNode::NODETYPE_COMMENT = 8 [inherited]

Definition at line 154 of file ISimpleDOMNode.idl.

const unsigned short ISimpleDOMNode::NODETYPE_DOCUMENT = 9 [inherited]

Definition at line 155 of file ISimpleDOMNode.idl.

const unsigned short ISimpleDOMNode::NODETYPE_DOCUMENT_FRAGMENT = 11 [inherited]

Definition at line 157 of file ISimpleDOMNode.idl.

const unsigned short ISimpleDOMNode::NODETYPE_DOCUMENT_TYPE = 10 [inherited]

Definition at line 156 of file ISimpleDOMNode.idl.

const unsigned short ISimpleDOMNode::NODETYPE_ELEMENT = 1 [inherited]

Definition at line 147 of file ISimpleDOMNode.idl.

const unsigned short ISimpleDOMNode::NODETYPE_ENTITY = 6 [inherited]

Definition at line 152 of file ISimpleDOMNode.idl.

const unsigned short ISimpleDOMNode::NODETYPE_ENTITY_REFERENCE = 5 [inherited]

Definition at line 151 of file ISimpleDOMNode.idl.

const unsigned short ISimpleDOMNode::NODETYPE_NOTATION = 12 [inherited]

Definition at line 158 of file ISimpleDOMNode.idl.

Definition at line 153 of file ISimpleDOMNode.idl.

const unsigned short ISimpleDOMNode::NODETYPE_TEXT = 3 [inherited]

Definition at line 149 of file ISimpleDOMNode.idl.

The number of accessible actions associated with this accessible.

Definition at line 234 of file nsIAccessible.idl.

The number of DOM children for the DOM node, which matches the number of nsIAccessNode children for this nsIAccessNode.

Definition at line 71 of file nsIAccessNode.idl.

readonly attribute voidPtr nsIAccessNode::ownerWindow [inherited]

The OS window handle for the window this node is being displayed in.

Definition at line 122 of file nsIAccessNode.idl.

Parent node in accessible tree.

Definition at line 61 of file nsIAccessible.idl.

The parent nsIAccessNode.

Definition at line 83 of file nsIAccessNode.idl.

Previous sibling in accessible tree.

Definition at line 71 of file nsIAccessible.idl.

The previous nsIAccessNode sibling.

Definition at line 98 of file nsIAccessNode.idl.

const unsigned long nsIAccessible::RELATION_CONTROLLED_BY = 0x01 [inherited]

Definition at line 340 of file nsIAccessible.idl.

const unsigned long nsIAccessible::RELATION_CONTROLLER_FOR = 0x02 [inherited]

Definition at line 341 of file nsIAccessible.idl.

const unsigned long nsIAccessible::RELATION_DEFAULT_BUTTON = 0x4000 [inherited]

Definition at line 353 of file nsIAccessible.idl.

const unsigned long nsIAccessible::RELATION_DESCRIBED_BY = 0x4001 [inherited]

Definition at line 354 of file nsIAccessible.idl.

const unsigned long nsIAccessible::RELATION_DESCRIPTION_FOR = 0x4002 [inherited]

Definition at line 355 of file nsIAccessible.idl.

const unsigned long nsIAccessible::RELATION_EMBEDDED_BY = 0x0b [inherited]

Definition at line 350 of file nsIAccessible.idl.

const unsigned long nsIAccessible::RELATION_EMBEDS = 0x0a [inherited]

Definition at line 349 of file nsIAccessible.idl.

const unsigned long nsIAccessible::RELATION_FLOWS_FROM = 0x08 [inherited]

Definition at line 347 of file nsIAccessible.idl.

const unsigned long nsIAccessible::RELATION_FLOWS_TO = 0x07 [inherited]

Definition at line 346 of file nsIAccessible.idl.

const unsigned long nsIAccessible::RELATION_LABEL_FOR = 0x03 [inherited]

Definition at line 342 of file nsIAccessible.idl.

const unsigned long nsIAccessible::RELATION_LABELLED_BY = 0x04 [inherited]

Definition at line 343 of file nsIAccessible.idl.

const unsigned long nsIAccessible::RELATION_MEMBER_OF = 0x05 [inherited]

Definition at line 344 of file nsIAccessible.idl.

const unsigned long nsIAccessible::RELATION_NODE_CHILD_OF = 0x06 [inherited]

Definition at line 345 of file nsIAccessible.idl.

const unsigned long nsIAccessible::RELATION_NUL = 0x00 [inherited]

Relation Types -- most of these come from ATK's atkrelationtype.h RELATION_NULL: RELATION_CONTROLLED_BY: Controlled by one or more target objects.

RELATION_CONTROLLER_FOR: Controller for one or more target objects. RELATION_LABEL_FOR: Label for one or more target objects. RELATION_LABELLED_BY: Labelled by one or more target objects. RELATION_MEMBER_OF: Member of a group of one or more target objects. RELATION_NODE_CHILD_OF: Cell in a treetable which is displayed because a cell in the same col is expanded & identifies it. RELATION_FLOWS_TO: Has content that flows logically to another object in a sequential way, e.g. text flow. RELATION_FLOWS_FROM: Has content that flows logically from another object in a sequential way, e.g. text flow. RELATION_SUBWINDOW_OF: Subwindow attached to a component but otherwise not connected in the UI hierarchy to that component. RELATION_EMBEDS: Visually embeds another object's content, i.e. this object's content flows around another's content. RELATION_EMBEDDED_BY: Inverse of RELATION_EMBEDS; this object's content is visually embedded in another object. RELATION_POPUP_FOR: Popup for another object. RELATION_PARENT_WINDOW_OF: Parent window of another object. RELATION_DEFAULT_BUTTON: Part of a form/dialog with a related default button. RELATION_DESCRIBED_BY: Described by one or more target objects. RELATION_DESCRIPTION_FOR: Description for one or more target objects. RELATION_LAST_DEFINED:

Definition at line 339 of file nsIAccessible.idl.

Definition at line 352 of file nsIAccessible.idl.

const unsigned long nsIAccessible::RELATION_POPUP_FOR = 0x0c [inherited]

Definition at line 351 of file nsIAccessible.idl.

const unsigned long nsIAccessible::RELATION_SUBWINDOW_OF = 0x09 [inherited]

Definition at line 348 of file nsIAccessible.idl.

readonly attribute unsigned long nsIAccessible::role [inherited]

Natural enumerated accessible role for the associated element.

The values depend on platform because of variations. See the ROLE_* constants defined later in this file. This does not take into account role attribute as the finalRole does.

Definition at line 129 of file nsIAccessible.idl.

Returns the number of accessible children currently selected.

Definition at line 66 of file nsIAccessibleSelectable.idl.

const unsigned long nsIAccessible::STATE_ALERT_HIGH = 0x10000000 [inherited]

Definition at line 284 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_ALERT_LOW = 0x04000000 [inherited]

Definition at line 282 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_ALERT_MEDIUM = 0x08000000 [inherited]

Definition at line 283 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_ANIMATED = 0x00004000 [inherited]

Definition at line 270 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_BUSY = 0x00000800 [inherited]

Definition at line 267 of file nsIAccessible.idl.

Definition at line 294 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_CHECKED = 0x00000010 [inherited]

Definition at line 260 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_COLLAPSED = 0x00000400 [inherited]

Definition at line 266 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_DEFAULT = 0x00000100 [inherited]

Definition at line 264 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_EXPANDED = 0x00000200 [inherited]

Definition at line 265 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_EXTSELECTABLE = 0x02000000 [inherited]

Definition at line 281 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_FLOATING = 0x00001000 [inherited]

Definition at line 268 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_FOCUSABLE = 0x00100000 [inherited]

Definition at line 276 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_FOCUSED = 0x00000004 [inherited]

Definition at line 258 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_HASPOPUP = 0x40000000 [inherited]

Definition at line 286 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_HOTTRACKED = 0x00000080 [inherited]

Definition at line 263 of file nsIAccessible.idl.

Definition at line 292 of file nsIAccessible.idl.

Definition at line 293 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_INVISIBLE = 0x00008000 [inherited]

Definition at line 271 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_LINKED = 0x00400000 [inherited]

Definition at line 278 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_MARQUEED = 0x00002000 [inherited]

Definition at line 269 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_MIXED = 0x00000020 [inherited]

Definition at line 261 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_MOVEABLE = 0x00040000 [inherited]

Definition at line 274 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_MULTISELECTABLE = 0x01000000 [inherited]

Definition at line 280 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_OFFSCREEN = 0x00010000 [inherited]

Definition at line 272 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_PRESSED = 0x00000008 [inherited]

Definition at line 259 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_PROTECTED = 0x20000000 [inherited]

Definition at line 285 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_READONLY = 0x00000040 [inherited]

Definition at line 262 of file nsIAccessible.idl.

Definition at line 291 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_SELECTABLE = 0x00200000 [inherited]

Definition at line 277 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_SELECTED = 0x00000002 [inherited]

Definition at line 257 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_SELFVOICING = 0x00080000 [inherited]

Definition at line 275 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_SIZEABLE = 0x00020000 [inherited]

Definition at line 273 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_TRAVERSED = 0x00800000 [inherited]

Definition at line 279 of file nsIAccessible.idl.

const unsigned long nsIAccessible::STATE_UNAVAILABLE = 0x00000001 [inherited]

MSAA State flags - used for bitfield.

More than 1 allowed.

Definition at line 256 of file nsIAccessible.idl.

readonly attribute voidPtr nsIAccessNode::uniqueID [inherited]

A unique ID calculated for this DOM node, for the purposes of caching and referencing this object.

Definition at line 128 of file nsIAccessNode.idl.


Property Documentation

short ISimpleDOMNode::attributes([in] short maxAttribs, [out, size_is(maxAttribs), length_is(*numAttribs)] BSTR attribNames, [out, size_is(maxAttribs), length_is(*numAttribs)] short nameSpaceID, [out, size_is(maxAttribs), length_is(*numAttribs)] BSTR attribValues) [get, inherited]
BSTR ISimpleDOMNode::attributesForNames([in] short numAttribs, [in, size_is(numAttribs), length_is(numAttribs)] BSTR attribNames, [in, size_is(numAttribs), length_is(numAttribs)] short nameSpaceID) [get, inherited]
ISimpleDOMNode ISimpleDOMNode::childAt([in] unsigned childIndex) [get, inherited]
short ISimpleDOMNode::computedStyle([in] short maxStyleProperties, [in] boolean useAlternateView, [out, size_is(maxStyleProperties), length_is(*numStyleProperties)] BSTR styleProperties, [out, size_is(maxStyleProperties), length_is(*numStyleProperties)] BSTR styleValues) [get, inherited]
BSTR ISimpleDOMNode::computedStyleForProperties([in] short numStyleProperties, [in] boolean useAlternateView, [in, size_is(numStyleProperties), length_is(numStyleProperties)] BSTR styleProperties) [get, inherited]
BSTR ISimpleDOMNode::innerHTML [get, inherited]
BSTR ISimpleDOMNode::language [get, inherited]
short ISimpleDOMNode::nodeInfo([out] BSTR nodeName, [out] short nameSpaceID, [out] BSTR nodeValue, [out] int numChildren, [out] int uniqueID) [get, inherited]

The documentation for this class was generated from the following files: