Logo Search packages:      
Sourcecode: xulrunner version File versions  Download package

NS_IMETHODIMP nsAccessibleTreeWalker::GetNextSibling (  ) 

Moves current state to point to the next child accessible.

Definition at line 180 of file nsAccessibleTreeWalker.cpp.

References GetAccessible(), GetFirstChild(), GetNextDOMNode(), mState, PopState(), and UpdateFrame().

  // Make sure mState.prevState and mState.siblingIndex are initialized so we can walk forward
  NS_ASSERTION(mState.prevState && mState.siblingIndex != eSiblingsUninitialized,
               "Error - GetNextSibling() only works after a GetFirstChild(), so we must have a prevState.");
  mState.accessible = nsnull;

  while (PR_TRUE) {
    // Get next frame

    if (!mState.domNode) {  // Done with current siblings
      PopState();   // Use parent - go up in stack. Can always pop state because we have to start with a GetFirstChild().
      if (!mState.prevState) {
        mState.accessible = nsnull;
        break; // Back to original accessible that we did GetFirstChild() from
    else if ((mState.domNode != mState.prevState->domNode && GetAccessible()) || 
             NS_SUCCEEDED(GetFirstChild())) {
      return NS_OK; // if next is accessible, use it 

Generated by  Doxygen 1.6.0   Back to index