Logo Search packages:      
Sourcecode: xulrunner version File versions

PRBool nsContentList::MatchSelf ( nsIContent aContent  )  [protected]

Match recursively. See if anything in the subtree rooted at aContent matches our criterion.

aContent the root of the subtree to match against
whether we match something in the tree rooted at aContent

Definition at line 729 of file nsContentList.cpp.

References nsIContent::GetChildAt(), nsIContent::GetChildCount(), nsIContent::GetParent(), Match(), and mDeep.

  NS_PRECONDITION(aContent, "Can't match null stuff, you know");
  NS_PRECONDITION(mDeep || aContent->GetParent() == mRootContent,
                  "MatchSelf called on a node that we can't possibly match");
  if (Match(aContent))
    return PR_TRUE;

  if (!mDeep)
    return PR_FALSE;

  PRUint32 i, count = aContent->GetChildCount();

  for (i = 0; i < count; i++) {
    if (MatchSelf(aContent->GetChildAt(i))) {
      return PR_TRUE;
  return PR_FALSE;

Generated by  Doxygen 1.6.0   Back to index