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
nsHTMLComboboxButtonAccessible Class Reference

A class that represents the button inside the Select to the right of the text field. More...

#include <nsHTMLSelectAccessible.h>

Inheritance diagram for nsHTMLComboboxButtonAccessible:
Inheritance graph
[legend]
Collaboration diagram for nsHTMLComboboxButtonAccessible:
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

 nsHTMLComboboxButtonAccessible (nsIAccessible *aParent, nsIDOMNode *aDOMNode, nsIWeakReference *aShell)
 -----ComboboxButtonAccessible -----
virtual ~nsHTMLComboboxButtonAccessible ()
NS_IMETHOD DoAction (PRUint8 index)
 Programmaticaly click on the button, causing either the display or the hiding of the drop down box ( window ).
NS_IMETHOD GetNumActions (PRUint8 *_retval)
 Just one action ( click ).
NS_IMETHOD GetActionName (PRUint8 index, nsAString &_retval)
 Our action name is the reverse of our state: if we are closed -> open is our name.
NS_IMETHOD GetParent (nsIAccessible **_retval)
 Return our cached parent.
NS_IMETHOD GetNextSibling (nsIAccessible **_retval)
 Our next sibling is an nsHTMLComboboxListAccessible object.
NS_IMETHOD GetPreviousSibling (nsIAccessible **_retval)
 Our prev sibling is an nsHTMLComboboxTextFieldAccessible object.
NS_IMETHOD GetName (nsAString &_retval)
 Gets the name from GetActionName()
NS_IMETHOD GetRole (PRUint32 *_retval)
 We are a button.
NS_IMETHOD GetState (PRUint32 *_retval)
 As a nsHTMLComboboxButtonAccessible we can have the following states: STATE_PRESSED STATE_FOCUSED STATE_FOCUSABLE.
NS_IMETHOD GetUniqueID (void **aUniqueID)
virtual void GetBoundsRect (nsRect &aBounds, nsIFrame **aBoundingFrame)
 Gets the bounds for the gfxButtonControlFrame.
NS_DECL_ISUPPORTS_INHERITED
NS_IMETHOD 
GetFirstChild (nsIAccessible **_retval)
NS_IMETHOD GetLastChild (nsIAccessible **_retval)
NS_IMETHOD GetChildCount (PRInt32 *_retval)
NS_IMETHOD GetNativeInterface (void **aOutAccessible)
NS_IMETHOD GetNativeInterface (void **aOutAccessible)
NS_IMETHOD GetExtState (PRUint32 *aState)
AtkObject * GetAtkObject (void)
MaiInterfaceGetMaiInterface (PRInt16 aIfaceType)
PRBool IsValidObject ()
 STDMETHODIMP_ (ULONG) AddRef()
 STDMETHODIMP_ (ULONG) Release()
STDMETHODIMP QueryInterface (REFIID, void **)
NS_IMETHOD QueryInterface (REFNSIID aIID, void **aInstancePtr)
virtual long QueryInterface ()=0
STDMETHODIMP QueryService (REFGUID guidService, REFIID riid, void **ppv)
CLSID GetClassID () const
virtual HRESULT STDMETHODCALLTYPE get_accParent (IDispatch __RPC_FAR *__RPC_FAR *ppdispParent)
virtual HRESULT STDMETHODCALLTYPE get_accChildCount (long __RPC_FAR *pcountChildren)
virtual HRESULT STDMETHODCALLTYPE get_accChild (VARIANT varChild, IDispatch __RPC_FAR *__RPC_FAR *ppdispChild)
virtual HRESULT STDMETHODCALLTYPE get_accName (VARIANT varChild, BSTR __RPC_FAR *pszName)
virtual HRESULT STDMETHODCALLTYPE get_accValue (VARIANT varChild, BSTR __RPC_FAR *pszValue)
virtual HRESULT STDMETHODCALLTYPE get_accDescription (VARIANT varChild, BSTR __RPC_FAR *pszDescription)
virtual HRESULT STDMETHODCALLTYPE get_accRole (VARIANT varChild, VARIANT __RPC_FAR *pvarRole)
virtual HRESULT STDMETHODCALLTYPE get_accState (VARIANT varChild, VARIANT __RPC_FAR *pvarState)
virtual HRESULT STDMETHODCALLTYPE get_accHelp (VARIANT varChild, BSTR __RPC_FAR *pszHelp)
virtual HRESULT STDMETHODCALLTYPE get_accHelpTopic (BSTR __RPC_FAR *pszHelpFile, VARIANT varChild, long __RPC_FAR *pidTopic)
virtual HRESULT STDMETHODCALLTYPE get_accKeyboardShortcut (VARIANT varChild, BSTR __RPC_FAR *pszKeyboardShortcut)
virtual HRESULT STDMETHODCALLTYPE get_accFocus (VARIANT __RPC_FAR *pvarChild)
virtual HRESULT STDMETHODCALLTYPE get_accSelection (VARIANT __RPC_FAR *pvarChildren)
 This method is called when a client wants to know which children of a node are selected.
