rv = mCurrentContext->OpenContainer(aNode); NS_STOP_STOPWATCH(mWatch) return rv;
nsHTMLTag nodeType = nsHTMLTag(aNode.GetNodeType()); nsIHTMLContent* content; rv = CreateContentObject(aNode, nodeType, mSink->mCurrentForm, mSink->mFrameset ? mSink->mWebShell : nsnull, &content); if (NS_OK != rv) { return rv; } content->SetContentID(mSink->mContentIDCounter++);  mStack[mStackPos].mType = nodeType; mStack[mStackPos].mContent = content; mStack[mStackPos].mFlags = 0; content->SetDocument(mSink->mDocument, PR_FALSE);  nsIScriptContextOwner* sco = mSink->mDocument->GetScriptContextOwner(); rv = AddAttributes(aNode, content, sco); NS_IF_RELEASE(sco);  if (mPreAppend) { NS_ASSERTION(mStackPos > 0, "container w/o parent"); nsIHTMLContent* parent = mStack[mStackPos-1].mContent; parent->AppendChildTo(content, PR_FALSE); mStack[mStackPos].mFlags |= APPENDED; } mStackPos++; if (NS_OK != rv) { return rv; }   switch (nodeType) { case eHTMLTag_a: mSink->ProcessATag(aNode, content); break; case eHTMLTag_table: mSink->mInMonolithicContainer++; case eHTMLTag_layer: case eHTMLTag_thead: case eHTMLTag_tbody: case eHTMLTag_tfoot: case eHTMLTag_tr: case eHTMLTag_td: case eHTMLTag_th:  mSink->AddBaseTagInfo(content); break; case eHTMLTag_map: mSink->ProcessMAPTag(aNode, content); break; case eHTMLTag_iframe: mSink->mNumOpenIFRAMES++; break; default: break; }  return NS_OK;
HTMLContentSink::OpenContainer(const nsIParserNode& aNode){  NS_START_STOPWATCH(mWatch)  nsresult rv = NS_OK;  // XXX work around parser bug  if (eHTMLTag_frameset == aNode.GetNodeType()) {    NS_STOP_STOPWATCH(mWatch)    return OpenFrameset(aNode);  }  rv = mCurrentContext->OpenContainer(aNode);  NS_STOP_STOPWATCH(mWatch)  return rv;}