parent->AppendChildTo(content, PR_FALSE);
parent->AppendChildTo(content, PR_FALSE, PR_FALSE);
nsHTMLFragmentContentSink::AddLeaf(const nsIParserNode& aNode){  nsresult result = NS_OK;  switch (aNode.GetTokenType()) {    case eToken_start:      {        FlushText();                // Create new leaf content object        nsCOMPtr<nsIHTMLContent> content;        nsHTMLTag nodeType = nsHTMLTag(aNode.GetNodeType());        NS_WITH_SERVICE(nsIParserService,                        parserService,                         kParserServiceCID,                        &result);        NS_ENSURE_SUCCESS(result, result);        nsAutoString tmpName;        if (nodeType == eHTMLTag_userdefined) {          tmpName.Assign(aNode.GetText());        } else {          result = parserService->HTMLIdToStringTag(nodeType, tmpName);          NS_ENSURE_SUCCESS(result, result);        }        nsCOMPtr<nsINodeInfo> nodeInfo;        result = mNodeInfoManager->GetNodeInfo(tmpName, nsnull, kNameSpaceID_None,                                               *getter_AddRefs(nodeInfo));        if(NS_SUCCEEDED(result)) {          result = NS_CreateHTMLElement(getter_AddRefs(content), nodeInfo);          if (NS_OK == result) {            result = AddAttributes(aNode, content);            if (NS_OK == result) {              nsIContent *parent = GetCurrentContent();                          if (nsnull == parent) {                parent = mRoot;              }                          parent->AppendChildTo(content, PR_FALSE);            }          }          if(nodeType == eHTMLTag_plaintext ||              nodeType == eHTMLTag_script    ||             nodeType == eHTMLTag_style     ||             nodeType == eHTMLTag_textarea  ||             nodeType == eHTMLTag_xmp) {                        // Create a text node holding the content            result=AddTextToContent(content,aNode.GetSkippedContent());          }          else if (nodeType == eHTMLTag_img || nodeType == eHTMLTag_frame              || nodeType == eHTMLTag_input)    // elements with 'SRC='              AddBaseTagInfo(content);          else if (nodeType == eHTMLTag_base)              ProcessBaseTag(content);        }      }      break;    case eToken_text:    case eToken_whitespace:    case eToken_newline:      result = AddText(aNode.GetText());      break;          case eToken_entity:      {        nsAutoString tmp;        PRInt32 unicode = aNode.TranslateToUnicodeStr(tmp);        if (unicode < 0) {          result = AddText(aNode.GetText());        }        else {          result = AddText(tmp);        }      }      break;  }    return result;}