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

void nsAccessibleTreeWalker::UpdateFrame ( PRBool  aTryFirstChild  )  [protected]

Change current state so that its frame is changed to next frame.

aTryFirstChild [in] points whether we should move to child or sibling frame

Definition at line 231 of file nsAccessibleTreeWalker.cpp.

References mState.

Referenced by GetFirstChild(), GetKids(), and GetNextSibling().

  if (!mState.frame) {

  if (aTryFirstChild) {
    // If the frame implements nsIAnonymousContentCreator interface then go down
    // through the frames and obtain anonymous nodes for them.
    nsIAnonymousContentCreator* creator = nsnull;
    CallQueryInterface(mState.frame, &creator);

    mState.frame = mState.frame->GetFirstChild(nsnull);

    if (creator && mState.frame && mState.siblingIndex < 0) {
      mState.domNode = do_QueryInterface(mState.frame->GetContent());
      mState.siblingIndex = eSiblingsWalkFrames;
// temporary workaround for Bug 359210. We never want to walk frames.
// Aaron Leventhal will refix :before and :after content later without walking frames.
#if 0
    if (mState.frame && mState.siblingIndex < 0) {
      // Container frames can contain generated content frames from
      // :before and :after style rules, so we walk their frame trees
      // instead of content trees
      // XXX Walking the frame tree doesn't get us Aural CSS nodes, e.g. 
      // @media screen { display: none; }
      // Asking the style system might be better (with ProbePseudoStyleFor(),
      // except that we need to ask only for those display types that support 
      // :before and :after (which roughly means non-replaced elements)
      // Here's some code to see if there is an :after rule for an element
      // nsRefPtr<nsStyleContext> pseudoContext;
      // nsStyleContext *styleContext = primaryFrame->GetStyleContext();
      // if (aContent) {
      //   pseudoContext = presContext->StyleSet()->
      //     ProbePseudoStyleFor(content, nsAccessibilityAtoms::after, aStyleContext);
      mState.domNode = do_QueryInterface(mState.frame->GetContent());
      mState.siblingIndex = eSiblingsWalkFrames;
  else {
    mState.frame = mState.frame->GetNextSibling();

Generated by  Doxygen 1.6.0   Back to index