зеркало из https://github.com/mozilla/gecko-dev.git
Bug 771934 - Throw NOT_FOUND_ERR instead of HIERARCHY_REQUEST_ERR from nsINode::RemoveChild; r=bz
This commit is contained in:
Родитель
6113a6857c
Коммит
215c4e9e59
|
@ -437,10 +437,11 @@ nsINode::RemoveChild(nsINode *aOldChild)
|
|||
}
|
||||
|
||||
if (IsNodeOfType(eDATA_NODE)) {
|
||||
return NS_ERROR_DOM_HIERARCHY_REQUEST_ERR;
|
||||
// aOldChild can't be one of our children.
|
||||
return NS_ERROR_DOM_NOT_FOUND_ERR;
|
||||
}
|
||||
|
||||
if (aOldChild && aOldChild->GetNodeParent() == this) {
|
||||
if (aOldChild->GetNodeParent() == this) {
|
||||
nsContentUtils::MaybeFireNodeRemoved(aOldChild, this, OwnerDoc());
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
{
|
||||
"Calling removeChild on a comment with no children should throw NOT_FOUND_ERR.": true,
|
||||
"Calling removeChild on a text with no children should throw NOT_FOUND_ERR.": true,
|
||||
"Passing a value that is not a Node reference to removeChild should throw TypeError.": true
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче