if((aPrevTag==aCurrentTag) && (!gHTMLElements[aCurrentTag].CanSelfContain())){ return aCurrentTag;
if(aPrevTag==aCurrentTag) { return (gHTMLElements[aCurrentTag].CanSelfContain()) ? eHTMLTag_unknown: aCurrentTag;
eHTMLTags FindAutoCloseTargetForStartTag(eHTMLTags aCurrentTag,nsTagStack& aTagStack) {  int theTopIndex=aTagStack.mCount;  eHTMLTags aPrevTag=aTagStack.mTags[theTopIndex-1];   if(nsHTMLElement::IsContainer(aCurrentTag)){    if((aPrevTag==aCurrentTag) && (!gHTMLElements[aCurrentTag].CanSelfContain())){      return aCurrentTag;    }    if(nsHTMLElement::IsBlockCloser(aCurrentTag)) {      CTagList* theRootTags=gHTMLElements[aCurrentTag].GetRootTags();      if(theRootTags) {        PRInt32 theRootIndex=theRootTags->GetTopmostIndexOf(aTagStack);        if(theRootIndex<GetTopmostIndexOf(aCurrentTag,aTagStack)) {          return aCurrentTag;        }      }       CTagList* theCloseTags=gHTMLElements[aCurrentTag].GetAutoCloseStartTags();      if(theCloseTags){        PRInt32 thePeerIndex=theCloseTags->GetTopmostIndexOf(aTagStack);        if(kNotFound!=thePeerIndex){          if(thePeerIndex==theTopIndex-1) {            //the guy you can autoclose is on the top of the stack...            return aPrevTag;          } //if        } //if      }//if    } //if    else if(nsHTMLElement::IsInlineElement(aCurrentTag)) {    }//if   } //if  return eHTMLTag_unknown;}