virtual HRESULT STDMETHODCALLTYPE get_accDefaultAction (VARIANT varChild, BSTR __RPC_FAR *pszDefaultAction)
virtual HRESULT STDMETHODCALLTYPE accSelect (long flagsSelect, VARIANT varChild)
virtual HRESULT STDMETHODCALLTYPE accLocation (long __RPC_FAR *pxLeft, long __RPC_FAR *pyTop, long __RPC_FAR *pcxWidth, long __RPC_FAR *pcyHeight, VARIANT varChild)
virtual HRESULT STDMETHODCALLTYPE accNavigate (long navDir, VARIANT varStart, VARIANT __RPC_FAR *pvarEndUpAt)
virtual HRESULT STDMETHODCALLTYPE accHitTest (long xLeft, long yTop, VARIANT __RPC_FAR *pvarChild)
virtual HRESULT STDMETHODCALLTYPE accDoDefaultAction (VARIANT varChild)
virtual HRESULT STDMETHODCALLTYPE put_accName (VARIANT varChild, BSTR szName)
virtual HRESULT STDMETHODCALLTYPE put_accValue (VARIANT varChild, BSTR szValue)
virtual HRESULT STDMETHODCALLTYPE Next (ULONG celt, VARIANT __RPC_FAR *rgVar, ULONG __RPC_FAR *pCeltFetched)
virtual HRESULT STDMETHODCALLTYPE Skip (ULONG celt)
virtual HRESULT STDMETHODCALLTYPE Reset (void)
virtual HRESULT STDMETHODCALLTYPE Clone (IEnumVARIANT __RPC_FAR *__RPC_FAR *ppEnum)
STDMETHODIMP GetTypeInfoCount (UINT *p)
STDMETHODIMP GetTypeInfo (UINT i, LCID lcid, ITypeInfo **ppti)
STDMETHODIMP GetIDsOfNames (REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
STDMETHODIMP Invoke (DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
virtual void GetXPAccessibleFor (const VARIANT &aVarChild, nsIAccessible **aXPAccessible)
NS_IMETHOD GetDescription (nsAString &aDescription)
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLE
NS_DECL_NSPIACCESSIBLE
NS_DECL_NSIACCESSIBLESELECTABLE
NS_IMETHOD 
Init ()
NS_IMETHOD Shutdown ()
NS_IMETHOD GetValue (nsAString &aValue)
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 void TranslateStates (PRUint32 aState, PRUint32 aExtState, void *aAtkStateSet)
static STDMETHODIMP AccessibleObjectFromWindow (HWND hwnd, DWORD dwObjectID, REFIID riid, void **ppvObject)
static STDMETHODIMP NotifyWinEvent (DWORD event, HWND hwnd, LONG idObjectType, LONG idObject)
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 firstChild
 First child in accessible tree.
readonly attribute nsIAccessible lastChild
 Last child in accessible tree.
readonly attribute nsIAccessible previousSibling
 Previous sibling in accessible tree.
readonly attribute nsIAccessible nextSibling
 Next sibling in accessible tree.
readonly attribute nsIAccessible parent
 Parent node 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

IDispatchNativeAccessible (nsIAccessible *aXPAccessible)
PRBool MappedAttrState (nsIContent *aContent, PRUint32 *aStateInOut, nsStateMapEntry *aStateMapEntry)
virtual nsIFrameGetBoundsFrame ()
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

AtkObject * mMaiAtkObject
PRUint16 mEnumVARIANTPosition
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

A class that represents the button inside the Select to the right of the text field.

Definition at line 247 of file nsHTMLSelectAccessible.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 [inherited]
Enumerator:
eAction_Switch 
eAction_Jump 
eAction_Click 
eAction_Select 
eAction_Expand 

Definition at line 121 of file nsAccessible.h.

anonymous enum [inherited]
Enumerator:
eNo_Action 
eSingle_Action 
eDouble_Action 

Definition at line 123 of file nsAccessible.h.


Constructor & Destructor Documentation

-----ComboboxButtonAccessible -----

Constructor -- cache our parent

Definition at line 1112 of file nsHTMLSelectAccessible.cpp.

                                                                                    :
nsLeafAccessible(aDOMNode, aShell)
{
  // There is no cache entry for this item. 
  // It's generated and ref'd by  nsHTMLComboboxAccessible
  SetParent(aParent);
}

Definition at line 252 of file nsHTMLSelectAccessible.h.

{}

Member Function Documentation

STDMETHODIMP nsAccessibleWrap::accDoDefaultAction ( VARIANT  varChild) [virtual, inherited]

Definition at line 837 of file nsAccessibleWrap.cpp.

{
  nsCOMPtr<nsIAccessible> xpAccessible;
  GetXPAccessibleFor(varChild, getter_AddRefs(xpAccessible));

  if (!xpAccessible || FAILED(xpAccessible->DoAction(0))) {
    return E_FAIL;
  }
  return S_OK;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessibleWrap::AccessibleObjectFromWindow ( HWND  hwnd,
DWORD  dwObjectID,
REFIID  riid,
void **  ppvObject 
) [static, inherited]

Definition at line 138 of file nsAccessibleWrap.cpp.

{
  // open the dll dynamically
  if (!gmAccLib) 
    gmAccLib =::LoadLibrary("OLEACC.DLL");  

  if (gmAccLib) {
    if (!gmAccessibleObjectFromWindow)
      gmAccessibleObjectFromWindow = (LPFNACCESSIBLEOBJECTFROMWINDOW)GetProcAddress(gmAccLib,"AccessibleObjectFromWindow");

    if (gmAccessibleObjectFromWindow)
      return gmAccessibleObjectFromWindow(hwnd, dwObjectID, riid, ppvObject);
  }

  return E_FAIL;
}

Here is the caller graph for this function:

STDMETHODIMP nsAccessibleWrap::accHitTest ( long  xLeft,
long  yTop,
VARIANT __RPC_FAR *  pvarChild 
) [virtual, inherited]

Definition at line 794 of file nsAccessibleWrap.cpp.

{
  VariantInit(pvarChild);

  // convert to window coords
  nsCOMPtr<nsIAccessible> xpAccessible;

  xLeft = xLeft;
  yTop = yTop;

  GetChildAtPoint(xLeft, yTop, getter_AddRefs(xpAccessible));

  // if we got a child
  if (xpAccessible) {
    // if the child is us
    if (xpAccessible == NS_STATIC_CAST(nsIAccessible*, this)) {
      pvarChild->vt = VT_I4;
      pvarChild->lVal = CHILDID_SELF;
    } else { // its not create an Accessible for it.
      pvarChild->vt = VT_DISPATCH;
      pvarChild->pdispVal = NativeAccessible(xpAccessible);
      nsCOMPtr<nsIAccessNode> accessNode(do_QueryInterface(xpAccessible));
      NS_ASSERTION(accessNode, "Unable to QI to nsIAccessNode");
      nsCOMPtr<nsIDOMNode> domNode;
      accessNode->GetDOMNode(getter_AddRefs(domNode));
      if (!domNode) {
        // Has already been shut down
        pvarChild->vt = VT_EMPTY;
        return E_FAIL;
      }
    }
  } else {
    // no child at that point
    pvarChild->vt = VT_EMPTY;
    return E_FAIL;
  }

  return S_OK;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessibleWrap::accLocation ( long __RPC_FAR *  pxLeft,
long __RPC_FAR *  pyTop,
long __RPC_FAR *  pcxWidth,
long __RPC_FAR *  pcyHeight,
VARIANT  varChild 
) [virtual, inherited]

Definition at line 694 of file nsAccessibleWrap.cpp.

{
  nsCOMPtr<nsIAccessible> xpAccessible;
  GetXPAccessibleFor(varChild, getter_AddRefs(xpAccessible));

  if (xpAccessible) {
    PRInt32 x, y, width, height;
    if (NS_FAILED(xpAccessible->GetBounds(&x, &y, &width, &height)))
      return E_FAIL;

    *pxLeft = x;
    *pyTop = y;
    *pcxWidth = width;
    *pcyHeight = height;
    return S_OK;
  }

  return E_FAIL;  
}

Here is the call graph for this function:

STDMETHODIMP nsAccessibleWrap::accNavigate ( long  navDir,
VARIANT  varStart,
VARIANT __RPC_FAR *  pvarEndUpAt 
) [virtual, inherited]

Definition at line 719 of file nsAccessibleWrap.cpp.

{
  nsCOMPtr<nsIAccessible> xpAccessibleStart, xpAccessibleResult;
  GetXPAccessibleFor(varStart, getter_AddRefs(xpAccessibleStart));
  if (!xpAccessibleStart)
    return E_FAIL;

  VariantInit(pvarEndUpAt);
  PRUint32 xpRelation = 0;

  switch(navDir) {
    case NAVDIR_DOWN: 
      xpAccessibleStart->GetAccessibleBelow(getter_AddRefs(xpAccessibleResult));
      break;
    case NAVDIR_FIRSTCHILD:
      xpAccessibleStart->GetFirstChild(getter_AddRefs(xpAccessibleResult));
      break;
    case NAVDIR_LASTCHILD:
      xpAccessibleStart->GetLastChild(getter_AddRefs(xpAccessibleResult));
      break;
    case NAVDIR_LEFT:
      xpAccessibleStart->GetAccessibleToLeft(getter_AddRefs(xpAccessibleResult));
      break;
    case NAVDIR_NEXT:
      xpAccessibleStart->GetNextSibling(getter_AddRefs(xpAccessibleResult));
      break;
    case NAVDIR_PREVIOUS:
      xpAccessibleStart->GetPreviousSibling(getter_AddRefs(xpAccessibleResult));
      break;
    case NAVDIR_RIGHT:
      xpAccessibleStart->GetAccessibleToRight(getter_AddRefs(xpAccessibleResult));
      break;
    case NAVDIR_UP:
      xpAccessibleStart->GetAccessibleAbove(getter_AddRefs(xpAccessibleResult));
      break;
    // MSAA relationship extensions to accNavigate
    case NAVRELATION_CONTROLLED_BY:    xpRelation = RELATION_CONTROLLED_BY;    break;
    case NAVRELATION_CONTROLLER_FOR:   xpRelation = RELATION_CONTROLLER_FOR;   break;
    case NAVRELATION_LABEL_FOR:        xpRelation = RELATION_LABEL_FOR;        break;
    case NAVRELATION_LABELLED_BY:      xpRelation = RELATION_LABELLED_BY;      break;
    case NAVRELATION_MEMBER_OF:        xpRelation = RELATION_MEMBER_OF;        break;
    case NAVRELATION_NODE_CHILD_OF:    xpRelation = RELATION_NODE_CHILD_OF;    break;
    case NAVRELATION_FLOWS_TO:         xpRelation = RELATION_FLOWS_TO;         break;
    case NAVRELATION_FLOWS_FROM:       xpRelation = RELATION_FLOWS_FROM;       break;
    case NAVRELATION_SUBWINDOW_OF:     xpRelation = RELATION_SUBWINDOW_OF;     break;
    case NAVRELATION_EMBEDS:           xpRelation = RELATION_EMBEDS;           break;
    case NAVRELATION_EMBEDDED_BY:      xpRelation = RELATION_EMBEDDED_BY;      break;
    case NAVRELATION_POPUP_FOR:        xpRelation = RELATION_POPUP_FOR;        break;
    case NAVRELATION_PARENT_WINDOW_OF: xpRelation = RELATION_PARENT_WINDOW_OF; break;
    case NAVRELATION_DEFAULT_BUTTON:   xpRelation = RELATION_DEFAULT_BUTTON;   break;
    case NAVRELATION_DESCRIBED_BY:     xpRelation = RELATION_DESCRIBED_BY;     break;
    case NAVRELATION_DESCRIPTION_FOR:  xpRelation = RELATION_DESCRIPTION_FOR;  break;
  }

  pvarEndUpAt->vt = VT_EMPTY;

  if (xpRelation) {
    nsresult rv = GetAccessibleRelated(xpRelation,
                                       getter_AddRefs(xpAccessibleResult));
    if (rv == NS_ERROR_NOT_IMPLEMENTED) {
      return E_NOTIMPL;
    }
  }

  if (xpAccessibleResult) {
    pvarEndUpAt->pdispVal = NativeAccessible(xpAccessibleResult);
    pvarEndUpAt->vt = VT_DISPATCH;
    return NS_OK;
  } 
  return E_FAIL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

STDMETHODIMP nsAccessibleWrap::accSelect ( long  flagsSelect,
VARIANT  varChild 
) [virtual, inherited]

Definition at line 669 of file nsAccessibleWrap.cpp.

{
  // currently only handle focus and selection
  nsCOMPtr<nsIAccessible> xpAccessible;
  GetXPAccessibleFor(varChild, getter_AddRefs(xpAccessible));

  if (flagsSelect & (SELFLAG_TAKEFOCUS|SELFLAG_TAKESELECTION|SELFLAG_REMOVESELECTION))
  {
    if (flagsSelect & SELFLAG_TAKEFOCUS)
      xpAccessible->TakeFocus();

    if (flagsSelect & SELFLAG_TAKESELECTION)
      xpAccessible->TakeSelection();

    if (flagsSelect & SELFLAG_REMOVESELECTION)
      xpAccessible->RemoveSelection();

    return S_OK;
  }

  return E_FAIL;
}

Here is the call graph for this function:

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, inherited]

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, inherited]

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, inherited]

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, inherited]

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, inherited]

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, inherited]

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.

