Bug 487949 - Land HTML5 parser on trunk preffed off r=mrbkap, sr=jonas
This commit is contained in:
@@ -3246,14 +3246,14 @@ nsGenericElement::doInsertChildAt(nsIContent* aKid, PRUint32 aIndex,
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsGenericElement::RemoveChildAt(PRUint32 aIndex, PRBool aNotify)
|
||||
nsGenericElement::RemoveChildAt(PRUint32 aIndex, PRBool aNotify, PRBool aMutationEvent)
|
||||
{
|
||||
nsCOMPtr<nsIContent> oldKid = mAttrsAndChildren.GetSafeChildAt(aIndex);
|
||||
NS_ASSERTION(oldKid == GetChildAt(aIndex), "Unexpected child in RemoveChildAt");
|
||||
|
||||
if (oldKid) {
|
||||
return doRemoveChildAt(aIndex, aNotify, oldKid, this, GetCurrentDoc(),
|
||||
mAttrsAndChildren);
|
||||
mAttrsAndChildren, aMutationEvent);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@@ -3264,7 +3264,8 @@ nsresult
|
||||
nsGenericElement::doRemoveChildAt(PRUint32 aIndex, PRBool aNotify,
|
||||
nsIContent* aKid, nsIContent* aParent,
|
||||
nsIDocument* aDocument,
|
||||
nsAttrAndChildArray& aChildArray)
|
||||
nsAttrAndChildArray& aChildArray,
|
||||
PRBool aMutationEvent)
|
||||
{
|
||||
NS_PRECONDITION(aParent || aDocument, "Must have document if no parent!");
|
||||
NS_PRECONDITION(!aParent || aParent->GetCurrentDoc() == aDocument,
|
||||
@@ -3300,6 +3301,7 @@ nsGenericElement::doRemoveChildAt(PRUint32 aIndex, PRBool aNotify,
|
||||
|
||||
mozAutoSubtreeModified subtree(nsnull, nsnull);
|
||||
if (aNotify &&
|
||||
aMutationEvent &&
|
||||
nsContentUtils::HasMutationListeners(aKid,
|
||||
NS_EVENT_BITS_MUTATION_NODEREMOVED, container)) {
|
||||
mozAutoRemovableBlockerRemover blockerRemover;
|
||||
|
||||
Reference in New Issue
Block a user