diff --git a/content/base/src/nsGenericElement.cpp b/content/base/src/nsGenericElement.cpp index fcc0296fa2fa..0082689e8cc5 100644 --- a/content/base/src/nsGenericElement.cpp +++ b/content/base/src/nsGenericElement.cpp @@ -2089,7 +2089,8 @@ nsGenericElement::UnbindFromTree(PRBool aDeep, PRBool aNullParent) "Shallow unbind won't clear document and binding parent on " "kids!"); // Make sure to unbind this node before doing the kids - nsIDocument *document = GetCurrentDoc(); + nsIDocument *document = + HasFlag(NODE_FORCE_XBL_BINDINGS) ? GetOwnerDoc() : GetCurrentDoc(); if (document) { // Notify XBL- & nsIAnonymousContentCreator-generated // anonymous content that the document is changing. diff --git a/layout/reftests/bugs/389636-1.html b/layout/reftests/bugs/389636-1.html new file mode 100644 index 000000000000..e3ab2cabefe9 --- /dev/null +++ b/layout/reftests/bugs/389636-1.html @@ -0,0 +1,31 @@ + + +
+ + + + + + + diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index f5133d1be01b..b98295cdc8a4 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -368,6 +368,7 @@ fails == 386310-1d.html 386310-1-ref.html == 387201-2.html about:blank # Really an assertion test rather than a rendering test == 387201-3.html about:blank # Really an assertion test rather than a rendering test == 387344-1.html 387344-1-ref.html +== 389636-1.html about:blank # assertion test == 389924-1a.html 389924-1-ref.html == 389924-1b.html 389924-1-ref.html != 389924-1a.html about:blank