STDMETHODIMP nsAccessibleWrap::Clone ( IEnumVARIANT __RPC_FAR *__RPC_FAR *  ppEnum) [virtual, inherited]

Definition at line 955 of file nsAccessibleWrap.cpp.

{
  // Clone could be bad, the cloned items aren't tracked for shutdown
  // Then again, as long as the client releases the items in time, we're okay
  *ppenum = nsnull;

  nsAccessibleWrap *accessibleWrap = new nsAccessibleWrap(mDOMNode, mWeakShell);
  if (!accessibleWrap)
    return E_FAIL;

  IAccessible *msaaAccessible = NS_STATIC_CAST(IAccessible*, accessibleWrap);
  msaaAccessible->AddRef();
  QueryInterface(IID_IEnumVARIANT, (void**)ppenum);
  if (*ppenum)
    (*ppenum)->Skip(mEnumVARIANTPosition); // QI addrefed
  msaaAccessible->Release();

  return NOERROR;
}

Here is the call graph for this function:

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

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

Programmaticaly click on the button, causing either the display or the hiding of the drop down box ( window ).

Walks the Frame tree and checks for proper frames.

Definition at line 1134 of file nsHTMLSelectAccessible.cpp.

{
  nsIFrame* frame = nsAccessible::GetBoundsFrame();
  nsPresContext *context = GetPresContext();
  if (!frame || !context)
    return NS_ERROR_FAILURE;

  frame = frame->GetFirstChild(nsnull)->GetNextSibling();

  // We only have one action, click. Any other index is meaningless(wrong)
  if (aIndex == eAction_Click) {
    nsCOMPtr<nsIDOMHTMLInputElement>
      element(do_QueryInterface(frame->GetContent()));
    if (element)
    {
       element->Click();
       return NS_OK;
    }
    return NS_ERROR_FAILURE;
  }
  return NS_ERROR_INVALID_ARG;
}

Here is the call graph for this function:

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

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, inherited]

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 nsAccessibleWrap::get_accChild ( VARIANT  varChild,
IDispatch __RPC_FAR *__RPC_FAR *  ppdispChild 
) [virtual, inherited]

Reimplemented in nsDocAccessibleWrap.

Definition at line 237 of file nsAccessibleWrap.cpp.

