Bug 514300 part 1. Use the owner document to look for the binding manager. r=sicking

This commit is contained in:
Boris Zbarsky 2010-01-13 11:30:10 -05:00
parent 79fa9ec30d
commit bbbe659e65
3 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1,14 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="document.getElementById('listbox').removeChild(document.getElementById('span'));">
<bindings xmlns="http://www.mozilla.org/xbl">
<binding id="foo">
<content><listitem xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"><children xmlns="http://www.mozilla.org/xbl"/></listitem></content>
</binding>
</bindings>
<listbox id="listbox" style="-moz-binding: url(#foo)"><span xmlns="http://www.w3.org/1999/xhtml" id="span"/></listbox>
</window>

View File

@ -68,4 +68,5 @@ load 488210-1.xhtml
load 495728-1.xul
load 508927-1.xul
load 508927-2.xul
load 514300-1.xul
load 536931-1.xhtml

View File

@ -163,7 +163,7 @@ FindBodyContent(nsIContent* aParent, nsIContent** aResult)
}
else {
nsCOMPtr<nsIDOMNodeList> kids;
aParent->GetDocument()->BindingManager()->GetXBLChildNodesFor(aParent, getter_AddRefs(kids));
aParent->GetOwnerDoc()->BindingManager()->GetXBLChildNodesFor(aParent, getter_AddRefs(kids));
if (!kids) return;
PRUint32 i;