Bug 906301, follow the DOM specs more strictly in case of mutations, r=peterv

--HG--
extra : rebase_source : 775b570151782223cf69705e2225e4f1da4014e7
This commit is contained in:
Olli Pettay 2013-08-21 19:08:23 +03:00
parent 7535e04b74
commit 55e2f46fa1

View File

@ -1808,7 +1808,7 @@ nsINode::ReplaceOrInsertBefore(bool aReplace, nsINode* aNewChild,
}
// Verify that newContent has no parent.
if (newContent->GetParent()) {
if (newContent->GetParentNode()) {
aError.Throw(NS_ERROR_DOM_HIERARCHY_REQUEST_ERR);
return nullptr;
}
@ -1885,7 +1885,7 @@ nsINode::ReplaceOrInsertBefore(bool aReplace, nsINode* aNewChild,
// Verify that all the things in fragChildren have no parent.
for (uint32_t i = 0; i < count; ++i) {
if (fragChildren.ref().ElementAt(i)->GetParent()) {
if (fragChildren.ref().ElementAt(i)->GetParentNode()) {
aError.Throw(NS_ERROR_DOM_HIERARCHY_REQUEST_ERR);
return nullptr;
}