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 | Static Private Member Functions | Private Attributes | Friends
nsRootAccessible Class Reference

#include <nsRootAccessible.h>

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

 nsRootAccessible (nsIDOMNode *aDOMNode, nsIWeakReference *aShell)
virtual ~nsRootAccessible ()
NS_IMETHOD GetName (nsAString &aName)
NS_IMETHOD GetParent (nsIAccessible **aParent)
NS_IMETHOD GetRole (PRUint32 *aRole)
NS_IMETHOD GetState (PRUint32 *aState)
NS_IMETHOD GetAccessibleRelated (PRUint32 aRelationType, nsIAccessible **aRelated)
NS_IMETHOD HandleEvent (nsIDOMEvent *aEvent)
NS_IMETHOD Focus (nsIDOMEvent *aEvent)
 Processes a focus event.
NS_IMETHOD Blur (nsIDOMEvent *aEvent)
 Processes a blur event.
NS_IMETHOD Submit (nsIDOMEvent *aEvent)
 Processes a form submit event.
NS_IMETHOD Reset (nsIDOMEvent *aEvent)
 Processes a form reset event.
NS_IMETHOD Change (nsIDOMEvent *aEvent)
 Processes a form change event.
NS_IMETHOD Select (nsIDOMEvent *aEvent)
 Processes a form select event.
NS_IMETHOD Input (nsIDOMEvent *aEvent)
 Processes a form input event.
NS_IMETHOD PopupShowing (nsIDOMEvent *aEvent)
NS_IMETHOD PopupShown (nsIDOMEvent *aEvent)
NS_IMETHOD PopupHiding (nsIDOMEvent *aEvent)
NS_IMETHOD PopupHidden (nsIDOMEvent *aEvent)
NS_IMETHOD Close (nsIDOMEvent *aEvent)
NS_IMETHOD Command (nsIDOMEvent *aEvent)
NS_IMETHOD Broadcast (nsIDOMEvent *aEvent)
NS_IMETHOD CommandUpdate (nsIDOMEvent *aEvent)
NS_IMETHOD GetCaretAccessible (nsIAccessible **aAccessibleCaret)
NS_IMETHOD Shutdown ()
void ShutdownAll ()
NS_IMETHOD FireToolkitEvent (PRUint32 aEvent, nsIAccessible *aAccessible, void *aData)
NS_IMETHOD FireToolkitEvent (PRUint32 aEvent, nsIAccessible *aAccessible, void *aData)
NS_IMETHOD FireToolkitEvent (PRUint32 aEvent, nsIAccessible *aAccessible, void *aData)
NS_IMETHOD FireToolkitEvent (PRUint32 aEvent, nsIAccessible *aAccessible, void *aData)
NS_IMETHOD FireDocLoadingEvent (PRBool isFinished)
NS_IMETHOD FireDocLoadingEvent (PRBool isFinished)
 STDMETHODIMP_ (ULONG) AddRef()
 STDMETHODIMP_ (ULONG) Release()
STDMETHODIMP QueryInterface (REFIID, void **)
NS_IMETHOD QueryInterface (REFNSIID aIID, void **aInstancePtr)
virtual long QueryInterface ()=0
void GetXPAccessibleFor (const VARIANT &varChild, nsIAccessible **aXPAccessible)
virtual HRESULT STDMETHODCALLTYPE get_URL (BSTR __RPC_FAR *url)
virtual HRESULT STDMETHODCALLTYPE get_title (BSTR __RPC_FAR *title)
virtual HRESULT STDMETHODCALLTYPE get_mimeType (BSTR __RPC_FAR *mimeType)
virtual HRESULT STDMETHODCALLTYPE get_docType (BSTR __RPC_FAR *docType)
virtual HRESULT STDMETHODCALLTYPE get_nameSpaceURIForID (short nameSpaceID, BSTR __RPC_FAR *nameSpaceURI)
virtual HRESULT STDMETHODCALLTYPE put_alternateViewMediaTypes (BSTR __RPC_FAR *commaSeparatedMediaTypes)
virtual HRESULT STDMETHODCALLTYPE get_accChild (VARIANT varChild, IDispatch __RPC_FAR *__RPC_FAR *ppdispChild)
NS_IMETHOD FireAnchorJumpEvent ()
NS_IMETHOD GetValue (nsAString &aValue)
NS_IMETHOD GetFocusedChild (nsIAccessible **aFocusedChild)
NS_IMETHOD ScrollPositionWillChange (nsIScrollableView *aView, nscoord aX, nscoord aY)
NS_IMETHOD ScrollPositionDidChange (nsIScrollableView *aView, nscoord aX, nscoord aY)
NS_IMETHOD Init ()
 NS_IMETHOD_ (nsIFrame *) GetFrame(void)
 NS_IMETHOD_ (nsrefcnt) AddRef(void)
NS_DECL_ISUPPORTS_INHERITED
NS_IMETHOD 
GetChildAtPoint (PRInt32 x, PRInt32 y, nsIAccessible **_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 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_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)
NS_IMETHOD GetDescription (nsAString &aDescription)
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)
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 addSelection (in long startOffset, in long endOffset)
void removeSelection ()
 Remove this accessible from the current selection.
void removeSelection (in long selectionNum)
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.
AString getNameSpaceURIForID (in short nameSpaceID)
 The namespace for each ID that is handed back.
nsIAccessNode getCachedAccessNode (in voidPtr aUniqueID)
 Returns the access node cached by this document.
nsIAccessible getAccessibleInParentChain (in nsIDOMNode aDOMNode)
 Returns the first accessible parent of a DOM node.
void invalidateCacheSubtree (in nsIContent aChangeContent, in PRUint32 aChangeEvent)
 Find the accessible object in the accessibility cache that corresponds to aStartNode or the first ancestor of aStartNode that has an accessible object associated with it.
void cacheAccessNode (in voidPtr aUniqueID, in nsIAccessNode aAccessNode)
void destroy ()
void flushPendingEvents ()
void fireDocLoadingEvent (in boolean isFinished)
void fireAnchorJumpEvent ()
virtual void BeginUpdate (nsIDocument *aDocument, nsUpdateType aUpdateType)=0
 Notify that a content model update is beginning.
virtual void EndUpdate (nsIDocument *aDocument, nsUpdateType aUpdateType)=0
 Notify that a content model update is finished.
virtual void BeginLoad (nsIDocument *aDocument)=0
 Notify the observer that a document load is beginning.
virtual void EndLoad (nsIDocument *aDocument)=0
 Notify the observer that a document load has finished.
virtual void BeginReflow (nsIDocument *aDocument, nsIPresShell *aShell)=0
 Notify the observer that the document is being reflowed in the given presentation shell.
virtual void EndReflow (nsIDocument *aDocument, nsIPresShell *aShell)=0
 Notify the observer that the document is done being reflowed in the given presentation shell.
virtual void CharacterDataChanged (nsIDocument *aDocument, nsIContent *aContent, PRBool aAppend)=0
 Notification that the content model has changed.
virtual void ContentStatesChanged (nsIDocument *aDocument, nsIContent *aContent1, nsIContent *aContent2, PRInt32 aStateMask)=0
 Notification that the state of a content node has changed.
virtual void AttributeChanged (nsIDocument *aDocument, nsIContent *aContent, PRInt32 aNameSpaceID, nsIAtom *aAttribute, PRInt32 aModType)=0
 Notification that the content model has changed.
virtual void ContentAppended (nsIDocument *aDocument, nsIContent *aContainer, PRInt32 aNewIndexInContainer)=0
 Notifcation that the content model has had data appended to the given content object.
virtual void ContentInserted (nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aChild, PRInt32 aIndexInContainer)=0
 Notification that content has been inserted.
virtual void ContentRemoved (nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aChild, PRInt32 aIndexInContainer)=0
 Content has just been removed.
virtual void StyleSheetAdded (nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, PRBool aDocumentSheet)=0
 A StyleSheet has just been added to the document.
virtual void StyleSheetRemoved (nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, PRBool aDocumentSheet)=0
 A StyleSheet has just been removed from the document.
virtual void StyleSheetApplicableStateChanged (nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, PRBool aApplicable)=0
 A StyleSheet has just changed its applicable state.
virtual void StyleRuleChanged (nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aOldStyleRule, nsIStyleRule *aNewStyleRule)=0
 A StyleRule has just been modified within a style sheet.
virtual void StyleRuleAdded (nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule)=0
 A StyleRule has just been added to a style sheet.
virtual void StyleRuleRemoved (nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule)=0
 A StyleRule has just been removed from a style sheet.
virtual void DocumentWillBeDestroyed (nsIDocument *aDocument)=0
 The document is in the process of being destroyed.
void observe (in nsISupports aSubject, in string aTopic, in wstring aData)
 Observe will be called when there is a notification for the topic |aTopic|.
NS_IMETHOD GetCaretOffset (PRInt32 *aCaretOffset)
 nsIAccessibleText impl.
NS_IMETHOD SetCaretOffset (PRInt32 aCaretOffset)
NS_IMETHOD GetCharacterCount (PRInt32 *aCharacterCount)
NS_IMETHOD GetText (PRInt32 startOffset, PRInt32 endOffset, nsAString &aText)
NS_IMETHOD GetTextBeforeOffset (PRInt32 aOffset, nsAccessibleTextBoundary aBoundaryType, PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString &aText)
NS_IMETHOD GetTextAtOffset (PRInt32 aOffset, nsAccessibleTextBoundary aBoundaryType, PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString &aText)
NS_IMETHOD GetTextAfterOffset (PRInt32 aOffset, nsAccessibleTextBoundary aBoundaryType, PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString &aText)
void ShutdownEditor ()
AString getText (in long startOffset, in long endOffset)
 String methods may need to return multibyte-encoded strings, since some locales can't be encoded using 16-bit chars.
AString getTextAfterOffset (in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset)
AString getTextAtOffset (in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset)
AString getTextBeforeOffset (in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset)
wchar getCharacterAtOffset (in long offset)
 It would be better to return an unsigned long here, to allow unicode chars > 16 bits.
nsISupports getAttributeRange (in long offset, out long rangeStartOffset, out long rangeEndOffset)
void getCharacterExtents (in long offset, out long x, out long y, out long width, out long height, in nsAccessibleCoordType coordType)
long getOffsetAtPoint (in long x, in long y, in nsAccessibleCoordType coordType)
void getSelectionBounds (in long selectionNum, out long startOffset, out long endOffset)
void setSelectionBounds (in long selectionNum, in long startOffset, in long endOffset)
void setAttributes (in long startPos, in long endPos, in nsISupports attributes)
 Set font styles, such as italic, bold...
