parent->AppendChildTo(it, PR_FALSE);
parent->AppendChildTo(it, PR_FALSE, PR_FALSE);
HTMLContentSink::ProcessMETATag(const nsIParserNode& aNode){  nsresult rv = NS_OK;  nsIHTMLContent* parent = nsnull;    if(mCurrentContext!=nsnull) {    parent=mCurrentContext->mStack[mCurrentContext->mStackPos-1].mContent;  }  if (nsnull != parent) {    // Create content object    nsCOMPtr<nsINodeInfo> nodeInfo;    rv = mNodeInfoManager->GetNodeInfo(NS_ConvertASCIItoUCS2("meta"), nsnull,                                       kNameSpaceID_None,                                       *getter_AddRefs(nodeInfo));    NS_ENSURE_SUCCESS(rv, rv);    nsIHTMLContent* it;    rv = NS_NewHTMLMetaElement(&it, nodeInfo);    if (NS_OK == rv) {      // Add in the attributes and add the meta content object to the      // head container.      it->SetDocument(mDocument, PR_FALSE, PR_TRUE);      rv = AddAttributes(aNode, it);      if (NS_OK != rv) {        NS_RELEASE(it);        return rv;      }      parent->AppendChildTo(it, PR_FALSE);                  // XXX It's just not sufficient to check if the parent is head. Also check for      // the preference.      if(!mInsideNoXXXTag) {        // set any HTTP-EQUIV data into document's header data as well as url        nsAutoString header;        it->GetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::httpEquiv, header);        if (header.Length() > 0) {          nsAutoString result;          it->GetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::content, result);          if (result.Length() > 0) {            header.ToLowerCase();            nsCOMPtr<nsIAtom> fieldAtom(dont_AddRef(NS_NewAtom(header)));            rv=ProcessHeaderData(fieldAtom,result,it);           }//if (result.Length() > 0)         }//if (header.Length() > 0)       }//if(!mInsideNoXXXTag)      NS_RELEASE(it);    }//if (NS_OK == rv)   }//if (nsnull != parent)  return rv;}