{
  *ppdispChild = NULL;

  if (!mWeakShell || varChild.vt != VT_I4)
    return E_FAIL;

  if (varChild.lVal == CHILDID_SELF) {
    *ppdispChild = NS_STATIC_CAST(IDispatch*, this);
    AddRef();
    return S_OK;
  }

  nsCOMPtr<nsIAccessible> childAccessible;
  GetChildAt(varChild.lVal - 1, getter_AddRefs(childAccessible));
  if (childAccessible) {
    *ppdispChild = NativeAccessible(childAccessible);
  }

  return (*ppdispChild)? S_OK: E_FAIL;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessibleWrap::get_accChildCount ( long __RPC_FAR *  pcountChildren) [virtual, inherited]

Definition at line 228 of file nsAccessibleWrap.cpp.

{
  PRInt32 numChildren;
  GetChildCount(&numChildren);
  *pcountChildren = numChildren;

  return S_OK;
}
STDMETHODIMP nsAccessibleWrap::get_accDefaultAction ( VARIANT  varChild,
BSTR __RPC_FAR *  pszDefaultAction 
) [virtual, inherited]

Definition at line 651 of file nsAccessibleWrap.cpp.

{
  *pszDefaultAction = NULL;
  nsCOMPtr<nsIAccessible> xpAccessible;
  GetXPAccessibleFor(varChild, getter_AddRefs(xpAccessible));
  if (xpAccessible) {
    nsAutoString defaultAction;
    if (NS_FAILED(xpAccessible->GetActionName(0, defaultAction)))
      return S_FALSE;

    *pszDefaultAction = ::SysAllocString(defaultAction.get());
  }

  return S_OK;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessibleWrap::get_accDescription ( VARIANT  varChild,
BSTR __RPC_FAR *  pszDescription 
) [virtual, inherited]

Definition at line 402 of file nsAccessibleWrap.cpp.

{
  *pszDescription = NULL;
  nsCOMPtr<nsIAccessible> xpAccessible;
  GetXPAccessibleFor(varChild, getter_AddRefs(xpAccessible));
  if (xpAccessible) {
     nsAutoString description;
     if (NS_FAILED(xpAccessible->GetDescription(description)))
       return S_FALSE;

     *pszDescription = ::SysAllocString(description.get());
  }

  return S_OK;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessibleWrap::get_accFocus ( VARIANT __RPC_FAR *  pvarChild) [virtual, inherited]

Definition at line 538 of file nsAccessibleWrap.cpp.

{
  // VT_EMPTY:    None. This object does not have the keyboard focus itself
  //              and does not contain a child that has the keyboard focus.
  // VT_I4:       lVal is CHILDID_SELF. The object itself has the keyboard focus.
  // VT_I4:       lVal contains the child ID of the child element with the keyboard focus.
  // VT_DISPATCH: pdispVal member is the address of the IDispatch interface
  //              for the child object with the keyboard focus.

  if (!mDOMNode) {
    return E_FAIL; // This node is shut down
  }

  VariantInit(pvarChild);

  // Return the current IAccessible child that has focus
  nsCOMPtr<nsIAccessible> focusedAccessible;
  GetFocusedChild(getter_AddRefs(focusedAccessible));
  if (focusedAccessible == this) {
    pvarChild->vt = VT_I4;
    pvarChild->lVal = CHILDID_SELF;
  }
  else if (focusedAccessible) {
    pvarChild->vt = VT_DISPATCH;
    pvarChild->pdispVal = NativeAccessible(focusedAccessible);
  }
  else {
    pvarChild->vt = VT_EMPTY;   // No focus or focus is not a child
  }

  return S_OK;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessibleWrap::get_accHelp ( VARIANT  varChild,
BSTR __RPC_FAR *  pszHelp 
) [virtual, inherited]

Definition at line 501 of file nsAccessibleWrap.cpp.

{
  *pszHelp = NULL;
  return S_FALSE;
}
STDMETHODIMP nsAccessibleWrap::get_accHelpTopic ( BSTR __RPC_FAR *  pszHelpFile,
VARIANT  varChild,
long __RPC_FAR *  pidTopic 
) [virtual, inherited]

Definition at line 509 of file nsAccessibleWrap.cpp.

{
  *pszHelpFile = NULL;
  *pidTopic = 0;
  return E_NOTIMPL;
}
STDMETHODIMP nsAccessibleWrap::get_accKeyboardShortcut ( VARIANT  varChild,
BSTR __RPC_FAR *  pszKeyboardShortcut 
) [virtual, inherited]

Definition at line 519 of file nsAccessibleWrap.cpp.

{
  *pszKeyboardShortcut = NULL;
  nsCOMPtr<nsIAccessible> xpAccessible;
  GetXPAccessibleFor(varChild, getter_AddRefs(xpAccessible));
  if (xpAccessible) {
    nsAutoString shortcut;
    nsresult rv = xpAccessible->GetKeyboardShortcut(shortcut);
    if (NS_FAILED(rv))
      return S_FALSE;

    *pszKeyboardShortcut = ::SysAllocString(shortcut.get());
    return S_OK;
  }
  return S_FALSE;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessibleWrap::get_accName ( VARIANT  varChild,
BSTR __RPC_FAR *  pszName 
) [virtual, inherited]

Definition at line 261 of file nsAccessibleWrap.cpp.

{
  *pszName = NULL;
  nsCOMPtr<nsIAccessible> xpAccessible;
  GetXPAccessibleFor(varChild, getter_AddRefs(xpAccessible));
  if (xpAccessible) {
    nsAutoString name;
    if (NS_FAILED(xpAccessible->GetName(name)))
      return S_FALSE;
    if (!name.IsVoid()) {
      *pszName = ::SysAllocString(name.get());
    }
    NS_ASSERTION(mIsInitialized, "Access node was not initialized");
  }

  return S_OK;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessibleWrap::get_accParent ( IDispatch __RPC_FAR *__RPC_FAR *  ppdispParent) [virtual, inherited]

Definition at line 169 of file nsAccessibleWrap.cpp.

{
  *ppdispParent = NULL;
  if (!mWeakShell)
    return E_FAIL;  // We've been shut down

  nsIFrame *frame = GetFrame();
  HWND hwnd = 0;
  if (frame) {
    nsIView *view = frame->GetViewExternal();
    if (view) {
      // This code is essentially our implementation of WindowFromAccessibleObject,
      // because MSAA iterates get_accParent() until it sees an object of ROLE_WINDOW
      // to know where the window for a given accessible is. We must expose the native 
      // window accessible that MSAA creates for us. This must be done for the document
      // object as well as any layout that creates its own window (e.g. via overflow: scroll)
      nsIWidget *widget = view->GetWidget();
      if (widget) {
        hwnd = (HWND)widget->GetNativeData(NS_NATIVE_WINDOW);
        NS_ASSERTION(hwnd, "No window handle for window");
        nsIView *rootView;
        view->GetViewManager()->GetRootView(rootView);
        if (rootView == view) {
          // If the current object has a widget but was created by an
          // outer object with its own outer window, then
          // we want the native accessible for that outer window
          hwnd = ::GetParent(hwnd);
          NS_ASSERTION(hwnd, "No window handle for window");
        }
      }
      else {
        // If a frame is a scrollable frame, then it has one window for the client area,
        // not an extra parent window for just the scrollbars
        nsIScrollableFrame *scrollFrame = nsnull;
        CallQueryInterface(frame, &scrollFrame);
        if (scrollFrame) {
          hwnd = (HWND)scrollFrame->GetScrolledFrame()->GetWindow()->GetNativeData(NS_NATIVE_WINDOW);
          NS_ASSERTION(hwnd, "No window handle for window");
        }
      }
    }

    if (hwnd && SUCCEEDED(AccessibleObjectFromWindow(hwnd, OBJID_WINDOW, IID_IAccessible,
                                              (void**)ppdispParent))) {
      return S_OK;
    }
  }

  nsCOMPtr<nsIAccessible> xpParentAccessible;
  GetParent(getter_AddRefs(xpParentAccessible));
  NS_ASSERTION(xpParentAccessible, "No parent accessible where we're not direct child of window");
  if (!xpParentAccessible) {
    return E_UNEXPECTED;
  }
  *ppdispParent = NativeAccessible(xpParentAccessible);

  return S_OK;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessibleWrap::get_accRole ( VARIANT  varChild,
VARIANT __RPC_FAR *  pvarRole 
) [virtual, inherited]

Definition at line 420 of file nsAccessibleWrap.cpp.

{
  VariantInit(pvarRole);

  nsCOMPtr<nsIAccessible> xpAccessible;
  GetXPAccessibleFor(varChild, getter_AddRefs(xpAccessible));

  if (!xpAccessible)
    return E_FAIL;

  PRUint32 role = 0;
  if (NS_FAILED(xpAccessible->GetFinalRole(&role)))
    return E_FAIL;

  // -- Try enumerated role
  if (role != ROLE_NOTHING && role != ROLE_CLIENT) {
    pvarRole->vt = VT_I4;
    pvarRole->lVal = role;  // Normal enumerated role
    return S_OK;
  }

  // -- Try BSTR role
  // Could not map to known enumerated MSAA role like ROLE_BUTTON
  // Use BSTR role to expose role attribute or tag name + namespace
  nsCOMPtr<nsIDOMNode> domNode;
  nsCOMPtr<nsIAccessNode> accessNode(do_QueryInterface(xpAccessible));
  NS_ASSERTION(accessNode, "No accessnode for accessible");
  accessNode->GetDOMNode(getter_AddRefs(domNode));  
  nsIContent *content = GetRoleContent(domNode);
  NS_ASSERTION(content, "No content for accessible");
  if (content) {
    nsAutoString roleString;
    if (role != ROLE_CLIENT && GetRoleAttribute(content, roleString)) {
      content->GetAttr(kNameSpaceID_XHTML2_Unofficial, nsAccessibilityAtoms::role, roleString);
    }
    if (roleString.IsEmpty()) {
      nsINodeInfo *nodeInfo = content->GetNodeInfo();
      if (nodeInfo) {
        nodeInfo->GetName(roleString);
        nsAutoString nameSpaceURI;
        nodeInfo->GetNamespaceURI(nameSpaceURI);
        if (!nameSpaceURI.IsEmpty()) {
          // Only append name space if different from that of current document
          roleString += NS_LITERAL_STRING(", ") + nameSpaceURI;
        }
        if (!roleString.IsEmpty()) {
          pvarRole->vt = VT_BSTR;
          pvarRole->bstrVal = ::SysAllocString(roleString.get());
          return S_OK;
        }
      }
    }
  }
  return E_FAIL;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessibleWrap::get_accSelection ( VARIANT __RPC_FAR *  pvarChildren) [virtual, inherited]

This method is called when a client wants to know which children of a node are selected.

Currently we only handle this for HTML selects, which are the only nsIAccessible objects to implement nsIAccessibleSelectable.

The VARIANT return value arguement is expected to either contain a single IAccessible or an IEnumVARIANT of IAccessibles. We return the IEnumVARIANT regardless of the number of options selected, unless there are none selected in which case we return an empty VARIANT.

The typedefs at the beginning set up the structure that will contain an array of the IAccessibles. It implements the IEnumVARIANT interface, allowing us to use it to return the IAccessibles in the VARIANT.

We get the selected options from the select's accessible object and then put create IAccessible objects for them and put those in the CComObject<EnumeratorType> object. Then we put the CComObject<EnumeratorType> object in the VARIANT and return.

returns a VT_EMPTY VARIANT if:

  • there are no options in the select
  • none of the options are selected
  • there is an error QIing to IEnumVARIANT
  • The object is not the type that can have children selected

Definition at line 596 of file nsAccessibleWrap.cpp.

{
  typedef VARIANT                      ItemType;              /* type of the object to be stored in container */
  typedef ItemType                     EnumeratorExposedType; /* the type of the item exposed by the enumerator interface */
  typedef IEnumVARIANT                 EnumeratorInterface;   /* a COM enumerator ( IEnumXXXXX ) interface */
  typedef _Copy<EnumeratorExposedType> EnumeratorCopyPolicy;  /* Copy policy class */
  typedef CComEnum<EnumeratorInterface,
                   &__uuidof(EnumeratorInterface),
                   EnumeratorExposedType,
                   EnumeratorCopyPolicy > EnumeratorType;

  IEnumVARIANT* pUnk = NULL;
  CComObject<EnumeratorType>* pEnum = NULL;
  VariantInit(pvarChildren);
  pvarChildren->vt = VT_EMPTY;

  nsCOMPtr<nsIAccessibleSelectable> select;
  nsAccessNode::QueryInterface(NS_GET_IID(nsIAccessibleSelectable), getter_AddRefs(select));

  if (select) {  // do we have an nsIAccessibleSelectable?
    // we have an accessible that can have children selected
    nsCOMPtr<nsIArray> selectedOptions;
    // gets the selected options as nsIAccessibles.
    select->GetSelectedChildren(getter_AddRefs(selectedOptions));
    if (selectedOptions) { // false if the select has no children or none are selected
      PRUint32 length;
      selectedOptions->GetLength(&length);
      CComVariant* optionArray = new CComVariant[length]; // needs to be a CComVariant to go into the EnumeratorType object

      // 1) Populate an array to store in the enumeration
      for (PRUint32 i = 0 ; i < length ; i++) {
        nsCOMPtr<nsIAccessible> tempAccess;
        selectedOptions->QueryElementAt(i, NS_GET_IID(nsIAccessible), 
                                        getter_AddRefs(tempAccess));
        if (tempAccess) {
          optionArray[i] = NativeAccessible(tempAccess);
        }
      }

      // 2) Create and initialize the enumeration
      HRESULT hr = CComObject<EnumeratorType>::CreateInstance(&pEnum);
      pEnum->Init(&optionArray[0], &optionArray[length], NULL, AtlFlagCopy);
      pEnum->QueryInterface(IID_IEnumVARIANT, reinterpret_cast<void**>(&pUnk));
      delete [] optionArray; // clean up, the Init call copies the data (AtlFlagCopy)

      // 3) Put the enumerator in the VARIANT
      if (!pUnk)
        return NS_ERROR_FAILURE;
      pvarChildren->vt = VT_UNKNOWN;    // this must be VT_UNKNOWN for an IEnumVARIANT
      pvarChildren->punkVal = pUnk;
    }
  }
  return S_OK;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessibleWrap::get_accState ( VARIANT  varChild,
VARIANT __RPC_FAR *  pvarState 
) [virtual, inherited]

Definition at line 478 of file nsAccessibleWrap.cpp.

{
  VariantInit(pvarState);
  pvarState->vt = VT_I4;
  pvarState->lVal = 0;

  nsCOMPtr<nsIAccessible> xpAccessible;
  GetXPAccessibleFor(varChild, getter_AddRefs(xpAccessible));
  if (!xpAccessible)
    return E_FAIL;

  PRUint32 state;
  if (NS_FAILED(xpAccessible->GetFinalState(&state)))
    return E_FAIL;

  pvarState->lVal = state;

  return S_OK;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessibleWrap::get_accValue ( VARIANT  varChild,
BSTR __RPC_FAR *  pszValue 
) [virtual, inherited]

Definition at line 282 of file nsAccessibleWrap.cpp.

{
  *pszValue = NULL;
  nsCOMPtr<nsIAccessible> xpAccessible;
  GetXPAccessibleFor(varChild, getter_AddRefs(xpAccessible));
  if (xpAccessible) {
    nsAutoString value;
    if (NS_FAILED(xpAccessible->GetFinalValue(value)))
      return S_FALSE;

    *pszValue = ::SysAllocString(value.get());
  }

  return S_OK;
}

Here is the call graph for this function:

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.

Our action name is the reverse of our state: if we are closed -> open is our name.

if we are open -> closed is our name.

Uses the frame to get the state, updated on every click

Definition at line 1163 of file nsHTMLSelectAccessible.cpp.

{
  PRBool isOpen = PR_FALSE;
  nsIFrame *boundsFrame = GetBoundsFrame();
  nsIComboboxControlFrame* comboFrame;
  boundsFrame->QueryInterface(NS_GET_IID(nsIComboboxControlFrame), (void**)&comboFrame);
  if (!comboFrame)
    return NS_ERROR_FAILURE;
  comboFrame->IsDroppedDown(&isOpen);
  if (isOpen)
    nsAccessible::GetTranslatedString(NS_LITERAL_STRING("close"), _retval); 
  else
    nsAccessible::GetTranslatedString(NS_LITERAL_STRING("open"), _retval); 

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

AtkObject * nsAccessibleWrap::GetAtkObject ( void  ) [inherited]

Definition at line 251 of file nsAccessibleWrap.cpp.

{
    void *atkObj = nsnull;
    GetNativeInterface(&atkObj);
    return NS_STATIC_CAST(AtkObject *, atkObj);
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

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 nsHTMLComboboxButtonAccessible::GetBoundsRect ( nsRect aBounds,
nsIFrame **  aBoundingFrame 
) [virtual]

Gets the bounds for the gfxButtonControlFrame.

Walks the Frame tree and checks for proper frames.

Reimplemented from nsAccessible.

Definition at line 1191 of file nsHTMLSelectAccessible.cpp.

{
  // get our second child's frame
  // bounding frame is the ComboboxControlFrame
  nsIFrame *frame = nsAccessible::GetBoundsFrame();
  *aBoundingFrame = frame;
  nsPresContext *context = GetPresContext();
  if (!frame || !context)
    return;

  aBounds = frame->GetFirstChild(nsnull)->GetNextSibling()->GetRect();
    // sibling frame is for the button
}

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.

Definition at line 150 of file nsBaseWidgetAccessible.cpp.

{
  *_retval = 0;
  return NS_OK;
}

Get the nth child of this node.

Parameters:
childNumZero-based child index
Returns:
The nth nsIAccessNode child
CLSID nsAccessibleWrap::GetClassID ( ) const [inherited]
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, inherited]

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:

NS_IMETHODIMP nsAccessibleWrap::GetDescription ( nsAString &  aDescription) [inherited]

Reimplemented in nsHTMLComboboxAccessible, nsXULComboboxAccessible, nsAppRootAccessible, nsXULTreeitemAccessibleWrap, nsHTMLAreaAccessible, and nsHTMLRadioButtonAccessibleWrap.

Definition at line 300 of file nsAccessibleWrap.cpp.

{
  // For items that are a choice in a list of choices, 
  // use MSAA description field to shoehorn positional info, it's becoming
  // a defacto standard use for the field.
  // Tree items override this, because they provide the current level as well

  aDescription.Truncate();
  PRUint32 currentRole;
  nsresult rv = GetFinalRole(&currentRole);
  if (NS_FAILED(rv) ||
      (currentRole != ROLE_LISTITEM && currentRole != ROLE_MENUITEM &&
       currentRole != ROLE_RADIOBUTTON && currentRole != ROLE_PAGETAB &&
       currentRole != ROLE_OUTLINEITEM)) {
    nsAutoString description;
    nsAccessible::GetDescription(description);
    if (!description.IsEmpty()) {
      // Signal to screen readers that this description is speakable
      // and is not a formatted positional information description
      // Don't localize the "Description: " part of this string, it will be 
      // parsed out by assistive technologies.
      aDescription = NS_LITERAL_STRING("Description: ") + description;
    }
    return NS_OK;
  }
  
  nsCOMPtr<nsIAccessible> parent;
  GetParent(getter_AddRefs(parent));
  if (!parent) {
    return NS_ERROR_FAILURE;
  }
  
  PRInt32 indexInParent = 0, numSiblings = 0;
  
  nsCOMPtr<nsIAccessible> sibling, nextSibling;
  parent->GetFirstChild(getter_AddRefs(sibling));
  NS_ENSURE_TRUE(sibling, NS_ERROR_FAILURE);
  
  PRBool foundCurrent = PR_FALSE;
  PRUint32 siblingRole;
  while (sibling) {
    sibling->GetFinalRole(&siblingRole);
    if (siblingRole == currentRole) {
      ++ numSiblings;
      if (!foundCurrent) {
        ++ indexInParent;
        if (sibling == this) {
          foundCurrent = PR_TRUE;        
        }
      }
    }
    sibling->GetNextSibling(getter_AddRefs(nextSibling));
    sibling = nextSibling;
  }
  
  // Don't localize the string "of" -- that's just the format of this string.
  // The AT will parse the relevant numbers out and add its own localization.
  if (currentRole == ROLE_OUTLINEITEM) {
    PRUint32 level = 1;
    nsCOMPtr<nsIAccessible> nextParent;
    while (parent) {
      parent->GetFinalRole(&currentRole);
      if (currentRole != ROLE_GROUPING) {
        break;
      }
      ++level;
      parent->GetParent(getter_AddRefs(nextParent));
      parent.swap(nextParent);
    }

    // Count the number of tree item children
    PRInt32 numChildren = 0;
    nsCOMPtr<nsIAccessible> groupSibling;
    GetNextSibling(getter_AddRefs(groupSibling));
    if (groupSibling) {
      groupSibling->GetFinalRole(&currentRole);
      if (currentRole == ROLE_GROUPING) {
        // Accessible that groups child tree items
        nsCOMPtr<nsIAccessible> child;
        groupSibling->GetFirstChild(getter_AddRefs(child));
        while (child) {
          child->GetFinalRole(&currentRole);
          numChildren += (currentRole == ROLE_OUTLINEITEM);
          nsCOMPtr<nsIAccessible> nextChild;
          child->GetNextSibling(getter_AddRefs(nextChild));
          child.swap(nextChild);
        }
      }
    }

    // This must be a DHTML tree item -- XUL tree items impl GetDescription()
    nsTextFormatter::ssprintf(aDescription,
                              NS_LITERAL_STRING("L%d, %d of %d with %d").get(),
                              level, indexInParent, numSiblings, numChildren);
  }
  else {
    nsTextFormatter::ssprintf(aDescription, NS_LITERAL_STRING("%d of %d").get(),
                              indexInParent, numSiblings);
  }
  return NS_OK;
}

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:

Reimplemented in nsXULTextFieldAccessible, nsHTMLTextFieldAccessible, nsXULTextFieldAccessibleWrap, nsRootAccessibleWrap, and nsHTMLTextFieldAccessibleWrap.

Definition at line 219 of file nsAccessibleWrap.cpp.

{
    PRUint32 state;
    nsAccessible::GetState(&state);
    if (!(state & STATE_INVISIBLE))
      *aState |= EXT_STATE_SHOWING;
    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 136 of file nsBaseWidgetAccessible.cpp.

{
  *_retval = nsnull;
  return NS_OK;
}

Here is the caller graph for this function:

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

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, inherited]

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, inherited]

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:

STDMETHODIMP nsAccessibleWrap::GetIDsOfNames ( REFIID  riid,
LPOLESTR *  rgszNames,
UINT  cNames,
LCID  lcid,
DISPID *  rgDispId 
) [inherited]

Definition at line 993 of file nsAccessibleWrap.cpp.

{
  return E_NOTIMPL;
}
already_AddRefed< nsIDOMNode > nsAccessible::GetInverseRelatedNode ( nsIAtom aRelationAttr,
PRUint32  aAncestorLevelsToSearch = 0 
) [protected, inherited]

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, inherited]

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 143 of file nsBaseWidgetAccessible.cpp.

{
  *_retval = nsnull;
  return NS_OK;
}

Definition at line 397 of file nsAccessibleWrap.cpp.

{
    NS_ENSURE_TRUE(aIfaceType > MAI_INTERFACE_INVALID, nsnull);
    NS_ENSURE_TRUE(aIfaceType < MAI_INTERFACE_NUM, nsnull);
    return mInterfaces[aIfaceType];
}

Here is the caller graph for this function:

already_AddRefed< nsIAccessible > nsAccessible::GetMultiSelectFor ( nsIDOMNode aNode) [static, protected, inherited]

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:

Gets the name from GetActionName()

Definition at line 1222 of file nsHTMLSelectAccessible.cpp.

{
  return GetActionName(eAction_Click, _retval);
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP nsAccessibleWrap::GetNativeInterface ( void **  aOutAccessible) [inherited]

Reimplemented in nsAppRootAccessible.

Definition at line 228 of file nsAccessibleWrap.cpp.

{
    *aOutAccessible = nsnull;

    if (!mMaiAtkObject) {
        CreateMaiInterfaces();
        GType type = GetMaiAtkType(mInterfaceCount, mInterfaces);
        NS_ENSURE_TRUE(type, NS_ERROR_FAILURE);
        mMaiAtkObject =
            NS_REINTERPRET_CAST(AtkObject *,
                                g_object_new(type, NULL));
        NS_ENSURE_TRUE(mMaiAtkObject, NS_ERROR_OUT_OF_MEMORY);

        atk_object_initialize(mMaiAtkObject, this);
        mMaiAtkObject->role = ATK_ROLE_INVALID;
        mMaiAtkObject->layer = ATK_LAYER_INVALID;
    }

    *aOutAccessible = mMaiAtkObject;
    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHOD nsAccessibleWrap::GetNativeInterface ( void **  aOutAccessible) [inherited]

Reimplemented in nsAppRootAccessible.

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.

Our next sibling is an nsHTMLComboboxListAccessible object.

Definition at line 1257 of file nsHTMLSelectAccessible.cpp.

{ 
  if (mNextSibling) {
    *aNextSibling = mNextSibling;
  }
  else {
    nsHTMLComboboxListAccessible* accessible = 
      new nsHTMLComboboxListAccessible(mParent, mDOMNode, mWeakShell);
    *aNextSibling = accessible;
    if (!*aNextSibling)
      return NS_ERROR_OUT_OF_MEMORY;
    mNextSibling = *aNextSibling;
    accessible->Init();
  }
  NS_ADDREF(*aNextSibling);
  return NS_OK;
} 

Here is the call graph for this function:

already_AddRefed< nsIAccessible > nsAccessible::GetNextWithState ( nsIAccessible aStart,
PRUint32  matchState 
) [protected, inherited]

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:

Just one action ( click ).

Definition at line 1123 of file nsHTMLSelectAccessible.cpp.

{
  *aNumActions = eSingle_Action;
  return NS_OK;
}

Return our cached parent.

Definition at line 1213 of file nsHTMLSelectAccessible.cpp.

{   
  NS_IF_ADDREF(*aParent = mParent);
  return NS_OK;
}

Here is the caller 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:

Our prev sibling is an nsHTMLComboboxTextFieldAccessible object.

Definition at line 1278 of file nsHTMLSelectAccessible.cpp.

{ 
  return mParent->GetFirstChild(aAccPrevSibling);
} 

We are a button.

Definition at line 1206 of file nsHTMLSelectAccessible.cpp.

{
  *_retval = ROLE_PUSHBUTTON;
  return NS_OK;
}
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, inherited]

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, inherited]

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.

As a nsHTMLComboboxButtonAccessible we can have the following states: STATE_PRESSED STATE_FOCUSED STATE_FOCUSABLE.

Reimplemented from nsAccessible.

Definition at line 1233 of file nsHTMLSelectAccessible.cpp.

{
  // Get focus status from base class
  nsAccessible::GetState(_retval);

  // we are open or closed --> pressed or not
  PRBool isOpen = PR_FALSE;
  nsIFrame *boundsFrame = GetBoundsFrame();
  nsIComboboxControlFrame* comboFrame;
  boundsFrame->QueryInterface(NS_GET_IID(nsIComboboxControlFrame), (void**)&comboFrame);
  if (!comboFrame)
    return NS_ERROR_FAILURE;
  comboFrame->IsDroppedDown(&isOpen);
  if (isOpen)
  *_retval |= STATE_PRESSED;

  *_retval |= STATE_FOCUSABLE;

  return NS_OK;
}

Here is the call graph for this function:

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

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, inherited]

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:

STDMETHODIMP nsAccessibleWrap::GetTypeInfo ( UINT  i,
LCID  lcid,
ITypeInfo **  ppti 
) [inherited]

Definition at line 985 of file nsAccessibleWrap.cpp.

{
  *ppti = 0;
  return E_NOTIMPL;
}
STDMETHODIMP nsAccessibleWrap::GetTypeInfoCount ( UINT p) [inherited]

Definition at line 978 of file nsAccessibleWrap.cpp.

{
  *p = 0;
  return E_NOTIMPL;
}

Definition at line 1180 of file nsHTMLSelectAccessible.cpp.

{
  // Since mDOMNode is same for all tree item, use |this| pointer as the unique Id
  *aUniqueID = NS_STATIC_CAST(void*, this);
  return NS_OK;
}
NS_IMETHODIMP nsAccessible::GetValue ( nsAString &  aValue) [inherited]
void nsAccessibleWrap::GetXPAccessibleFor ( const VARIANT &  aVarChild,
nsIAccessible **  aXPAccessible 
) [virtual, inherited]

Reimplemented in nsDocAccessibleWrap.

Definition at line 1043 of file nsAccessibleWrap.cpp.

{
  *aXPAccessible = nsnull;
  if (!mWeakShell)
    return; // Fail, we don't want to do anything after we've shut down

  // if its us real easy - this seems to always be the case
  if (aVarChild.lVal == CHILDID_SELF) {
    *aXPAccessible = NS_STATIC_CAST(nsIAccessible*, this);
  } 
  else {
    // XXX It is rare to use a VARIANT with a child num
    // so optimizing this is not a priority
    // We can come back it do it later, if there are perf problems
    // with a specific assistive technology
    nsCOMPtr<nsIAccessible> xpAccessible, nextAccessible;
    GetFirstChild(getter_AddRefs(xpAccessible));
    for (PRInt32 index = 0; xpAccessible; index ++) {
      if (!xpAccessible)
        break; // Failed
      if (aVarChild.lVal == index) {
        *aXPAccessible = xpAccessible;
        break;
      }
      nextAccessible = xpAccessible;
      nextAccessible->GetNextSibling(getter_AddRefs(xpAccessible));
    }
  }
  NS_IF_ADDREF(*aXPAccessible);
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsIContent * nsAccessible::GetXULLabelContent ( nsIContent aForNode,
nsIAtom aLabelType = nsAccessibilityAtoms::label 
) [static, protected, inherited]

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, inherited]

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.

STDMETHODIMP nsAccessibleWrap::Invoke ( DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT *  pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
) [inherited]

Definition at line 1000 of file nsAccessibleWrap.cpp.

{
  return E_NOTIMPL;
}

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, inherited]

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, inherited]

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:

Definition at line 609 of file nsAccessibleWrap.cpp.

{
    // to ensure we are not shut down
    return (mDOMNode != nsnull);
}

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, inherited]

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:

IDispatch * nsAccessibleWrap::NativeAccessible ( nsIAccessible aXPAccessible) [protected, inherited]

Definition at line 1018 of file nsAccessibleWrap.cpp.

{
  if (!aXPAccessible) {
    return NULL;
  }
  
  nsCOMPtr<nsIAccessibleWin32Object> accObject(do_QueryInterface(aXPAccessible));
  if (accObject) {
    void* hwnd;
    accObject->GetHwnd(&hwnd);
    if (hwnd) {
      IDispatch *retval = nsnull;
      AccessibleObjectFromWindow(NS_REINTERPRET_CAST(HWND, hwnd), 
        OBJID_WINDOW, IID_IAccessible, (void **) &retval);
      return retval;
    }
  }

  IAccessible *msaaAccessible;
  aXPAccessible->GetNativeInterface((void**)&msaaAccessible);

  return NS_STATIC_CAST(IDispatch*, msaaAccessible);
}

Here is the call graph for this function:

Here is the caller graph for this function:

STDMETHODIMP nsAccessibleWrap::Next ( ULONG  celt,
VARIANT __RPC_FAR *  rgVar,
ULONG __RPC_FAR *  pCeltFetched 
) [virtual, inherited]

Definition at line 887 of file nsAccessibleWrap.cpp.

{
  // If there are two clients using this at the same time, and they are
  // each using a different mEnumVariant position it would be bad, because
  // we have only 1 object and can only keep of mEnumVARIANT position once

  // Children already cached via QI to IEnumVARIANT
  *aNumElementsFetched = 0;

  PRInt32 numChildren;
  GetChildCount(&numChildren);

  if (aNumElementsRequested <= 0 || !pvar ||
      mEnumVARIANTPosition >= numChildren) {
    return E_FAIL;
  }

  VARIANT varStart;
  VariantInit(&varStart);
  varStart.lVal = CHILDID_SELF;
  varStart.vt = VT_I4;

  accNavigate(NAVDIR_FIRSTCHILD, varStart, &pvar[0]);

  for (long childIndex = 0; pvar[*aNumElementsFetched].vt == VT_DISPATCH; ++childIndex) {
    PRBool wasAccessibleFetched = PR_FALSE;
    nsAccessibleWrap *msaaAccessible = 
      NS_STATIC_CAST(nsAccessibleWrap*, pvar[*aNumElementsFetched].pdispVal);
    if (!msaaAccessible)
      break;
    if (childIndex >= mEnumVARIANTPosition) {
      if (++*aNumElementsFetched >= aNumElementsRequested)
        break;
      wasAccessibleFetched = PR_TRUE;
    }
    msaaAccessible->accNavigate(NAVDIR_NEXT, varStart, &pvar[*aNumElementsFetched] );
    if (!wasAccessibleFetched)
      msaaAccessible->nsAccessNode::Release(); // this accessible will not be received by the caller
  }

  mEnumVARIANTPosition += NS_STATIC_CAST(PRUint16, *aNumElementsFetched);
  return NOERROR;
}

Here is the call graph for this function:

STDMETHODIMP nsAccessibleWrap::NotifyWinEvent ( DWORD  event,
HWND  hwnd,
LONG  idObjectType,
LONG  idObject 
) [static, inherited]

Definition at line 158 of file nsAccessibleWrap.cpp.

{
  if (gmNotifyWinEvent)
    return gmNotifyWinEvent(event, hwnd, idObjectType, idObject);
    
  return E_FAIL;
}
STDMETHODIMP nsAccessibleWrap::put_accName ( VARIANT  varChild,
BSTR  szName 
) [virtual, inherited]

Definition at line 849 of file nsAccessibleWrap.cpp.

{
  return E_NOTIMPL;
}
STDMETHODIMP nsAccessibleWrap::put_accValue ( VARIANT  varChild,
BSTR  szValue 
) [virtual, inherited]

Definition at line 856 of file nsAccessibleWrap.cpp.

{
  return E_NOTIMPL;
}
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 nsAccessibleWrap::QueryInterface ( REFIID  iid,
void **  ppv 
) [inherited]

Reimplemented from nsAccessNodeWrap.

Reimplemented in nsTextAccessibleWrap, and nsDocAccessibleWrap.

Definition at line 110 of file nsAccessibleWrap.cpp.

{
  *ppv = NULL;

  if (IID_IUnknown == iid || IID_IDispatch == iid || IID_IAccessible == iid)
    *ppv = NS_STATIC_CAST(IAccessible*, this);
  else if (IID_IEnumVARIANT == iid && !gIsEnumVariantSupportDisabled) {
    PRInt32 numChildren;
    GetChildCount(&numChildren);
    if (numChildren > 0)  // Don't support this interface for leaf elements
      *ppv = NS_STATIC_CAST(IEnumVARIANT*, this);
  }
  else if (IID_IServiceProvider == iid) {
    *ppv = NS_STATIC_CAST(IServiceProvider*, this);
  }

  if (NULL == *ppv)
    return nsAccessNodeWrap::QueryInterface(iid, ppv);
    
  (NS_REINTERPRET_CAST(IUnknown*, *ppv))->AddRef();
  return S_OK;
}

Here is the call graph for this function:

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

Here is the caller graph for this function:

STDMETHODIMP nsAccessibleWrap::QueryService ( REFGUID  guidService,
REFIID  riid,
void **  ppv 
) [inherited]

To get an ISimpleDOMNode, ISimpleDOMDocument or ISimpleDOMText

from an IAccessible you have to use IServiceProvider like this:

ISimpleDOMDocument *pAccDoc = NULL; IServiceProvider *pServProv = NULL; pAcc->QueryInterface(IID_IServiceProvider, (void**)&pServProv); if (pServProv) { const GUID unused; pServProv->QueryService(unused, IID_ISimpleDOMDocument, (void**)&pAccDoc); pServProv->Release(); }

Definition at line 866 of file nsAccessibleWrap.cpp.

{
  return QueryInterface(iid, ppv);
}

Here is the call 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 nsAccessibleWrap::Reset ( void  ) [virtual, inherited]

Definition at line 948 of file nsAccessibleWrap.cpp.

{
  mEnumVARIANTPosition = 0;
  return NOERROR;
}
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]
nsresult nsAccessible::SetNonTextSelection ( PRBool  aSelect) [protected, 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:

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

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]

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:

STDMETHODIMP nsAccessibleWrap::Skip ( ULONG  celt) [virtual, inherited]

Definition at line 932 of file nsAccessibleWrap.cpp.

{
  mEnumVARIANTPosition += NS_STATIC_CAST(PRUint16, aNumElements);

  PRInt32 numChildren;
  GetChildCount(&numChildren);
  
  if (mEnumVARIANTPosition > numChildren)
  {
    mEnumVARIANTPosition = numChildren;
    return S_FALSE;
  }
  return NOERROR;
}
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.

void nsAccessibleWrap::TranslateStates ( PRUint32  aState,
PRUint32  aExtState,
void aAtkStateSet 
) [static, inherited]

Definition at line 515 of file nsAccessibleWrap.cpp.

{
    if (!aAtkStateSet)
        return;
    AtkStateSet *state_set = NS_STATIC_CAST(AtkStateSet *, aAtkStateSet);

    if (aState & nsIAccessible::STATE_SELECTED)
        atk_state_set_add_state (state_set, ATK_STATE_SELECTED);

    if (aState & nsIAccessible::STATE_FOCUSED)
        atk_state_set_add_state (state_set, ATK_STATE_FOCUSED);

    if (aState & nsIAccessible::STATE_PRESSED)
        atk_state_set_add_state (state_set, ATK_STATE_PRESSED);

    if (aState & nsIAccessible::STATE_CHECKED)
        atk_state_set_add_state (state_set, ATK_STATE_CHECKED);

    if (aState & nsIAccessible::STATE_EXPANDED)
        atk_state_set_add_state (state_set, ATK_STATE_EXPANDED);

    if (aState & nsIAccessible::STATE_COLLAPSED)
        atk_state_set_add_state (state_set, ATK_STATE_EXPANDABLE);
                   
    // The control can't accept input at this time
    if (aState & nsIAccessible::STATE_BUSY)
        atk_state_set_add_state (state_set, ATK_STATE_BUSY);

    if (aState & nsIAccessible::STATE_FOCUSABLE)
        atk_state_set_add_state (state_set, ATK_STATE_FOCUSABLE);

    if (!(aState & nsIAccessible::STATE_INVISIBLE))
        atk_state_set_add_state (state_set, ATK_STATE_VISIBLE);

    if (aState & nsIAccessible::STATE_SELECTABLE)
        atk_state_set_add_state (state_set, ATK_STATE_SELECTABLE);

    if (aState & nsIAccessible::STATE_SIZEABLE)
        atk_state_set_add_state (state_set, ATK_STATE_RESIZABLE);

    if (aState & nsIAccessible::STATE_MULTISELECTABLE)
        atk_state_set_add_state (state_set, ATK_STATE_MULTISELECTABLE);

    if (!(aState & nsIAccessible::STATE_UNAVAILABLE)) {
        atk_state_set_add_state (state_set, ATK_STATE_ENABLED);
        atk_state_set_add_state (state_set, ATK_STATE_SENSITIVE);
    }

    if (aState & nsIAccessible::STATE_INVALID)
        atk_state_set_add_state (state_set, ATK_STATE_INVALID);

#ifdef ATK_STATE_DEFAULT
    if (aState & nsIAccessible::STATE_DEFAULT)
        atk_state_set_add_state (state_set, ATK_STATE_DEFAULT);
#endif

#ifdef ATK_STATE_REQUIRED
    if (aState & nsIAccessible::STATE_REQUIRED)
        atk_state_set_add_state (state_set, ATK_STATE_REQUIRED);
#endif

    // The following state is
    // Extended state flags (for now non-MSAA, for Java and Gnome/ATK support)
    if (aExtState & nsIAccessible::EXT_STATE_ACTIVE)
        atk_state_set_add_state (state_set, ATK_STATE_ACTIVE);

    if (aExtState & nsIAccessible::EXT_STATE_EXPANDABLE)
        atk_state_set_add_state (state_set, ATK_STATE_EXPANDABLE);

    if (aExtState & nsIAccessible::EXT_STATE_MODAL)
        atk_state_set_add_state (state_set, ATK_STATE_MODAL);

    if (aExtState & nsIAccessible::EXT_STATE_MULTI_LINE)
        atk_state_set_add_state (state_set, ATK_STATE_MULTI_LINE);

    if (aExtState & nsIAccessible::EXT_STATE_SENSITIVE)
        atk_s