PRBool nsHTMLElement::CanContain(eHTMLTags aChild) const{  if(IsContainer(mTagID)){  if(mTagID==aChild) { return mSelfContained; }  if(nsHTMLElement::IsInlineElement(aChild)){ if(nsHTMLElement::IsInlineParent(mTagID)){ return PR_TRUE; } }  if(nsHTMLElement::IsTextTag(aChild)) { if(nsHTMLElement::IsInlineParent(mTagID)){ return PR_TRUE; } }  if(nsHTMLElement::IsBlockElement(aChild)){ if(nsHTMLElement::IsBlockParent(mTagID) || IsStyleTag(mTagID)){ return PR_TRUE; } }  if(mSpecialKids) { if(FindTagInSet(aChild,mSpecialKids->mTags,mSpecialKids->mCount)){ return PR_TRUE; } }  if(mTagID!=eHTMLTag_server){ int x=5; } }  return PR_FALSE;
PRBool nsHTMLElement::CanContain(eHTMLTags aParent,eHTMLTags aChild){ PRBool result=PR_FALSE; if((aParent>=eHTMLTag_unknown) & (aParent<=eHTMLTag_userdefined)){ result=gHTMLElements[aChild].CanContain(aChild); } return result;
PRBool nsHTMLElement::CanContain(eHTMLTags aChild) const{  if(IsContainer(mTagID)){    if(mTagID==aChild) {      return mSelfContained;  //not many tags can contain themselves...    }    if(nsHTMLElement::IsInlineElement(aChild)){      if(nsHTMLElement::IsInlineParent(mTagID)){        return PR_TRUE;      }    }    if(nsHTMLElement::IsTextTag(aChild)) {      if(nsHTMLElement::IsInlineParent(mTagID)){        return PR_TRUE;      }    }    if(nsHTMLElement::IsBlockElement(aChild)){      if(nsHTMLElement::IsBlockParent(mTagID) || IsStyleTag(mTagID)){        return PR_TRUE;      }    }    if(mSpecialKids) {      if(FindTagInSet(aChild,mSpecialKids->mTags,mSpecialKids->mCount)){        return PR_TRUE;      }    }    if(mTagID!=eHTMLTag_server){      int x=5;    }  }    return PR_FALSE;}