diff --git a/content/base/src/nsGenericElement.cpp b/content/base/src/nsGenericElement.cpp index c00d02ee504f..ca32dba40dce 100644 --- a/content/base/src/nsGenericElement.cpp +++ b/content/base/src/nsGenericElement.cpp @@ -2747,8 +2747,7 @@ doInsertChildAt(nsIContent* aKid, PRUint32 aIndex, PRBool aNotify, } } - // XXX this screws up ranges in XUL, no? Need to figure out... - if (aParent && !aParent->IsContentOfType(nsIContent::eXUL)) { + if (aParent) { nsRange::OwnerChildInserted(aParent, aIndex); } diff --git a/content/xul/content/src/nsXULElement.cpp b/content/xul/content/src/nsXULElement.cpp index edd46b0a60ab..da7ba141502e 100644 --- a/content/xul/content/src/nsXULElement.cpp +++ b/content/xul/content/src/nsXULElement.cpp @@ -161,6 +161,7 @@ #include "nsIFrame.h" #include "nsNodeInfoManager.h" #include "nsXBLBinding.h" +#include "nsRange.h" /** * Three bits are used for XUL Element's lazy state. @@ -1120,8 +1121,8 @@ nsXULElement::RemoveChildAt(PRUint32 aIndex, PRBool aNotify) } } + nsRange::OwnerChildRemoved(this, aIndex, oldKid); mAttrsAndChildren.RemoveChildAt(aIndex); - //nsRange::OwnerChildRemoved(this, aIndex, oldKid); if (aNotify && doc) { doc->ContentRemoved(this, oldKid, aIndex); }