MOZ_TIMER_DEBUGLOG(("Start: nsHTMLContentSink::AddLeaf()\n")); MOZ_TIMER_START(mWatch); nsresult rv;  nsHTMLTag nodeType = nsHTMLTag(aNode.GetNodeType()); switch (nodeType) { case eHTMLTag_area: rv = ProcessAREATag(aNode); break;  case eHTMLTag_base: mCurrentContext->FlushTextAndRelease(); rv = ProcessBASETag(aNode); break;  case eHTMLTag_link: mCurrentContext->FlushTextAndRelease(); rv = ProcessLINKTag(aNode); break;  case eHTMLTag_meta: mCurrentContext->FlushTextAndRelease(); rv = ProcessMETATag(aNode); break;  case eHTMLTag_style: mCurrentContext->FlushTextAndRelease(); rv = ProcessSTYLETag(aNode); break;  case eHTMLTag_script: mCurrentContext->FlushTextAndRelease(); rv = ProcessSCRIPTTag(aNode); break;  default: rv = mCurrentContext->AddLeaf(aNode); break;
NS_ASSERTION(mStackPos > 0, "leaf w/o container"); nsIHTMLContent* parent = mStack[mStackPos-1].mContent;   if (mStack[mStackPos-1].mInsertionPoint != -1) { parent->InsertChildAt(aContent, mStack[mStackPos-1].mInsertionPoint++, mSink->IsInScript()); } else { parent->AppendChildTo(aContent, mSink->IsInScript());
HTMLContentSink::AddLeaf(const nsIParserNode& aNode){  MOZ_TIMER_DEBUGLOG(("Start: nsHTMLContentSink::AddLeaf()\n"));  MOZ_TIMER_START(mWatch);  nsresult rv;    nsHTMLTag nodeType = nsHTMLTag(aNode.GetNodeType());  switch (nodeType) {  case eHTMLTag_area:    rv = ProcessAREATag(aNode);    break;  case eHTMLTag_base:    mCurrentContext->FlushTextAndRelease();    rv = ProcessBASETag(aNode);    break;  case eHTMLTag_link:    mCurrentContext->FlushTextAndRelease();    rv = ProcessLINKTag(aNode);    break;  case eHTMLTag_meta:    mCurrentContext->FlushTextAndRelease();    rv = ProcessMETATag(aNode);    break;  case eHTMLTag_style:    mCurrentContext->FlushTextAndRelease();    rv = ProcessSTYLETag(aNode);    break;  case eHTMLTag_script:    mCurrentContext->FlushTextAndRelease();        rv = ProcessSCRIPTTag(aNode);        break;  default:    rv = mCurrentContext->AddLeaf(aNode);    break;  }  MOZ_TIMER_DEBUGLOG(("Stop: nsHTMLContentSink::AddLeaf()\n"));  MOZ_TIMER_STOP(mWatch);  return rv;}