Fixed so that document still gets set even when notify is false

This commit is contained in:
kipp 1998-06-03 18:31:07 +00:00
Родитель 38dd72568c
Коммит 1fa3083a46
1 изменённых файлов: 12 добавлений и 12 удалений

Просмотреть файл

@ -107,10 +107,10 @@ nsHTMLContainer::InsertChildAt(nsIContent* aKid, PRInt32 aIndex,
if (rv) {
NS_ADDREF(aKid);
aKid->SetParent(this);
if (aNotify) {
nsIDocument* doc = mDocument;
if (nsnull != doc) {
aKid->SetDocument(doc);
nsIDocument* doc = mDocument;
if (nsnull != doc) {
aKid->SetDocument(doc);
if (aNotify) {
doc->ContentInserted(this, aKid, aIndex);
}
}
@ -128,10 +128,10 @@ nsHTMLContainer::ReplaceChildAt(nsIContent* aKid, PRInt32 aIndex,
if (rv) {
NS_ADDREF(aKid);
aKid->SetParent(this);
if (aNotify) {
nsIDocument* doc = mDocument;
if (nsnull != doc) {
aKid->SetDocument(doc);
nsIDocument* doc = mDocument;
if (nsnull != doc) {
aKid->SetDocument(doc);
if (aNotify) {
doc->ContentReplaced(this, oldKid, aKid, aIndex);
}
}
@ -150,10 +150,10 @@ nsHTMLContainer::AppendChild(nsIContent* aKid, PRBool aNotify)
if (rv) {
NS_ADDREF(aKid);
aKid->SetParent(this);
if (aNotify) {
nsIDocument* doc = mDocument;
if (nsnull != doc) {
aKid->SetDocument(doc);
nsIDocument* doc = mDocument;
if (nsnull != doc) {
aKid->SetDocument(doc);
if (aNotify) {
doc->ContentAppended(this);
}
}