mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 07:34:20 +00:00
Make sure to tear down the XBL binding for nodes which forced one even though not in the document. Bug 389636, r+sr+a=sicking
This commit is contained in:
parent
764caa38c3
commit
1f4e049086
@ -2089,7 +2089,8 @@ nsGenericElement::UnbindFromTree(PRBool aDeep, PRBool aNullParent)
|
|||||||
"Shallow unbind won't clear document and binding parent on "
|
"Shallow unbind won't clear document and binding parent on "
|
||||||
"kids!");
|
"kids!");
|
||||||
// Make sure to unbind this node before doing the 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) {
|
if (document) {
|
||||||
// Notify XBL- & nsIAnonymousContentCreator-generated
|
// Notify XBL- & nsIAnonymousContentCreator-generated
|
||||||
// anonymous content that the document is changing.
|
// anonymous content that the document is changing.
|
||||||
|
31
layout/reftests/bugs/389636-1.html
Normal file
31
layout/reftests/bugs/389636-1.html
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html class="reftest-wait">
|
||||||
|
<head>
|
||||||
|
<script>
|
||||||
|
function finishTest()
|
||||||
|
{
|
||||||
|
document.documentElement.className = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
function boom()
|
||||||
|
{
|
||||||
|
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
||||||
|
var XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||||
|
|
||||||
|
var clonedRichListBox = document.createElementNS(XUL_NS, 'richlistbox').cloneNode(false);
|
||||||
|
var div = document.createElementNS(HTML_NS, "div");
|
||||||
|
|
||||||
|
div.appendChild(clonedRichListBox);
|
||||||
|
|
||||||
|
document.body.appendChild(clonedRichListBox);
|
||||||
|
|
||||||
|
setTimeout(finishTest, 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body onload="setTimeout(boom, 100);" style="visibility: hidden">
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -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-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
|
== 387201-3.html about:blank # Really an assertion test rather than a rendering test
|
||||||
== 387344-1.html 387344-1-ref.html
|
== 387344-1.html 387344-1-ref.html
|
||||||
|
== 389636-1.html about:blank # assertion test
|
||||||
== 389924-1a.html 389924-1-ref.html
|
== 389924-1a.html 389924-1-ref.html
|
||||||
== 389924-1b.html 389924-1-ref.html
|
== 389924-1b.html 389924-1-ref.html
|
||||||
!= 389924-1a.html about:blank
|
!= 389924-1a.html about:blank
|
||||||
|
Loading…
x
Reference in New Issue
Block a user