else if(FindTagInSet(theParentTag,gTableElements,sizeof(gTableElements)/sizeof(eHTMLTag_unknown))){ result=PR_TRUE; break; }
PRBool CanBeContained(eHTMLTags aChildTag,nsDTDContext& aContext) {  /* #    Interesting test cases:       Result:   * 1.   <UL><LI>..<B>..<LI>           inner <LI> closes outer <LI>   * 2.   <CENTER><DL><DT><A><CENTER>   allow nested <CENTER>   * 3.   <TABLE><TR><TD><TABLE>...     allow nested <TABLE>   * 4.   <FRAMESET> ... <FRAMESET>   */  //Note: This method is going away. First we need to get the elementtable to do closures right, and  //      therefore we must get residual style handling to work.  //the changes to this method were added to fix bug 54651...  PRBool  result=PR_TRUE;  PRInt32 theCount=aContext.GetCount();  if(0<theCount){    TagList* theRootTags=gHTMLElements[aChildTag].GetRootTags();    TagList* theSpecialParents=gHTMLElements[aChildTag].GetSpecialParents();    if(theRootTags) {      PRInt32 theRootIndex=LastOf(aContext,*theRootTags);      PRInt32 theSPIndex=(theSpecialParents) ? LastOf(aContext,*theSpecialParents) : kNotFound;        PRInt32 theChildIndex=GetIndexOfChildOrSynonym(aContext,aChildTag);      PRInt32 theTargetIndex=(theRootIndex>theSPIndex) ? theRootIndex : theSPIndex;      if((theTargetIndex==theCount-1) ||        ((theTargetIndex==theChildIndex) && gHTMLElements[aChildTag].CanContainSelf())) {        result=PR_TRUE;      }      else {                result=PR_FALSE;        PRInt32 theIndex=theCount-1;        while(theChildIndex<theIndex) {          eHTMLTags theParentTag=aContext.TagAt(theIndex--);          if (gHTMLElements[theParentTag].IsMemberOf(kBlockEntity)  ||               gHTMLElements[theParentTag].IsMemberOf(kHeading)      ||               gHTMLElements[theParentTag].IsMemberOf(kPreformatted) ||               gHTMLElements[theParentTag].IsMemberOf(kList)) {            if(!HasOptionalEndTag(theParentTag)) {              result=PR_TRUE;              break;            }          }        }      }    }  }  return result;}