rv = NS_NewHTMLEmbed(&container, atom); break;  case eHTMLTag_embed:
HTMLContentSink::OpenContainer(const nsIParserNode& aNode){  FlushText();  SINK_TRACE_NODE(SINK_TRACE_CALLS,                  "HTMLContentSink::OpenContainer", aNode);  nsHTMLTag nodeType = nsHTMLTag(aNode.GetNodeType());/* XXX bad parser api */  nsAutoString tmp;  if (eHTMLTag_userdefined == nodeType) {    tmp.Append(aNode.GetText());    tmp.ToUpperCase();  }  else {    tmp.Append(NS_EnumToTag(nodeType));  }  nsIAtom* atom = NS_NewAtom(tmp);  eHTMLTags parentType;  nsIHTMLContent* parent = GetCurrentContainer(&parentType);  switch (parentType) {  case eHTMLTag_select:    break;  case eHTMLTag_option:    break;  }  nsresult rv;  nsIHTMLContent* container = nsnull;  switch (nodeType) {  case eHTMLTag_map:    NS_IF_RELEASE(mCurrentMap);    rv = NS_NewImageMap(&mCurrentMap, atom);    if (NS_OK == rv) {      // Look for name attribute and set the map name      nsAutoString name;      if (FindAttribute(aNode, "name", name)) {        name.StripWhitespace();     // XXX leading, trailing, interior non=-space ws is removed        mCurrentMap->SetName(name);      }      // Add the map to the document      ((nsHTMLDocument*)mDocument)->AddImageMap(mCurrentMap);    }    return 0;  case eHTMLTag_applet:    rv = NS_NewHTMLApplet(&container, atom);    break;  case eHTMLTag_object:    rv = NS_NewHTMLEmbed(&container, atom);    break;  case eHTMLTag_embed:    rv = NS_NewHTMLObject(&container, atom);    break;  case eHTMLTag_table:    rv = NS_NewTablePart(&container, atom);    mInMonolithicContainer++;    break;  case eHTMLTag_caption:    rv = NS_NewTableCaptionPart(&container, atom);    break;  case eHTMLTag_tr:    rv = NS_NewTableRowPart(&container, atom);    break;  case eHTMLTag_tbody:  case eHTMLTag_thead:  case eHTMLTag_tfoot:    rv = NS_NewTableRowGroupPart(&container, atom);    break;  case eHTMLTag_colgroup:    rv = NS_NewTableColGroupPart(&container, atom);    break;  case eHTMLTag_col:    rv = NS_NewTableColPart(&container, atom);    break;  case eHTMLTag_td:  case eHTMLTag_th:    rv = NS_NewTableCellPart(&container, atom);    break;  case eHTMLTag_select:    rv = ProcessOpenSELECTTag(&container, aNode);    break;  case eHTMLTag_option:    rv = ProcessOpenOPTIONTag(&container, aNode);    break;  case eHTMLTag_iframe:    rv = ProcessIFRAMETag(&container, aNode);    break;  default:    rv = NS_NewHTMLContainer(&container, atom);    break;  }  // XXX for now assume that if it's a container, it's a simple container  mNodeStack[mStackPos] = (eHTMLTags) aNode.GetNodeType();  mContainerStack[mStackPos] = container;  if (nsnull != container) {    container->SetDocument(mDocument);    rv = AddAttributes(aNode, container);    mStackPos++;  }  NS_RELEASE(atom);  return 0;}