void setTextContents (in AString text)
void insertText (in AString text, in long position)
void copyText (in long startPos, in long endPos)
void cutText (in long startPos, in long endPos)
void deleteText (in long startPos, in long endPos)
void pasteText (in long position)
void WillCreateNode (in DOMString aTag, in nsIDOMNode aParent, in long aPosition)
 Called before the editor creates a node.
void DidCreateNode (in DOMString aTag, in nsIDOMNode aNode, in nsIDOMNode aParent, in long aPosition, in nsresult aResult)
 Called after the editor creates a node.
void WillInsertNode (in nsIDOMNode aNode, in nsIDOMNode aParent, in long aPosition)
 Called before the editor inserts a node.
void DidInsertNode (in nsIDOMNode aNode, in nsIDOMNode aParent, in long aPosition, in nsresult aResult)
 Called after the editor inserts a node.
void WillDeleteNode (in nsIDOMNode aChild)
 Called before the editor deletes a node.
void DidDeleteNode (in nsIDOMNode aChild, in nsresult aResult)
 Called after the editor deletes a node.
void WillSplitNode (in nsIDOMNode aExistingRightNode, in long aOffset)
 Called before the editor splits a node.
void DidSplitNode (in nsIDOMNode aExistingRightNode, in long aOffset, in nsIDOMNode aNewLeftNode, in nsresult aResult)
 Called after the editor splits a node.
void WillJoinNodes (in nsIDOMNode aLeftNode, in nsIDOMNode aRightNode, in nsIDOMNode aParent)
 Called before the editor joins 2 nodes.
void DidJoinNodes (in nsIDOMNode aLeftNode, in nsIDOMNode aRightNode, in nsIDOMNode aParent, in nsresult aResult)
 Called after the editor joins 2 nodes.
void WillInsertText (in nsIDOMCharacterData aTextNode, in long aOffset, in DOMString aString)
 Called before the editor inserts text.
void DidInsertText (in nsIDOMCharacterData aTextNode, in long aOffset, in DOMString aString, in nsresult aResult)
 Called after the editor inserts text.
void WillDeleteText (in nsIDOMCharacterData aTextNode, in long aOffset, in long aLength)
 Called before the editor deletes text.
void DidDeleteText (in nsIDOMCharacterData aTextNode, in long aOffset, in long aLength, in nsresult aResult)
 Called before the editor deletes text.
void WillDeleteSelection (in nsISelection aSelection)
 Called before the editor deletes the selection.
void DidDeleteSelection (in nsISelection aSelection)
 Called after the editor deletes the selection.
void handleEvent (in nsIDOMEvent event)
 This method is called whenever an event occurs of the type for which the EventListener interface was registered.

Static Public Member Functions

static PRInt32 GetChildIDFor (nsIAccessible *aAccessible)
static void FlushEventsCallback (nsITimer *aTimer, void *aClosure)
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)
static PRBool IsSingleLineTextControl (nsIDOMNode *aDomNode)

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.
readonly attribute long selectionCount
readonly attribute AString URL
 The URL of the document.
readonly attribute AString title
 The title of the document, as specified in the document.
readonly attribute AString mimeType
 The mime type of the document.
readonly attribute AString docType
 The doc type of the document, as specified in the document.
readonly attribute boolean isEditable
 True if the document is live in an editor.
readonly attribute nsIDOMDocument document
 The nsIDOMDocument interface associated with this document.
readonly attribute nsIDOMWindow window
 The nsIDOMWindow that the document resides in.
readonly attribute nsIAccessible caretAccessible
readonly attribute voidPtr windowHandle
 The window handle for the OS window the document is being displayed in.
const nsAccessibleTextBoundary BOUNDARY_CHAR = 0
const nsAccessibleTextBoundary BOUNDARY_WORD_START = 1
const nsAccessibleTextBoundary BOUNDARY_WORD_END = 2
const nsAccessibleTextBoundary BOUNDARY_SENTENCE_START = 3
const nsAccessibleTextBoundary BOUNDARY_SENTENCE_END = 4
const nsAccessibleTextBoundary BOUNDARY_LINE_START = 5
const nsAccessibleTextBoundary BOUNDARY_LINE_END = 6
const nsAccessibleTextBoundary BOUNDARY_ATTRIBUTE_RANGE = 7
const nsAccessibleCoordType COORD_TYPE_SCREEN = 0
const nsAccessibleCoordType COORD_TYPE_WINDOW = 1
attribute long caretOffset
readonly attribute long characterCount

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
static PRBool gSuppressedNotifySelectionChanged = PR_FALSE

Protected Member Functions

nsresult AddEventListeners ()
nsresult RemoveEventListeners ()
void TryFireEarlyLoadEvent (nsIAccessible *focusAccessible, nsIDOMNode *focusNode)
void FireAccessibleFocusEvent (nsIAccessible *focusAccessible, nsIDOMNode *focusNode, nsIDOMEvent *aFocusEvent, PRBool aForceEvent=PR_FALSE)
void FireCurrentFocusEvent ()
void GetChromeEventHandler (nsIDOMEventTarget **aChromeTarget)
already_AddRefed
< nsIDocShellTreeItem
GetContentDocShell (nsIDocShellTreeItem *aStart)
void CheckForEditor ()
virtual void GetBoundsRect (nsRect &aRect, nsIFrame **aRelativeFrame)
void AddScrollListener ()
void RemoveScrollListener ()
void RefreshNodes (nsIDOMNode *aStartNode, PRUint32 aChangeEvent)
nsresult FireDelayedToolkitEvent (PRUint32 aEvent, nsIDOMNode *aDOMNode, void *aData, PRBool aAllowDupes=PR_FALSE)
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 ()
virtual nsresult GetSelections (nsISelectionController **aSelCon, nsISelection **aDomSel)
 nsIAccessibleText helpers
void SetEditor (nsIEditor *aEditor)
 nsIAccessibleText helpers
nsITextControlFrameGetTextFrame ()
nsresult GetSelectionRange (PRInt32 *aStartPos, PRInt32 *aEndPos)
nsresult SetSelectionRange (PRInt32 aStartPos, PRInt32 aEndPos)
nsresult FireTextChangeEvent (AtkTextChange *aTextData)
nsresult GetTextHelperCore (EGetTextType aType, nsAccessibleTextBoundary aBoundaryType, PRInt32 aOffset, PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsISelectionController *aSelCon, nsISelection *aDomSel, nsISupports *aClosure, nsAString &aText)
nsresult GetTextHelper (EGetTextType aType, nsAccessibleTextBoundary aBoundaryType, PRInt32 aOffset, PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsISupports *aClosure, nsAString &aText)

Static Protected Member Functions

static void GetTargetNode (nsIDOMEvent *aEvent, nsIDOMNode **aTargetNode)
static void ScrollTimerCallback (nsITimer *aTimer, void *aClosure)
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)
static nsresult DOMPointToOffset (nsISupports *aClosure, nsIDOMNode *aNode, PRInt32 aNodeOffset, PRInt32 *aResult)
static nsresult OffsetToDOMPoint (nsISupports *aClosure, PRInt32 aOffset, nsIDOMNode **aResult, PRInt32 *aPosition)
static nsresult GetCurrentOffset (nsISupports *aClosure, nsISelection *aDomSel, PRInt32 *aOffset)

Protected Attributes

nsCOMPtr< nsIAccessibilityServicemAccService
nsCOMPtr< nsIAccessibleCaretmCaretAccessible
PRPackedBool mIsInDHTMLMenu
nsInterfaceHashtable
< nsVoidHashKey, nsIAccessNode
mAccessNodeCache
voidmWnd
nsCOMPtr< nsIDocumentmDocument
nsCOMPtr< nsITimermScrollWatchTimer
nsCOMPtr< nsITimermFireEventTimer
nsCOMPtr< nsIEditormEditor
PRUint16 mScrollPositionChangedTicks
PRPackedBool mIsContentLoaded
nsCOMArray< nsIAccessibleEventmEventsToFire
AtkObject * mMaiAtkObject
PRUint16 mEnumVARIANTPosition
nsCOMPtr< nsIAccessiblemParent
nsIAccessiblemFirstChild
nsIAccessiblemNextSibling
nsRoleMapEntrymRoleMapEntry
PRUint32 mAccChildCount
nsCOMPtr< nsIDOMNodemDOMNode
nsCOMPtr< nsIWeakReferencemWeakShell
PRInt32 mRefCnt
nsCOMPtr< nsIEditormPlainEditor
nsCOMPtr< nsIDOMNodemTextNode

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]
BSTR URL [get]
BSTR title [get]
BSTR mimeType [get]
BSTR docType [get]
BSTR nameSpaceURIForID ([in] short nameSpaceID) [get]
BSTR alternateViewMediaTypes [set]

Static Private Member Functions

static void FireFocusCallback (nsITimer *aTimer, void *aClosure)

Private Attributes

nsCOMPtr< nsITimermFireFocusTimer

Friends

class nsAccessibleHyperText

Detailed Description

Definition at line 56 of file nsRootAccessible.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

Definition at line 107 of file nsRootAccessible.cpp.

                                                                                :
  nsDocAccessibleWrap(aDOMNode, aShell), 
  mAccService(do_GetService("@mozilla.org/accessibilityService;1")),
  mIsInDHTMLMenu(PR_FALSE)
{
}

Definition at line 117 of file nsRootAccessible.cpp.

{
}

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.

Reimplemented from nsDocAccessible.

Definition at line 230 of file nsRootAccessible.cpp.

