dtd->IntTagToStringTag(nsHTMLTag(mStack[stackPos].mType), str);
nsDependentString str(dtd->IntTagToStringTag(nsHTMLTag(mStack[stackPos].mType)));
SinkContext::FlushTags(PRBool aNotify){  // If we're demoting containers right now, don't flush.  if (mSink->mIsDemotingContainer) {    return NS_OK;  }  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, PR_FALSE);    }    else {      parent->AppendChildTo(content, PR_FALSE, PR_FALSE);    }    mStack[stackPos].mFlags |= APPENDED;    stackPos--;  }  if (aNotify) {    // 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        nsAutoString str;        nsCOMPtr<nsIDTD> dtd;        mSink->mParser->GetDTD(getter_AddRefs(dtd));        dtd->IntTagToStringTag(nsHTMLTag(mStack[stackPos].mType), str);                SINK_TRACE(SINK_TRACE_REFLOW,                   ("SinkContext::FlushTags: tag=%s from newindex=%d at stackPos=%d",                     NS_LossyConvertUCS2toASCII(str).get(),                    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;}