NS_IF_ADDREF(aResult); return NS_OK;
if (aResult) aResult->AddRef();  return aResult;
nsStyleContext::FindChildWithRules(const nsIAtom* aPseudoTag,                                      nsRuleNode* aRuleNode,                                     nsIStyleContext*& aResult){  PRUint32 threshold = 10; // The # of siblings we're willing to examine                           // before just giving this whole thing up.  aResult = nsnull;  if ((nsnull != mChild) || (nsnull != mEmptyChild)) {    nsStyleContext* child;    if (aRuleNode->IsRoot()) {      if (nsnull != mEmptyChild) {        child = mEmptyChild;        do {          if (aPseudoTag == child->mPseudoTag) {            aResult = child;            break;          }          child = child->mNextSibling;          threshold--;          if (threshold == 0)            break;        } while (child != mEmptyChild);      }    }    else if (nsnull != mChild) {      child = mChild;            do {        if (child->mRuleNode == aRuleNode && child->mPseudoTag == aPseudoTag) {          aResult = child;          break;        }        child = child->mNextSibling;        threshold--;        if (threshold == 0)          break;      } while (child != mChild);    }  }  NS_IF_ADDREF(aResult);  return NS_OK;}