{
  // use AddEventListener from the nsIDOMEventTarget interface
  nsCOMPtr<nsIDOMEventTarget> target(do_QueryInterface(mDocument));
  if (target) { 
    // capture DOM focus events 
    nsresult rv = target->AddEventListener(NS_LITERAL_STRING("focus"), NS_STATIC_CAST(nsIDOMFocusListener*, this), PR_TRUE);
    NS_ENSURE_SUCCESS(rv, rv);

    // capture Form change events 
    rv = target->AddEventListener(NS_LITERAL_STRING("select"), NS_STATIC_CAST(nsIDOMFormListener*, this), PR_TRUE);
    NS_ENSURE_SUCCESS(rv, rv);

    // capture NameChange events (fired whenever name changes, immediately after, whether focus moves or not)
    rv = target->AddEventListener(NS_LITERAL_STRING("NameChange"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
    NS_ENSURE_SUCCESS(rv, rv);

    // capture ValueChange events (fired whenever value changes, immediately after, whether focus moves or not)
    rv = target->AddEventListener(NS_LITERAL_STRING("ValueChange"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
    NS_ENSURE_SUCCESS(rv, rv);

    // capture AlertActive events (fired whenever alert pops up)
    rv = target->AddEventListener(NS_LITERAL_STRING("AlertActive"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
    NS_ENSURE_SUCCESS(rv, rv);

    // add ourself as a TreeViewChanged listener (custom event fired in tree.xml)
    rv = target->AddEventListener(NS_LITERAL_STRING("TreeViewChanged"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
    NS_ENSURE_SUCCESS(rv, rv);

    // add ourself as a OpenStateChange listener (custom event fired in tree.xml)
    rv = target->AddEventListener(NS_LITERAL_STRING("OpenStateChange"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
    NS_ENSURE_SUCCESS(rv, rv);

    // add ourself as a CheckboxStateChange listener (custom event fired in nsHTMLInputElement.cpp)
    rv = target->AddEventListener(NS_LITERAL_STRING("CheckboxStateChange"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
    NS_ENSURE_SUCCESS(rv, rv);

    // add ourself as a RadioStateChange Listener ( custom event fired in in nsHTMLInputElement.cpp  & radio.xml)
    rv = target->AddEventListener(NS_LITERAL_STRING("RadioStateChange"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
    NS_ENSURE_SUCCESS(rv, rv);

    rv = target->AddEventListener(NS_LITERAL_STRING("popupshown"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
    NS_ENSURE_SUCCESS(rv, rv);

    rv = target->AddEventListener(NS_LITERAL_STRING("popuphiding"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
    NS_ENSURE_SUCCESS(rv, rv);

    rv = target->AddEventListener(NS_LITERAL_STRING("DOMMenuInactive"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
    NS_ENSURE_SUCCESS(rv, rv);

    rv = target->AddEventListener(NS_LITERAL_STRING("DOMMenuItemActive"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
    NS_ENSURE_SUCCESS(rv, rv);
    
    rv = target->AddEventListener(NS_LITERAL_STRING("DOMMenuBarActive"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
    NS_ENSURE_SUCCESS(rv, rv);
    
    rv = target->AddEventListener(NS_LITERAL_STRING("DOMMenuBarInactive"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
    NS_ENSURE_SUCCESS(rv, rv);

    rv = target->AddEventListener(NS_LITERAL_STRING("DOMContentLoaded"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE);
    NS_ENSURE_SUCCESS(rv, rv);
  }

  GetChromeEventHandler(getter_AddRefs(target));
  NS_ASSERTION(target, "No chrome event handler for document");
  if (target) {
    nsresult rv = target->AddEventListener(NS_LITERAL_STRING("pagehide"), 
                                           NS_STATIC_CAST(nsIDOMXULListener*, this), 
                                           PR_TRUE);
    NS_ENSURE_SUCCESS(rv, rv);
  }

  if (!mCaretAccessible)
    mCaretAccessible = new nsCaretAccessible(mDOMNode, mWeakShell, this);

  // Fire accessible focus event for pre-existing focus, but wait until all internal
  // focus events are finished for window initialization.
  mFireFocusTimer = do_CreateInstance("@mozilla.org/timer;1");
  if (mFireFocusTimer) {
    mFireFocusTimer->InitWithFuncCallback(FireFocusCallback, this,
                                          0, nsITimer::TYPE_ONE_SHOT);
  }

  return nsDocAccessible::AddEventListeners();
}

Here is the call graph for this function:

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

Here is the caller graph for this function:

void nsDocAccessible::AddScrollListener ( ) [protected, inherited]

Definition at line 661 of file nsDocAccessible.cpp.

{
  nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));

  nsIViewManager* vm = nsnull;
  if (presShell)
    vm = presShell->GetViewManager();

  nsIScrollableView* scrollableView = nsnull;
  if (vm)
    vm->GetRootScrollableView(&scrollableView);

  if (scrollableView)
    scrollableView->AddScrollPositionListener(this);
}

Here is the call graph for this function:

void nsIAccessibleText::addSelection ( in long  startOffset,
in long  endOffset 
) [inherited]

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:

virtual void nsIDocumentObserver::AttributeChanged ( nsIDocument aDocument,
nsIContent aContent,
PRInt32  aNameSpaceID,
nsIAtom aAttribute,
PRInt32  aModType 
) [pure virtual, inherited]

Notification that the content model has changed.

This method is called automatically by content objects when an attribute's value has changed (therefore there is normally no need to invoke this method directly). The notification is passed to any IDocumentObservers document observers.

Parameters:
aDocumentThe document being observed
aContentthe piece of content whose attribute changed
aAttributethe atom name of the attribute
aModTypeWhether or not the attribute was added, changed, or removed. The constants are defined in nsIDOMMutationEvent.h.

Implemented in PresShell, nsContentList, nsXULContentBuilder, nsXULTemplateBuilder, nsImageMap, nsTreeContentView, and nsXMLPrettyPrinter.

virtual void nsIDocumentObserver::BeginLoad ( nsIDocument aDocument) [pure virtual, inherited]

Notify the observer that a document load is beginning.

Implemented in PresShell.

virtual void nsIDocumentObserver::BeginReflow ( nsIDocument aDocument,
nsIPresShell aShell 
) [pure virtual, inherited]

Notify the observer that the document is being reflowed in the given presentation shell.

virtual void nsIDocumentObserver::BeginUpdate ( nsIDocument aDocument,
nsUpdateType  aUpdateType 
) [pure virtual, inherited]

Notify that a content model update is beginning.

This call can be nested.

Implemented in nsFragmentObserver, PresShell, HTMLContentSink, and nsXMLPrettyPrinter.

Processes a blur event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMFocusListener.

Definition at line 984 of file nsRootAccessible.cpp.

{ 
  return NS_OK; 
}

Implements nsIDOMXULListener.

Definition at line 1037 of file nsRootAccessible.cpp.

{ return NS_OK; }
void nsPIAccessibleDocument::cacheAccessNode ( in voidPtr  aUniqueID,
in nsIAccessNode  aAccessNode 
) [inherited]
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:

Processes a form change event.

Parameters:
aEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMFormListener.

Definition at line 1001 of file nsRootAccessible.cpp.

{
  // get change events when the form elements changes its state, checked->not,
  // deleted text, new text, change in selection for list/combo boxes
  // this may be the event that we have the individual Accessible objects
  // handle themselves -- have list/combos figure out the change in selection
  // have textareas and inputs fire a change of state etc...
  return NS_OK;   // Ignore form change events in MSAA
}
virtual void nsIDocumentObserver::CharacterDataChanged ( nsIDocument aDocument,
nsIContent aContent,
PRBool  aAppend 
) [pure virtual, inherited]

Notification that the content model has changed.

This method is called automatically by content objects when their state is changed (therefore there is normally no need to invoke this method directly). The notification is passed to any IDocumentObservers. The notification is passed on to all of the document observers.

This notification is not sent when a piece of content is added/removed from the document (the other notifications are used for that).

Parameters:
aDocumentThe document being observed
aContentthe piece of content that changed
aAppendWhether the change was an append

Implemented in PresShell.

void nsDocAccessibleWrap::CheckForEditor ( ) [protected, virtual, inherited]

Reimplemented from nsDocAccessible.

Definition at line 535 of file nsDocAccessibleWrap.cpp.

{
    nsDocAccessible::CheckForEditor();
    if (mEditor)
        SetEditor(mEditor); // set editor for nsAccessibleEditableText
}

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

Implements nsIDOMXULListener.

Definition at line 1033 of file nsRootAccessible.cpp.

{ return NS_OK; }

Implements nsIDOMXULListener.

Definition at line 1035 of file nsRootAccessible.cpp.

{ return NS_OK; }

Implements nsIDOMXULListener.

Definition at line 1039 of file nsRootAccessible.cpp.

{ return NS_OK; }
virtual void nsIDocumentObserver::ContentAppended ( nsIDocument aDocument,
nsIContent aContainer,
PRInt32  aNewIndexInContainer 
) [pure virtual, inherited]

Notifcation that the content model has had data appended to the given content object.

This method is called automatically by the content container objects when a new content object is appended to the container (therefore there is normally no need to invoke this method directly). The notification is passed on to all of the document observers.

Parameters:
aDocumentThe document being observed
aContainerthe container that had a new child appended
aNewIndexInContainerthe index in the container of the first new child

Implemented in PresShell, nsContentList, nsBindingManager, nsImageMap, nsTreeContentView, and nsXMLPrettyPrinter.

virtual void nsIDocumentObserver::ContentInserted ( nsIDocument aDocument,
nsIContent aContainer,
nsIContent aChild,
PRInt32  aIndexInContainer 
) [pure virtual, inherited]

Notification that content has been inserted.

This method is called automatically by the content container objects when a new content object is inserted in the container (therefore there is normally no need to invoke this method directly). The notification is passed on to all of the document observers.

Parameters:
aDocumentThe document being observed
aContainerthe container that now contains aChild
aChildthe child that was inserted
aIndexInContainerthe index of the child in the container

Implemented in PresShell, nsContentList, nsBindingManager, nsImageMap, nsTreeContentView, and nsXMLPrettyPrinter.

virtual void nsIDocumentObserver::ContentRemoved ( nsIDocument aDocument,
nsIContent aContainer,
nsIContent aChild,
PRInt32  aIndexInContainer 
) [pure virtual, inherited]

Content has just been removed.

This method is called automatically by content container objects when a content object has just been removed from the container (therefore there is normally no need to invoke this method directly). The notification is passed on to all of the document observers.

Parameters:
aDocumentThe document being observed
aContainerthe container that had a child removed
aChildthe child that was just removed
aIndexInContainerthe index of the child in the container before it was removed

Implemented in PresShell, nsContentList, nsBindingManager, nsImageMap, nsTreeContentView, and nsXMLPrettyPrinter.

virtual void nsIDocumentObserver::ContentStatesChanged ( nsIDocument aDocument,
nsIContent aContent1,
nsIContent aContent2,
PRInt32  aStateMask 
) [pure virtual, inherited]

Notification that the state of a content node has changed.

(ie: gained or lost focus, became active or hovered over) This method is called automatically by content objects when their state is changed (therefore there is normally no need to invoke this method directly). The notification is passed to any IDocumentObservers. The notification is passed on to all of the document observers.

This notification is not sent when a piece of content is added/removed from the document or the content itself changed (the other notifications are used for that).

The optional second content node is to allow optimization of the case where state moves from one node to another (as is likely for :focus and :hover)

Either content node may be nsnull, but not both

Parameters:
aDocumentThe document being observed
aContent1the piece of content that changed
aContent2optional second piece of content that changed

Implemented in PresShell, and nsTreeContentView.

void nsIAccessibleEditableText::copyText ( in long  startPos,
in long  endPos 
) [inherited]
void nsIAccessibleEditableText::cutText ( in long  startPos,
in long  endPos 
) [inherited]
void nsIAccessibleEditableText::deleteText ( in long  startPos,
in long  endPos 
) [inherited]
void nsIEditActionListener::DidCreateNode ( in DOMString  aTag,
in nsIDOMNode  aNode,
in nsIDOMNode  aParent,
in long  aPosition,
in nsresult  aResult 
) [inherited]

Called after the editor creates a node.

Parameters:
aTagThe tag name of the DOM Node to create.
aNodeThe DOM Node that was created.
aParentThe node to insert the new object into
aPositionThe place in aParent to insert the new node 0=first child, 1=second child, etc. any number > number of current children = last child
aResultThe result of the create node operation.
void nsIEditActionListener::DidDeleteNode ( in nsIDOMNode  aChild,
in nsresult  aResult 
) [inherited]

Called after the editor deletes a node.

Parameters:
aChildThe node to delete
aResultThe result of the delete node operation.

Called after the editor deletes the selection.

Parameters:
aSelectionThe selection, after deletion

Here is the caller graph for this function:

void nsIEditActionListener::DidDeleteText ( in nsIDOMCharacterData  aTextNode,
in long  aOffset,
in long  aLength,
in nsresult  aResult 
) [inherited]

Called before the editor deletes text.

Parameters:
aTextNodeThis node getting text deleted
aOffsetThe offset in aTextNode to delete at.
aLengthThe amount of text to delete.
aResultThe result of the delete text operation.

Here is the caller graph for this function:

void nsIEditActionListener::DidInsertNode ( in nsIDOMNode  aNode,
in nsIDOMNode  aParent,
in long  aPosition,
in nsresult  aResult 
) [inherited]

Called after the editor inserts a node.

Parameters:
aNodeThe DOM Node to insert.
aParentThe node to insert the new object into
aPositionThe place in aParent to insert the new node 0=first child, 1=second child, etc. any number > number of current children = last child
aResultThe result of the insert node operation.
void nsIEditActionListener::DidInsertText ( in nsIDOMCharacterData  aTextNode,
in long  aOffset,
in DOMString  aString,
in nsresult  aResult 
) [inherited]

Called after the editor inserts text.

Parameters:
aTextNodeThis node getting inserted text
aOffsetThe offset in aTextNode to insert at.
aStringThe string that gets inserted.
aResultThe result of the insert text operation.

Here is the caller graph for this function:

void nsIEditActionListener::DidJoinNodes ( in nsIDOMNode  aLeftNode,
in nsIDOMNode  aRightNode,
in nsIDOMNode  aParent,
in nsresult  aResult 
) [inherited]

Called after the editor joins 2 nodes.

Parameters:
aLeftNodeThis node will be merged into the right node
aRightNodeThe node that will be merged into. There is no requirement that the two nodes be of the same type.
aParentThe parent of aRightNode
aResultThe result of the join operation.
void nsIEditActionListener::DidSplitNode ( in nsIDOMNode  aExistingRightNode,
in long  aOffset,
in nsIDOMNode  aNewLeftNode,
in nsresult  aResult 
) [inherited]

Called after the editor splits a node.

Parameters:
aExistingRightNodethe node to split. It will become the new node's next sibling.
aOffsetthe offset of aExistingRightNode's content|children to do the split at
aNewLeftNode[OUT] the new node resulting from the split, becomes aExistingRightNode's previous sibling.
void nsIAccessible::doAction ( in PRUint8  index) [inherited]

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

nsresult nsAccessible::DoCommand ( nsIContent aContent = nsnull) [protected, 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:

virtual void nsIDocumentObserver::DocumentWillBeDestroyed ( nsIDocument aDocument) [pure virtual, inherited]

The document is in the process of being destroyed.

This method is called automatically during document destruction.

Parameters:
aDocumentThe document being observed

Implemented in nsFragmentObserver, nsDOMStyleSheetList, nsContentList, nsBindingManager, nsXULContentBuilder, nsXULTreeBuilder, nsXULTemplateBuilder, nsTreeContentView, and nsXMLPrettyPrinter.

nsresult nsAccessibleText::DOMPointToOffset ( nsISupports *  aClosure,
nsIDOMNode aNode,
PRInt32  aNodeOffset,
PRInt32 aResult 
) [static, protected, inherited]

Definition at line 133 of file nsAccessibleText.cpp.

{
  NS_ENSURE_ARG_POINTER(aNode && aResult);

  *aResult = aNodeOffset;

  nsCOMPtr<nsIArray> domNodeArray(do_QueryInterface(aClosure));
  if (domNodeArray) {
    // Static text, calculate the offset from a given set of (text) node
    PRUint32 textLength, totalLength = 0;
    PRUint32 index, count;
    domNodeArray->GetLength(&count);
    for (index = 0; index < count; index++) {
      nsCOMPtr<nsIDOMNode> domNode(do_QueryElementAt(domNodeArray, index));
      if (aNode == domNode) {
        *aResult = aNodeOffset + totalLength;
        break;
      }
      nsCOMPtr<nsIDOMText> domText(do_QueryInterface(domNode));
      if (domText) {
        domText->GetLength(&textLength);
        totalLength += textLength;
      }
    }

    return NS_OK;
  }

  nsCOMPtr<nsIEditor> editor(do_QueryInterface(aClosure));
  if (editor) { // revised according to nsTextControlFrame::DOMPointToOffset
    // Editable text, calculate the offset from the editor
    nsCOMPtr<nsIDOMElement> rootElement;
    editor->GetRootElement(getter_AddRefs(rootElement));
    nsCOMPtr<nsIDOMNode> rootNode(do_QueryInterface(rootElement));

    NS_ENSURE_TRUE(rootNode, NS_ERROR_FAILURE);

    nsCOMPtr<nsIDOMNodeList> nodeList;

    nsresult rv = rootNode->GetChildNodes(getter_AddRefs(nodeList));
    NS_ENSURE_SUCCESS(rv, rv);
    NS_ENSURE_TRUE(nodeList, NS_ERROR_FAILURE);

    PRUint32 length = 0;
    rv = nodeList->GetLength(&length);
    NS_ENSURE_SUCCESS(rv, rv);

    if (!length || aNodeOffset < 0)
      return NS_OK;

    PRInt32 i, textOffset = 0;
    PRInt32 lastIndex = (PRInt32)length - 1;

    for (i = 0; i < (PRInt32)length; i++) {
      if (rootNode == aNode && i == aNodeOffset) {
        *aResult = textOffset;
        return NS_OK;
      }

      nsCOMPtr<nsIDOMNode> item;
      rv = nodeList->Item(i, getter_AddRefs(item));
      NS_ENSURE_SUCCESS(rv, rv);
      NS_ENSURE_TRUE(item, NS_ERROR_FAILURE);

      if (item == aNode) {
        *aResult = textOffset + aNodeOffset;
        return NS_OK;
      }

      nsCOMPtr<nsIDOMText> domText(do_QueryInterface(item));

      if (domText) {
        PRUint32 textLength = 0;

        rv = domText->GetLength(&textLength);
        NS_ENSURE_SUCCESS(rv, rv);

        textOffset += textLength;
      }
      else {
        // Must be a BR node. If it's not the last BR node
        // under the root, count it as a newline.
        if (i != lastIndex)
          ++textOffset;
      }
    }

    NS_ASSERTION((aNode == rootNode && aNodeOffset == (PRInt32)length),
                 "Invalid node offset!");

    *aResult = textOffset;
  }

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void nsIDocumentObserver::EndLoad ( nsIDocument aDocument) [pure virtual, inherited]

Notify the observer that a document load has finished.

Note that the associated reflow of the document will be done before EndLoad is invoked, not after.

Implemented in PresShell.

virtual void nsIDocumentObserver::EndReflow ( nsIDocument aDocument,
nsIPresShell aShell 
) [pure virtual, inherited]

Notify the observer that the document is done being reflowed in the given presentation shell.

virtual void nsIDocumentObserver::EndUpdate ( nsIDocument aDocument,
nsUpdateType  aUpdateType 
) [pure virtual, inherited]

Notify that a content model update is finished.

This call can be nested.

Implemented in PresShell, HTMLContentSink, and nsXMLPrettyPrinter.

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

void nsRootAccessible::FireAccessibleFocusEvent ( nsIAccessible focusAccessible,
nsIDOMNode focusNode,
nsIDOMEvent aFocusEvent,
PRBool  aForceEvent = PR_FALSE 
) [protected]

Definition at line 427 of file nsRootAccessible.cpp.

{
  NS_ASSERTION(aAccessible, "Attempted to fire focus event for no accessible");

  if (mCaretAccessible) {
    nsCOMPtr<nsIDOMNSEvent> nsevent(do_QueryInterface(aFocusEvent));
    if (nsevent) {
      // Use the originally focused node where the selection lives.
      // For example, use the anonymous HTML:input instead of the containing
      // XUL:textbox. In this case, sometimes it is a later focus event
      // which points to the actual anonymous child with focus, so to be safe 
      // we need to reset the selection listener every time.
      // This happens because when some bindings handle focus, they retarget
      // focus to the appropriate child inside of themselves, but DOM focus
      // stays outside on that binding parent.
      nsCOMPtr<nsIDOMEventTarget> domEventTarget;
      nsevent->GetOriginalTarget(getter_AddRefs(domEventTarget));
      nsCOMPtr<nsIDOMNode> realFocusedNode = do_QueryInterface(domEventTarget);
      mCaretAccessible->AttachNewSelectionListener(realFocusedNode);
    }
  }

  // Fire focus only if it changes, but always fire focus events when aForceEvent == PR_TRUE
  if (gLastFocusedNode == aNode && !aForceEvent) {
    return;
  }

  nsCOMPtr<nsPIAccessible> privateAccessible =
    do_QueryInterface(aAccessible);
  NS_ASSERTION(privateAccessible , "No nsPIAccessible for nsIAccessible");

  // Use focus events on DHTML menuitems to indicate when to fire menustart and menuend
  // Special dynamic content handling
  PRUint32 role = ROLE_NOTHING;
  aAccessible->GetFinalRole(&role);
  if (role == ROLE_MENUITEM) {
    if (!mIsInDHTMLMenu) {  // Entering menus
      PRUint32 naturalRole; // The natural role is the role that this type of element normally has
      aAccessible->GetRole(&naturalRole);
      if (role != naturalRole) { // Must be a DHTML menuitem
         FireToolkitEvent(nsIAccessibleEvent::EVENT_MENUSTART, this, nsnull);
         mIsInDHTMLMenu = ROLE_MENUITEM;
      }
    }
  }
  else if (mIsInDHTMLMenu) {
    FireToolkitEvent(nsIAccessibleEvent::EVENT_MENUEND, this, nsnull);
    mIsInDHTMLMenu = PR_FALSE;
  }

  NS_IF_RELEASE(gLastFocusedNode);
  gLastFocusedNode = aNode;
  NS_IF_ADDREF(gLastFocusedNode);

  privateAccessible->FireToolkitEvent(nsIAccessibleEvent::EVENT_FOCUS,
                                      aAccessible, nsnull);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 331 of file nsDocAccessibleWrap.cpp.

{
  // Staying on the same page, jumping to a named anchor
  // Fire EVENT_SCROLLINGSTART on first leaf accessible -- because some
  // assistive technologies only cache the child numbers for leaf accessibles
  // the can only relate events back to their internal model if it's a leaf.
  // There is usually an accessible for the focus node, but if it's an empty text node
  // we have to move forward in the document to get one
  if (!mIsContentLoaded || !mDocument) {
    return NS_OK;
  }
  nsCOMPtr<nsISupports> container = mDocument->GetContainer();
  nsCOMPtr<nsIWebNavigation> webNav(do_GetInterface(container));
  nsCAutoString theURL;
  if (webNav) {
    nsCOMPtr<nsIURI> pURI;
    webNav->GetCurrentURI(getter_AddRefs(pURI));
    if (pURI) {
      pURI->GetSpec(theURL);
    }
  }
  const char kHash = '#';
  PRBool hasAnchor = PR_FALSE;
  PRInt32 hasPosition = theURL.FindChar(kHash);
  if (hasPosition > 0 && hasPosition < (PRInt32)theURL.Length() - 1) {
    hasAnchor = PR_TRUE;
  }

  // mWasAnchor is set when the previous URL included a named anchor.
  // This way we still know to fire the EVENT_SCROLLINGSTART event when we
  // move from a named anchor back to the top.
  if (!mWasAnchor && !hasAnchor) {
    return NS_OK;
  }
  mWasAnchor = hasAnchor;

  nsCOMPtr<nsIDOMNode> focusNode;
  if (hasAnchor) {
    nsCOMPtr<nsISelectionController> selCon(do_QueryReferent(mWeakShell));
    if (!selCon) {
      return NS_OK;
    }
    nsCOMPtr<nsISelection> domSel;
    selCon->GetSelection(nsISelectionController::SELECTION_NORMAL, getter_AddRefs(domSel));
    if (!domSel) {
      return NS_OK;
    }
    domSel->GetFocusNode(getter_AddRefs(focusNode));
  }
  else {
    focusNode = mDOMNode; // Moved to top, so event is for 1st leaf after root
  }

  nsCOMPtr<nsIAccessible> accessible = GetFirstLeafAccessible(focusNode);
  nsCOMPtr<nsPIAccessible> privateAccessible = do_QueryInterface(accessible);
  if (privateAccessible) {
    privateAccessible->FireToolkitEvent(nsIAccessibleEvent::EVENT_SCROLLINGSTART,
                                        accessible, nsnull);
  }
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 488 of file nsRootAccessible.cpp.

{
  nsCOMPtr<nsIDOMWindow> domWin;
  GetWindow(getter_AddRefs(domWin));
  nsCOMPtr<nsPIDOMWindow> privateDOMWindow(do_QueryInterface(domWin));
  if (!privateDOMWindow) {
    return;
  }
  nsIFocusController *focusController = privateDOMWindow->GetRootFocusController();
  if (!focusController) {
    return;
  }
  nsCOMPtr<nsIDOMElement> focusedElement;
  focusController->GetFocusedElement(getter_AddRefs(focusedElement));
  nsCOMPtr<nsIDOMNode> focusedNode(do_QueryInterface(focusedElement));
  if (!focusedNode) {
    // Document itself may have focus
    nsCOMPtr<nsIDOMWindowInternal> focusedWinInternal;
    focusController->GetFocusedWindow(getter_AddRefs(focusedWinInternal));
    if (focusedWinInternal) {
      nsCOMPtr<nsIDOMDocument> focusedDOMDocument;
      focusedWinInternal->GetDocument(getter_AddRefs(focusedDOMDocument));
      focusedNode = do_QueryInterface(focusedDOMDocument);
    }
    if (!focusedNode) {
      return;  // Could not get a focused document either
    }
  }

  // Simulate a focus event so that we can reuse code that fires focus for container children like treeitems
  nsIContent *rootContent = mDocument->GetRootContent();
  nsPresContext *presContext = GetPresContext();
  if (rootContent && presContext) {
    nsCOMPtr<nsIDOMEvent> event;
    nsCOMPtr<nsIEventListenerManager> manager;
    rootContent->GetListenerManager(getter_AddRefs(manager));
    if (manager && NS_SUCCEEDED(manager->CreateEvent(presContext, nsnull,
                                                     NS_LITERAL_STRING("Events"),
                                                     getter_AddRefs(event))) &&
        NS_SUCCEEDED(event->InitEvent(NS_LITERAL_STRING("focus"), PR_TRUE, PR_TRUE))) {
      HandleEvent(event);
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsDocAccessible::FireDelayedToolkitEvent ( PRUint32  aEvent,
nsIDOMNode aDOMNode,
void aData,
PRBool  aAllowDupes = PR_FALSE 
) [protected, inherited]

Definition at line 908 of file nsDocAccessible.cpp.

{
  PRBool isTimerStarted = PR_TRUE;
  PRInt32 numQueuedEvents = mEventsToFire.Count();
    if (!mFireEventTimer) {
      // Do not yet have a timer going for firing another event.
      mFireEventTimer = do_CreateInstance("@mozilla.org/timer;1");
      NS_ENSURE_TRUE(mFireEventTimer, NS_ERROR_OUT_OF_MEMORY);
    }
  if (numQueuedEvents == 0) {
    isTimerStarted = PR_FALSE;
  }
  else if (!aAllowDupes) {
    // Check for repeat events. If a redundant event exists remove
    // original and put the new event at the end of the queue
    // so it is fired after the others
    for (PRInt32 index = 0; index < numQueuedEvents; index ++) {
      nsIAccessibleEvent *accessibleEvent = mEventsToFire[index];
      NS_ASSERTION(accessibleEvent, "Array item is not an accessible event");
      if (!accessibleEvent) {
        continue;
      }
      PRUint32 eventType;
      accessibleEvent->GetEventType(&eventType);
      if (eventType == aEvent) {
        nsCOMPtr<nsIDOMNode> domNode;
        accessibleEvent->GetDOMNode(getter_AddRefs(domNode));
        if (domNode == aDOMNode) {
          mEventsToFire.RemoveObjectAt(index);
          -- index;
          -- numQueuedEvents;
        }
      }
    }
  }

  // XXX Add related data for ATK support.
  // For example, state change event should provide what state has changed,
  // as well as the old and new value.
  nsCOMPtr<nsIAccessibleEvent> event =
    new nsAccessibleEventData(aEvent, aDOMNode, this, aData);
  NS_ENSURE_TRUE(event, NS_ERROR_OUT_OF_MEMORY);
  mEventsToFire.AppendObject(event);
  if (!isTimerStarted) {
    // This is be the first delayed event in queue, start timer
    // so that event gets fired via FlushEventsCallback
    mFireEventTimer->InitWithFuncCallback(FlushEventsCallback,
                                          NS_STATIC_CAST(nsPIAccessibleDocument*, this),
                                          0, nsITimer::TYPE_ONE_SHOT);
  }
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 542 of file nsDocAccessibleWrap.cpp.

{
  if (!mDocument || !mWeakShell)
    return NS_OK;  // Document has been shut down

  if (!aIsFinished) {
    // Load has been verified, it will occur, about to commence
    AtkChildrenChange childrenData;
    childrenData.index = -1;
    childrenData.child = 0;
    childrenData.add = PR_FALSE;
    FireToolkitEvent(nsIAccessibleEvent::EVENT_REORDER, this, &childrenData);
  }

  return nsDocAccessible::FireDocLoadingEvent(aIsFinished);
}

Here is the call graph for this function:

void nsRootAccessible::FireFocusCallback ( nsITimer aTimer,
void aClosure 
) [static, private]

Definition at line 970 of file nsRootAccessible.cpp.

{
  nsRootAccessible *rootAccessible = NS_STATIC_CAST(nsRootAccessible*, aClosure);
  NS_ASSERTION(rootAccessible, "How did we get here without a root accessible?");
  rootAccessible->FireCurrentFocusEvent();
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsAccessibleEditableText::FireTextChangeEvent ( AtkTextChange aTextData) [protected, inherited]

Definition at line 941 of file nsAccessibleText.cpp.

{
  nsCOMPtr<nsIAccessible> accessible(do_QueryInterface(NS_STATIC_CAST(nsIAccessibleText*, this)));
  nsCOMPtr<nsPIAccessible> privAccessible(do_QueryInterface(accessible));
  if (privAccessible) {
#ifdef DEBUG
    printf("  [start=%d, length=%d, add=%d]\n", aTextData->start, aTextData->length, aTextData->add);
#endif
    privAccessible->FireToolkitEvent(nsIAccessibleEvent::EVENT_ATK_TEXT_CHANGE, accessible, aTextData);
  }

  return NS_OK;
}

Here is the call graph for this function:

NS_IMETHOD nsDocAccessibleWrap::FireToolkitEvent ( PRUint32  aEvent,
nsIAccessible aAccessible,
void aData 
) [inherited]

Reimplemented from nsDocAccessible.

NS_IMETHOD nsDocAccessibleWrap::FireToolkitEvent ( PRUint32  aEvent,
nsIAccessible aAccessible,
void aData 
) [inherited]

Reimplemented from nsDocAccessible.

void nsPIAccessible::fireToolkitEvent ( in unsigned long  aEvent,
in nsIAccessible  aTarget,
in voidPtr  aData 
) [inherited]
NS_IMETHODIMP nsDocAccessibleWrap::FireToolkitEvent ( PRUint32  aEvent,
nsIAccessible aAccessible,
void aData 
) [inherited]

Reimplemented from nsDocAccessible.

Definition at line 87 of file nsDocAccessibleWrap.cpp.

{
    NS_ENSURE_ARG_POINTER(aAccessible);

    // First fire nsIObserver event for internal xpcom accessibility clients
    nsDocAccessible::FireToolkitEvent(aEvent, aAccessible, aEventData);

    nsresult rv = NS_ERROR_FAILURE;

    nsAccessibleWrap *accWrap =
        NS_STATIC_CAST(nsAccessibleWrap *, aAccessible);
    MAI_LOG_DEBUG(("\n\nReceived event: aEvent=%u, obj=0x%x, data=0x%x \n",
                   aEvent, aAccessible, aEventData));

    nsAccessibleWrap *oldAccWrap = nsnull, *newAccWrap = nsnull;
    AtkTableChange * pAtkTableChange = nsnull;

    switch (aEvent) {
    case nsIAccessibleEvent::EVENT_FOCUS:
        MAI_LOG_DEBUG(("\n\nReceived: EVENT_FOCUS\n"));
        atk_focus_tracker_notify(accWrap->GetAtkObject());
        rv = NS_OK;
        break;

    case nsIAccessibleEvent::EVENT_STATE_CHANGE:
        AtkStateChange *pAtkStateChange;
        AtkStateType atkState;

        MAI_LOG_DEBUG(("\n\nReceived: EVENT_STATE_CHANGE\n"));
        if (!aEventData)
            break;

        pAtkStateChange = NS_REINTERPRET_CAST(AtkStateChange *, aEventData);

        switch (pAtkStateChange->state) {
        case nsIAccessible::STATE_INVISIBLE:
            atkState = ATK_STATE_VISIBLE;
            pAtkStateChange->enable = !pAtkStateChange->enable;
            break;
        case nsIAccessible::STATE_UNAVAILABLE:
            atkState = ATK_STATE_ENABLED;
            pAtkStateChange->enable = !pAtkStateChange->enable;
            break;
        case nsIAccessible::STATE_READONLY:
            atkState = ATK_STATE_EDITABLE;
            pAtkStateChange->enable = !pAtkStateChange->enable;
            break;
        default:
            atkState = TranslateAState(pAtkStateChange->state, pAtkStateChange->extState);
        }

        atk_object_notify_state_change(accWrap->GetAtkObject(),
                                       atkState, pAtkStateChange->enable);
        rv = NS_OK;
        break;
      
        /*
         * More complex than I ever thought.
         * Need handle them separately.
         */
    case nsIAccessibleEvent::EVENT_ATK_PROPERTY_CHANGE :
        AtkPropertyChange *pAtkPropChange;
        AtkPropertyValues values;

        MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_PROPERTY_CHANGE\n"));
        if (!aEventData)
            break;

        pAtkPropChange = NS_REINTERPRET_CAST(AtkPropertyChange *, aEventData);
        values.property_name = sAtkPropertyNameArray[pAtkPropChange->type];
        
        MAI_LOG_DEBUG(("\n\nthe type of EVENT_ATK_PROPERTY_CHANGE: %d\n\n",
                       pAtkPropChange->type));

        switch (pAtkPropChange->type) {
        case PROP_TABLE_CAPTION:
        case PROP_TABLE_SUMMARY:

            if (pAtkPropChange->oldvalue)
                oldAccWrap = NS_REINTERPRET_CAST(nsAccessibleWrap *,
                                                 pAtkPropChange->oldvalue);

            if (pAtkPropChange->newvalue)
                newAccWrap = NS_REINTERPRET_CAST(nsAccessibleWrap *,
                                                 pAtkPropChange->newvalue);

            if (oldAccWrap && newAccWrap) {
                g_value_init(&values.old_value, G_TYPE_POINTER);
                g_value_set_pointer(&values.old_value,
                                    oldAccWrap->GetAtkObject());
                g_value_init(&values.new_value, G_TYPE_POINTER);
                g_value_set_pointer(&values.new_value,
                                    newAccWrap->GetAtkObject());
                rv = NS_OK;
            }
            break;

        case PROP_TABLE_COLUMN_DESCRIPTION:
        case PROP_TABLE_COLUMN_HEADER:
        case PROP_TABLE_ROW_HEADER:
        case PROP_TABLE_ROW_DESCRIPTION:
            g_value_init(&values.new_value, G_TYPE_INT);
            g_value_set_int(&values.new_value,
                            *NS_REINTERPRET_CAST(gint *,
                                                 pAtkPropChange->newvalue));
            rv = NS_OK;
            break;
  
            //Perhaps need more cases in the future
        default:
            g_value_init (&values.old_value, G_TYPE_POINTER);
            g_value_set_pointer (&values.old_value, pAtkPropChange->oldvalue);
            g_value_init (&values.new_value, G_TYPE_POINTER);
            g_value_set_pointer (&values.new_value, pAtkPropChange->newvalue);
            rv = NS_OK;
        }
        if (NS_SUCCEEDED(rv)) {
            char *signal_name = g_strconcat("property_change::",
                                            values.property_name, NULL);
            g_signal_emit_by_name(accWrap->GetAtkObject(), signal_name,
                                  &values, NULL);
            g_free (signal_name);
        }

        break;

    case nsIAccessibleEvent::EVENT_ATK_SELECTION_CHANGE:
        MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_SELECTION_CHANGE\n"));
        g_signal_emit_by_name(accWrap->GetAtkObject(),
                              "selection_changed");
        rv = NS_OK;
        break;

    case nsIAccessibleEvent::EVENT_ATK_TEXT_CHANGE:
        AtkTextChange *pAtkTextChange;

        MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_TEXT_CHANGE\n"));
        if (!aEventData)
            break;

        pAtkTextChange = NS_REINTERPRET_CAST(AtkTextChange *, aEventData);
        g_signal_emit_by_name (accWrap->GetAtkObject(),
                               pAtkTextChange->add ? \
                               "text_changed::insert":"text_changed::delete",
                               pAtkTextChange->start,
                               pAtkTextChange->length);
        rv = NS_OK;
        break;

    case nsIAccessibleEvent::EVENT_ATK_TEXT_SELECTION_CHANGE:
        MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_TEXT_SELECTION_CHANGE\n"));
        g_signal_emit_by_name(accWrap->GetAtkObject(),
                              "text_selection_changed");
        rv = NS_OK;
        break;

    case nsIAccessibleEvent::EVENT_ATK_TEXT_CARET_MOVE:
        MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_TEXT_CARET_MOVE\n"));
        if (!aEventData)
            break;

        MAI_LOG_DEBUG(("\n\nCaret postion: %d", *(gint *)aEventData ));
        g_signal_emit_by_name(accWrap->GetAtkObject(),
                              "text_caret_moved",
                              // Curent caret position
                              *(gint *)aEventData);
        rv = NS_OK;
        break;

    case nsIAccessibleEvent::EVENT_ATK_TABLE_MODEL_CHANGE:
        MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_TABLE_MODEL_CHANGE\n"));
        g_signal_emit_by_name(accWrap->GetAtkObject(),
                              "model_changed");
        rv = NS_OK;
        break;

    case nsIAccessibleEvent::EVENT_ATK_TABLE_ROW_INSERT:
        MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_TABLE_ROW_INSERT\n"));
        if (!aEventData)
            break;

        pAtkTableChange = NS_REINTERPRET_CAST(AtkTableChange *, aEventData);

        g_signal_emit_by_name(accWrap->GetAtkObject(),
                              "row_inserted",
                              // After which the rows are inserted
                              pAtkTableChange->index,
                              // The number of the inserted
                              pAtkTableChange->count);
        rv = NS_OK;
        break;
        
    case nsIAccessibleEvent::EVENT_ATK_TABLE_ROW_DELETE:
        MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_TABLE_ROW_DELETE\n"));
        if (!aEventData)
            break;

        pAtkTableChange = NS_REINTERPRET_CAST(AtkTableChange *, aEventData);

        g_signal_emit_by_name(accWrap->GetAtkObject(),
                              "row_deleted",
                              // After which the rows are deleted
                              pAtkTableChange->index,
                              // The number of the deleted
                              pAtkTableChange->count);
        rv = NS_OK;
        break;
        
    case nsIAccessibleEvent::EVENT_ATK_TABLE_ROW_REORDER:
        MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_TABLE_ROW_REORDER\n"));
        g_signal_emit_by_name(accWrap->GetAtkObject(),
                              "row_reordered");
        rv = NS_OK;
        break;

    case nsIAccessibleEvent::EVENT_ATK_TABLE_COLUMN_INSERT:
        MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_TABLE_COLUMN_INSERT\n"));
        if (!aEventData)
            break;

        pAtkTableChange = NS_REINTERPRET_CAST(AtkTableChange *, aEventData);

        g_signal_emit_by_name(accWrap->GetAtkObject(),
                              "column_inserted",
                              // After which the columns are inserted
                              pAtkTableChange->index,
                              // The number of the inserted
                              pAtkTableChange->count);
        rv = NS_OK;
        break;

    case nsIAccessibleEvent::EVENT_ATK_TABLE_COLUMN_DELETE:
        MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_TABLE_COLUMN_DELETE\n"));
        if (!aEventData)
            break;

        pAtkTableChange = NS_REINTERPRET_CAST(AtkTableChange *, aEventData);

        g_signal_emit_by_name(accWrap->GetAtkObject(),
                              "column_deleted",
                              // After which the columns are deleted
                              pAtkTableChange->index,
                              // The number of the deleted
                              pAtkTableChange->count);
        rv = NS_OK;
        break;

    case nsIAccessibleEvent::EVENT_ATK_TABLE_COLUMN_REORDER:
        MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_TABLE_COLUMN_REORDER\n"));
        g_signal_emit_by_name(accWrap->GetAtkObject(),
                              "column_reordered");
        rv = NS_OK;
        break;

    case nsIAccessibleEvent::EVENT_ATK_VISIBLE_DATA_CHANGE:
        MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_VISIBLE_DATA_CHANGE\n"));
        g_signal_emit_by_name(accWrap->GetAtkObject(),
                              "visible_data_changed");
        rv = NS_OK;
        break;

    case nsIAccessibleEvent::EVENT_ATK_LINK_SELECTED:
        MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_LINK_SELECTED\n"));
        atk_focus_tracker_notify(accWrap->GetAtkObject());
        g_signal_emit_by_name(accWrap->GetAtkObject(),
                              "link_selected",
                              // Selected link index 
                              *(gint *)aEventData);
        rv = NS_OK;
        break;

        // Is a superclass of ATK event children_changed
    case nsIAccessibleEvent::EVENT_REORDER:
        AtkChildrenChange *pAtkChildrenChange;

        MAI_LOG_DEBUG(("\n\nReceived: EVENT_REORDER(children_change)\n"));

        pAtkChildrenChange = NS_REINTERPRET_CAST(AtkChildrenChange *,
                                                 aEventData);
        nsAccessibleWrap *childAccWrap;
        if (pAtkChildrenChange && pAtkChildrenChange->child) {
            childAccWrap = NS_STATIC_CAST(nsAccessibleWrap *,
                                          pAtkChildrenChange->child);
            g_signal_emit_by_name (accWrap->GetAtkObject(),
                                   pAtkChildrenChange->add ? \
                                   "children_changed::add" : \
                                   "children_changed::remove",
                                   pAtkChildrenChange->index,
                                   childAccWrap->GetAtkObject(),
                                   NULL);
        }
        else {
            //
            // EVENT_REORDER is normally fired by "HTML Document".
            //
            // In GOK, [only] "children_changed::add" can cause foreground
            // window accessible to update it children, which will
            // refresh "UI-Grab" window.
            //
            g_signal_emit_by_name (accWrap->GetAtkObject(),
                                   "children_changed::add",
                                   -1, NULL, NULL);
        }

        rv = NS_OK;
        break;

        /*
         * Because dealing with menu is very different between nsIAccessible
         * and ATK, and the menu activity is important, specially transfer the
         * following two event.
         * Need more verification by AT test.
         */
    case nsIAccessibleEvent::EVENT_MENUSTART:
        MAI_LOG_DEBUG(("\n\nReceived: EVENT_MENUSTART\n"));
        atk_focus_tracker_notify(accWrap->GetAtkObject());
        g_signal_emit_by_name(accWrap->GetAtkObject(),
                              "selection_changed");
        rv = NS_OK;
        break;

    case nsIAccessibleEvent::EVENT_MENUEND:
        MAI_LOG_DEBUG(("\n\nReceived: EVENT_MENUEND\n"));
        g_signal_emit_by_name(accWrap->GetAtkObject(),
                              "selection_changed");
        rv = NS_OK;
        break;

    case nsIAccessibleEvent::EVENT_ATK_WINDOW_ACTIVATE:
      {
        MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_WINDOW_ACTIVATED\n"));
        AtkObject *accessible = accWrap->GetAtkObject();
        guint id = g_signal_lookup ("activate", MAI_TYPE_ATK_OBJECT);
        g_signal_emit(accessible, id, 0);
        rv = NS_OK;
      } break;

    case nsIAccessibleEvent::EVENT_ATK_WINDOW_DEACTIVATE:
      {
        MAI_LOG_DEBUG(("\n\nReceived: EVENT_ATK_WINDOW_DEACTIVATED\n"));
        AtkObject *accessible = accWrap->GetAtkObject();
        guint id = g_signal_lookup ("deactivate", MAI_TYPE_ATK_OBJECT);
        g_signal_emit(accessible, id, 0);
        rv = NS_OK;
      } break;

    default:
        // Don't transfer others
        MAI_LOG_DEBUG(("\n\nReceived an unknown event=0x%u\n", aEvent));
        break;
    }

    return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHOD nsDocAccessibleWrap::FireToolkitEvent ( PRUint32  aEvent,
nsIAccessible aAccessible,
void aData 
) [inherited]

Reimplemented from nsDocAccessible.

void nsDocAccessible::FlushEventsCallback ( nsITimer aTimer,
void aClosure 
) [static, inherited]

Definition at line 984 of file nsDocAccessible.cpp.

{
  nsPIAccessibleDocument *accessibleDoc = NS_STATIC_CAST(nsPIAccessibleDocument*, aClosure);
  NS_ASSERTION(accessibleDoc, "How did we get here without an accessible document?");
  accessibleDoc->FlushPendingEvents();
}

Here is the caller graph for this function:

Processes a focus event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMFocusListener.

Definition at line 979 of file nsRootAccessible.cpp.

{ 
  return HandleEvent(aEvent);
}

Here is the call graph for this function:

STDMETHODIMP nsDocAccessibleWrap::get_accChild ( VARIANT  varChild,
IDispatch __RPC_FAR *__RPC_FAR *  ppdispChild 
) [virtual, inherited]

Reimplemented from nsAccessibleWrap.

Definition at line 120 of file nsDocAccessibleWrap.cpp.

{
  *ppdispChild = NULL;

  if (varChild.vt == VT_I4 && varChild.lVal < 0) {
    // AccessibleObjectFromEvent() being called
    // that's why the lVal < 0
    nsCOMPtr<nsIAccessible> xpAccessible;
    GetXPAccessibleFor(varChild, getter_AddRefs(xpAccessible));
    if (xpAccessible) {
      IAccessible *msaaAccessible;
      xpAccessible->GetNativeInterface((void**)&msaaAccessible);
      *ppdispChild = NS_STATIC_CAST(IDispatch*, msaaAccessible);
      return S_OK;
    }
    else if (mDocument) {
      // If child ID from event can't be found in this window, ask parent.
      // This is especially relevant for times when a xul menu item
      // has focus, but the system thinks the content window has focus.
      nsIDocument* parentDoc = mDocument->GetParentDocument();
      if (parentDoc) {
        nsIPresShell *parentShell = parentDoc->GetShellAt(0);
        nsCOMPtr<nsIWeakReference> weakParentShell(do_GetWeakReference(parentShell));
        if (weakParentShell) {
          nsCOMPtr<nsIAccessibleDocument> parentDocAccessible = 
            nsAccessNode::GetDocAccessibleFor(weakParentShell);
          nsCOMPtr<nsIAccessible> accessible(do_QueryInterface(parentDocAccessible));
          IAccessible *msaaParentDoc;
          if (accessible) {
            accessible->GetNativeInterface((void**)&msaaParentDoc);
            HRESULT rv = msaaParentDoc->get_accChild(varChild, ppdispChild);
            msaaParentDoc->Release();
            return rv;
          }
        }
      }
    }
    return E_FAIL;
  }

  // Otherwise, the normal get_accChild() will do
  return nsAccessibleWrap::get_accChild(varChild, ppdispChild);
}

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 nsDocAccessibleWrap::get_docType ( BSTR __RPC_FAR *  docType) [virtual, inherited]

Definition at line 515 of file nsDocAccessibleWrap.cpp.

{
  *aDocType = NULL;
  nsAutoString docType;
  if (NS_SUCCEEDED(GetDocType(docType))) {
    *aDocType= ::SysAllocString(docType.get());
    return S_OK;
  }
  return E_FAIL;
}

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 nsDocAccessibleWrap::get_mimeType ( BSTR __RPC_FAR *  mimeType) [virtual, inherited]

Definition at line 504 of file nsDocAccessibleWrap.cpp.

{
  *aMimeType = NULL;
  nsAutoString mimeType;
  if (NS_SUCCEEDED(GetMimeType(mimeType))) {
    *aMimeType= ::SysAllocString(mimeType.get());
    return S_OK;
  }
  return E_FAIL;
}

Here is the call graph for this function:

STDMETHODIMP nsDocAccessibleWrap::get_nameSpaceURIForID ( short  nameSpaceID,
BSTR __RPC_FAR *  nameSpaceURI 
) [virtual, inherited]

Definition at line 526 of file nsDocAccessibleWrap.cpp.

{
  *aNameSpaceURI = NULL;
  nsAutoString nameSpaceURI;
  if (NS_SUCCEEDED(GetNameSpaceURIForID(aNameSpaceID, nameSpaceURI))) {
    *aNameSpaceURI = ::SysAllocString(nameSpaceURI.get());
    return S_OK;
  }
  return E_FAIL;
}

Here is the call graph for this function:

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:

STDMETHODIMP nsDocAccessibleWrap::get_title ( BSTR __RPC_FAR *  title) [virtual, inherited]

Definition at line 493 of file nsDocAccessibleWrap.cpp.

{
  *aTitle = NULL;
  nsAutoString title;
  if (NS_SUCCEEDED(GetTitle(title))) { // getter_Copies(pszTitle)))) {
    *aTitle= ::SysAllocString(title.get());
    return S_OK;
  }
  return E_FAIL;
}

Here is the call graph for this function:

STDMETHODIMP nsDocAccessibleWrap::get_URL ( BSTR __RPC_FAR *  url) [virtual, inherited]

Definition at line 482 of file nsDocAccessibleWrap.cpp.

{
  *aURL = NULL;
  nsAutoString URL;
  if (NS_SUCCEEDED(GetURL(URL))) {
    *aURL= ::SysAllocString(URL.get());
    return S_OK;
  }
  return E_FAIL;
}

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]

Returns the first accessible parent of a DOM node.

Guaranteed not to return nsnull if the DOM node is in a document.

Parameters:
aDOMNodeThe DOM node we need an accessible for.
Returns:
An first nsIAccessible found by crawling up the DOM node to the document root.

Definition at line 1100 of file nsRootAccessible.cpp.

{
  *aRelated = nsnull;

  if (!mDOMNode || aRelationType != RELATION_EMBEDS) {
    return nsDocAccessibleWrap::GetAccessibleRelated(aRelationType, aRelated);
  }

  nsCOMPtr<nsIDocShellTreeItem> treeItem = GetDocShellTreeItemFor(mDOMNode);   
  nsCOMPtr<nsIDocShellTreeItem> contentTreeItem = GetContentDocShell(treeItem);
  nsCOMPtr<nsIAccessibleDocument> accDoc = GetDocAccessibleFor(contentTreeItem);
  return accDoc->QueryInterface(NS_GET_IID(nsIAccessible), (void**)aRelated);
}

Here is the call graph for this function:

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.

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:

nsISupports nsIAccessibleText::getAttributeRange ( in long  offset,
out long  rangeStartOffset,
out long  rangeEndOffset 
) [inherited]
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 nsDocAccessible::GetBoundsRect ( nsRect aRect,
nsIFrame **  aRelativeFrame 
) [protected, virtual, inherited]

Reimplemented from nsAccessible.

Definition at line 501 of file nsDocAccessible.cpp.

{
  *aRelativeFrame = GetFrame();

  nsIDocument *document = mDocument;
  nsIDocument *parentDoc = nsnull;

  while (document) {
    nsIPresShell *presShell = document->GetShellAt(0);
    if (!presShell) {
      return;
    }
    nsIViewManager* vm = presShell->GetViewManager();
    if (!vm) {
      return;
    }

    nsIScrollableView* scrollableView = nsnull;
    vm->GetRootScrollableView(&scrollableView);

    nsRect viewBounds(0, 0, 0, 0);
    if (scrollableView) {
      viewBounds = scrollableView->View()->GetBounds();
    }
    else {
      nsIView *view;
      vm->GetRootView(view);
      if (view) {
        viewBounds = view->GetBounds();
      }
    }

    if (parentDoc) {  // After first time thru loop
      aBounds.IntersectRect(viewBounds, aBounds);
    }
    else {  // First time through loop
      aBounds = viewBounds;
    }

    document = parentDoc = document->GetParentDocument();
  }
}

Here is the call graph for this function:

nsIAccessNode nsIAccessibleDocument::getCachedAccessNode ( in voidPtr  aUniqueID) [inherited]

Returns the access node cached by this document.

Parameters:
aUniqueIDThe unique ID used to cache the node. This matches up with the uniqueID attribute on nsIAccessNode.
Returns:
The nsIAccessNode cached for this particular unique ID.
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:

Definition at line 355 of file nsRootAccessible.cpp.

{
  *aCaretAccessible = nsnull;
  if (mCaretAccessible) {
    CallQueryInterface(mCaretAccessible, aCaretAccessible);
  }

  return NS_OK;
}

Here is the call graph for this function:

nsIAccessibleText impl.

Definition at line 1125 of file nsAccessibleText.cpp.

{
  *aCaretOffset = 0;

  PRInt32 startPos, endPos;
  nsresult rv = GetSelectionRange(&startPos, &endPos);
  NS_ENSURE_SUCCESS(rv, rv);

  if (startPos == endPos) { // selection must be collapsed
    *aCaretOffset = startPos;
    return NS_OK;
  }

  return NS_ERROR_FAILURE;
}

Here is the call graph for this function:

wchar nsIAccessibleText::getCharacterAtOffset ( in long  offset) [inherited]

It would be better to return an unsigned long here, to allow unicode chars > 16 bits.

Definition at line 1152 of file nsAccessibleText.cpp.

{
  *aCharacterCount = 0;

  nsITextControlFrame *textFrame = GetTextFrame();
  if (textFrame) {
    return textFrame->GetTextLength(aCharacterCount);
  }

  NS_ENSURE_TRUE(mPlainEditor, NS_ERROR_FAILURE);
  NS_NAMED_LITERAL_STRING(format, "text/plain");
  nsAutoString text;
  mPlainEditor->OutputToString(format, nsIDocumentEncoder::OutputFormatted, text);
  *aCharacterCount = text.Length();

  return NS_OK;
}

Here is the call graph for this function:

void nsIAccessibleText::getCharacterExtents ( in long  offset,
out long  x,
out long  y,
out long  width,
out long  height,
in nsAccessibleCoordType  coordType 
) [inherited]
nsIAccessible nsIAccessible::getChildAt ( in long  aChildIndex) [inherited]

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

Definition at line 64 of file nsBaseWidgetAccessible.cpp.

{
  *aChildAtPoint = nsnull;
  nsCOMPtr<nsIAccessible> childAtPoint;

  // We're going to find the child that contains coordinates (tx,ty)
  PRInt32 x,y,w,h;
  GetBounds(&x,&y,&w,&h);  // Get bounds for this accessible
  if (tx >= x && tx < x + w && ty >= y && ty < y + h)
  {
    // It's within this nsIAccessible, let's drill down
    nsCOMPtr<nsIAccessible> child;
    nsCOMPtr<nsIAccessible> next;
    GetFirstChild(getter_AddRefs(child));
    PRInt32 cx,cy,cw,ch;  // Child bounds

    while(child) {
      child->GetBounds(&cx,&cy,&cw,&ch);
      
      // if there are multiple accessibles the contain the point 
      // and they overlap then pick the one with a frame that contans the point
      
      // For example, A point that's in block #2 is also in block #1, but we want to return #2:
      // [[block #1 is long wrapped text that continues to
      // another line]]  [[here is a shorter block #2]]

      if (tx >= cx && tx < cx + cw && ty >= cy && ty < cy + ch) 
      {
        // See whether one of the frames for this accessible
        // contains this screen point
        if (!childAtPoint) {
          // Default in case accessible doesn't have a frame such as
          // tree items or combo box dropdown markers
          childAtPoint = child;
        }
        nsCOMPtr<nsPIAccessNode> accessNode(do_QueryInterface(child));
        if (accessNode) {
          nsIFrame *frame = accessNode->GetFrame();
          while (frame) {
            if (frame->GetScreenRectExternal().Contains(tx, ty)) {
              childAtPoint = child;
              break; // Definitely in this accessible, since one of its frame matches the point
            }
            frame = frame->GetNextInFlow();
          }
        }
      }
      child->GetNextSibling(getter_AddRefs(next));
      child = next;
    }

    *aChildAtPoint = childAtPoint ? childAtPoint : this;
    NS_ADDREF(*aChildAtPoint);
  }

  return NS_OK;
}

Here is the call graph for this function:

Accessible child which contains the coordinate at x,y.

PRInt32 nsDocAccessibleWrap::GetChildIDFor ( nsIAccessible aAccessible) [static, inherited]

Definition at line 276 of file nsDocAccessibleWrap.cpp.

{
  // A child ID of the window is required, when we use NotifyWinEvent, so that the 3rd party application
  // can call back and get the IAccessible the event occured on.
  // We use the unique ID exposed through nsIContent::GetContentID()

  void *uniqueID;
  nsCOMPtr<nsIAccessNode> accessNode(do_QueryInterface(aAccessible));
  if (!accessNode) {
    return 0;
  }
  accessNode->GetUniqueID(&uniqueID);

  // Yes, this means we're only compatibible with 32 bit
  // MSAA is only available for 32 bit windows, so it's okay
  return - NS_PTR_TO_INT32(uniqueID);
}

Here is the call graph for this function:

Get the nth child of this node.

Parameters:
childNumZero-based child index
Returns:
The nth nsIAccessNode child

Definition at line 214 of file nsRootAccessible.cpp.

{
  nsCOMPtr<nsIDOMWindow> domWin;
  GetWindow(getter_AddRefs(domWin));
  nsCOMPtr<nsPIDOMWindow> privateDOMWindow(do_QueryInterface(domWin));
  nsCOMPtr<nsIChromeEventHandler> chromeEventHandler;
  if (privateDOMWindow) {
    chromeEventHandler = privateDOMWindow->GetChromeEventHandler();
  }

  nsCOMPtr<nsIDOMEventTarget> target(do_QueryInterface(chromeEventHandler));

  *aChromeTarget = target;
  NS_IF_ADDREF(*aChromeTarget);
}

Here is the call graph for this function:

Here is the caller graph for this function:

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".

Definition at line 1058 of file nsRootAccessible.cpp.

{
  PRInt32 itemType;
  aStart->GetItemType(&itemType);
  if (itemType == nsIDocShellTreeItem::typeContent) {
    nsCOMPtr<nsIAccessibleDocument> accDoc = GetDocAccessibleFor(aStart);
    nsCOMPtr<nsIAccessible> accessible = do_QueryInterface(accDoc);
    // If ancestor chain of accessibles is not completely visible,
    // don't use this one. This happens for example if it's inside
    // a background tab (tabbed browsing)
    while (accessible) {
      PRUint32 state;
      accessible->GetFinalState(&state);
      if (state & STATE_INVISIBLE) {
        return nsnull;
      }
      nsCOMPtr<nsIAccessible> ancestor;
      accessible->GetParent(getter_AddRefs(ancestor));
      accessible.swap(ancestor);
    }

    NS_ADDREF(aStart);
    return aStart;
  }
  nsCOMPtr<nsIDocShellTreeNode> treeNode(do_QueryInterface(aStart));
  if (treeNode) {
    PRInt32 subDocuments;
    treeNode->GetChildCount(&subDocuments);
    for (PRInt32 count = 0; count < subDocuments; count ++) {
      nsCOMPtr<nsIDocShellTreeItem> treeItemChild, contentTreeItem;
      treeNode->GetChildAt(count, getter_AddRefs(treeItemChild));
      NS_ENSURE_TRUE(treeItemChild, nsnull);
      contentTreeItem = GetContentDocShell(treeItemChild);
      if (contentTreeItem) {
        NS_ADDREF(aStart = contentTreeItem);
        return aStart;
      }
    }
  }
  return nsnull;
}

Here is the call graph for this function:

Here is the caller graph for this function:

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:

nsresult nsAccessibleText::GetCurrentOffset ( nsISupports *  aClosure,
nsISelection aDomSel,
PRInt32 aOffset 
) [static, protected, inherited]

Definition at line 321 of file nsAccessibleText.cpp.

{
  nsCOMPtr<nsIDOMNode> focusNode;
  aDomSel->GetFocusNode(getter_AddRefs(focusNode));
  aDomSel->GetFocusOffset(aOffset);
  return DOMPointToOffset(aClosure, focusNode, *aOffset, aOffset);
}

Here is the call graph for this function:

Here is the caller graph for this function: