Notify properly when calling AppendChild on a documentfragment. Bug

175843, r=sicking, sr=peterv
This commit is contained in:
bzbarsky%mit.edu 2002-11-06 01:46:03 +00:00
parent dc0bcfe202
commit 3253d0e781

View File

@ -2643,6 +2643,10 @@ nsGenericElement::doInsertBefore(nsIDOMNode* aNewChild,
PRBool do_notify = !!aRefChild;
if (count && !do_notify && mDocument) {
mDocument->BeginUpdate();
}
/*
* Iterate through the fragments children, removing each from
* the fragment and inserting it into the child list of its
@ -2679,6 +2683,7 @@ nsGenericElement::doInsertBefore(nsIDOMNode* aNewChild,
if (count && !do_notify && mDocument) {
mDocument->ContentAppended(this, old_count);
mDocument->EndUpdate();
}
doc_fragment->DropChildReferences();