diff --git a/mozilla/content/base/src/nsGenericElement.cpp b/mozilla/content/base/src/nsGenericElement.cpp index 7ae84600e4e..3e545e9b3e0 100644 --- a/mozilla/content/base/src/nsGenericElement.cpp +++ b/mozilla/content/base/src/nsGenericElement.cpp @@ -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); diff --git a/mozilla/testing/mochitest/tests/index.html b/mozilla/testing/mochitest/tests/index.html index d8e1988a034..c3d5fd8ecc1 100644 --- a/mozilla/testing/mochitest/tests/index.html +++ b/mozilla/testing/mochitest/tests/index.html @@ -100,6 +100,7 @@ RunSet.runall = function() { 'test_bug364092.xhtml', 'test_bug364413.xhtml', 'test_bug365773.xul', + 'test_bug367164.html, 'test_MochiKit-Async.html', 'test_MochiKit-Base.html', 'test_MochiKit-DateTime.html', diff --git a/mozilla/testing/mochitest/tests/test_bug367164.html b/mozilla/testing/mochitest/tests/test_bug367164.html new file mode 100644 index 00000000000..daa074dc420 --- /dev/null +++ b/mozilla/testing/mochitest/tests/test_bug367164.html @@ -0,0 +1,48 @@ + + + + + Test for Bug 367164 + + + + + +Mozilla Bug 367164 +

+ +
+
+
+
+ + +