Fix check for DOMNodeInserted/DOMNodeRemoved event handlers. Bug 367164,
r+sr=sicking
This commit is contained in:
@@ -2328,7 +2328,7 @@ nsGenericElement::doInsertChildAt(nsIContent* aKid, PRUint32 aIndex,
|
||||
nsNodeUtils::ContentInserted(container, aKid, aIndex);
|
||||
}
|
||||
|
||||
if (nsContentUtils::HasMutationListeners(container,
|
||||
if (nsContentUtils::HasMutationListeners(aKid,
|
||||
NS_EVENT_BITS_MUTATION_NODEINSERTED)) {
|
||||
nsMutationEvent mutation(PR_TRUE, NS_MUTATION_NODEINSERTED);
|
||||
mutation.mRelatedNode = do_QueryInterface(container);
|
||||
@@ -2377,7 +2377,7 @@ nsGenericElement::doRemoveChildAt(PRUint32 aIndex, PRBool aNotify,
|
||||
nsMutationGuard guard;
|
||||
|
||||
if (aNotify &&
|
||||
nsContentUtils::HasMutationListeners(container,
|
||||
nsContentUtils::HasMutationListeners(aKid,
|
||||
NS_EVENT_BITS_MUTATION_NODEREMOVED)) {
|
||||
nsMutationEvent mutation(PR_TRUE, NS_MUTATION_NODEREMOVED);
|
||||
mutation.mRelatedNode = do_QueryInterface(container);
|
||||
|
||||
Reference in New Issue
Block a user