mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Notify properly when calling AppendChild on a documentfragment. Bug
175843, r=sicking, sr=peterv
This commit is contained in:
parent
dc0bcfe202
commit
3253d0e781
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user