diff --git a/content/xbl/src/nsXBLService.cpp b/content/xbl/src/nsXBLService.cpp index 02b7634ed88..ba6b4ce1eca 100644 --- a/content/xbl/src/nsXBLService.cpp +++ b/content/xbl/src/nsXBLService.cpp @@ -141,9 +141,11 @@ struct nsXBLBindingRequest nsCOMPtr shell = getter_AddRefs(doc->GetShellAt(0)); if (shell) { + nsIFrame* childFrame; + shell->GetPrimaryFrameFor(mBoundElement, &childFrame); nsCOMPtr obs(do_QueryInterface(shell)); - obs->ContentRemoved(doc, parent, mBoundElement, index); - obs->ContentInserted(doc, parent, mBoundElement, index); + if (!childFrame) + obs->ContentInserted(doc, parent, mBoundElement, index); } } diff --git a/layout/xbl/src/nsXBLService.cpp b/layout/xbl/src/nsXBLService.cpp index 02b7634ed88..ba6b4ce1eca 100644 --- a/layout/xbl/src/nsXBLService.cpp +++ b/layout/xbl/src/nsXBLService.cpp @@ -141,9 +141,11 @@ struct nsXBLBindingRequest nsCOMPtr shell = getter_AddRefs(doc->GetShellAt(0)); if (shell) { + nsIFrame* childFrame; + shell->GetPrimaryFrameFor(mBoundElement, &childFrame); nsCOMPtr obs(do_QueryInterface(shell)); - obs->ContentRemoved(doc, parent, mBoundElement, index); - obs->ContentInserted(doc, parent, mBoundElement, index); + if (!childFrame) + obs->ContentInserted(doc, parent, mBoundElement, index); } }