Bug 897386 - Hack to allow adopted browsers to still have XBL bindings. r=sicking

This commit is contained in:
Blake Kaplan 2013-08-02 14:05:02 -07:00
Родитель d05431e4d9
Коммит eb7ace5353
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -6704,6 +6704,14 @@ nsIDocument::AdoptNode(nsINode& aAdoptedNode, ErrorResult& rv)
int32_t idx = parent->IndexOf(adoptedNode);
MOZ_ASSERT(idx >= 0);
parent->RemoveChildAt(idx, true);
} else {
MOZ_ASSERT(!adoptedNode->IsInDoc());
// If we're adopting a node that's not in a document, it might still
// have a binding applied. Remove the binding from the element now
// that it's getting adopted into a new document.
// TODO Fully tear down the binding.
adoptedNode->AsContent()->SetXBLBinding(nullptr);
}
break;