Backout part of the fix for bug 27382 to try to undo Tp regression.

This commit is contained in:
peterv@propagandism.org
2004-08-10 16:16:58 +00:00
parent cb8465d8ae
commit e4f93c8793
23 changed files with 76 additions and 336 deletions

View File

@@ -738,6 +738,9 @@ nsXMLContentSink::FlushText(PRBool aCreateTextNode, PRBool* aDidFlush)
rv = NS_NewTextNode(getter_AddRefs(textContent));
NS_ENSURE_SUCCESS(rv, rv);
// Set the content's document
textContent->SetDocument(mDocument, PR_FALSE, PR_TRUE);
// Set the text in the text node
textContent->SetText(mText, mTextLength, PR_FALSE);
@@ -1081,6 +1084,7 @@ nsXMLContentSink::HandleComment(const PRUnichar *aName)
nsCOMPtr<nsIDOMComment> domComment = do_QueryInterface(comment, &result);
if (domComment) {
domComment->AppendData(nsDependentString(aName));
comment->SetDocument(mDocument, PR_FALSE, PR_TRUE);
result = AddContentAsLeaf(comment);
}
}
@@ -1104,6 +1108,7 @@ nsXMLContentSink::HandleCDataSection(const PRUnichar *aData,
nsCOMPtr<nsIDOMCDATASection> domCDATA = do_QueryInterface(cdata);
if (domCDATA) {
domCDATA->SetData(nsDependentString(aData, aLength));
cdata->SetDocument(mDocument, PR_FALSE, PR_TRUE);
result = AddContentAsLeaf(cdata);
}
}