if (eHTMLTag_iframe == mStack[mStackPos].mType) { mSink->mNumOpenIFRAMES--; }
SinkContext::FlushTags(){  nsresult result = NS_OK;  // Don't release last text node in case we need to add to it again  FlushText();  PRInt32 childCount;  nsIHTMLContent* content;  // Start from the top of the stack (growing upwards) and append  // all content that hasn't been previously appended to the tree  PRInt32 stackPos = mStackPos-1;  while ((stackPos > 0) && (0 == (mStack[stackPos].mFlags & APPENDED))) {    content = mStack[stackPos].mContent;    nsIHTMLContent* parent = mStack[stackPos-1].mContent;        // If the parent has an insertion point, insert rather than    // append.    if (mStack[mStackPos-1].mInsertionPoint != -1) {      parent->InsertChildAt(content,                             mStack[mStackPos-1].mInsertionPoint++,                             PR_FALSE);    }    else {      parent->AppendChildTo(content, PR_FALSE);    }    mStack[stackPos].mFlags |= APPENDED;    if (eHTMLTag_iframe == mStack[mStackPos].mType) {      mSink->mNumOpenIFRAMES--;    }    stackPos--;  }  // Start from the base of the stack (growing upward) and do  // a notification from the node that is closest to the root of  // tree for any content that has been added.  stackPos = 1;  PRBool flushed = PR_FALSE;  while (stackPos < mStackPos) {    content = mStack[stackPos].mContent;    content->ChildCount(childCount);    if (!flushed && (mStack[stackPos].mNumFlushed < childCount)) {#ifdef NS_DEBUG      // Tracing code      char cbuf[40];      const char* cp;      nsAutoString str;      nsCOMPtr<nsIDTD> dtd;      mSink->mParser->GetDTD(getter_AddRefs(dtd));      dtd->IntTagToStringTag(nsHTMLTag(mStack[stackPos].mType), str);      cp = str.ToCString(cbuf, sizeof(cbuf));            SINK_TRACE(SINK_TRACE_REFLOW,                 ("SinkContext::FlushTags: tag=%s from newindex=%d at stackPos=%d",                   cp, mStack[stackPos].mNumFlushed, stackPos));#endif      if ((mStack[stackPos].mInsertionPoint != -1) &&          (mStackPos > (stackPos+1))) {        nsIContent* child = mStack[stackPos+1].mContent;        mSink->NotifyInsert(content,                             child,                             mStack[stackPos].mInsertionPoint);          }      else {        mSink->NotifyAppend(content, mStack[stackPos].mNumFlushed);          }      flushed = PR_TRUE;    }         mStack[stackPos].mNumFlushed = childCount;    stackPos++;  }  mNotifyLevel = mStackPos-1;  return result;}