Bug 802560 - Handle the second argument to DOMImplementation.createDocument correctly; r=bz

This commit is contained in:
Ms2ger 2013-03-10 08:58:42 +01:00
parent 51b1c35b48
commit 933d9c7a9b
3 changed files with 3 additions and 12 deletions

View File

@ -91,10 +91,6 @@ DOMImplementation::CreateDocument(const nsAString& aNamespaceURI,
return NS_ERROR_DOM_NAMESPACE_ERR;
}
}
else if (DOMStringIsNull(aQualifiedName) &&
!DOMStringIsNull(aNamespaceURI)) {
return NS_ERROR_DOM_NAMESPACE_ERR;
}
nsCOMPtr<nsIScriptGlobalObject> scriptHandlingObject =
do_QueryReferent(mScriptObject);

View File

@ -1,11 +1,5 @@
{
"createDocument test 15: \"http://example.com/\",null,null,null": true,
"createDocument test 30: \"/\",null,null,null": true,
"createDocument test 45: \"http://www.w3.org/XML/1998/namespace\",null,null,null": true,
"createDocument test 60: \"http://www.w3.org/2000/xmlns/\",null,null,null": true,
"createDocument test 75: \"foo:\",null,null,null": true,
"createDocument test 91: null,null,DocumentType node,\"WRONG_DOCUMENT_ERR\"": true,
"createDocument test 92: null,null,DocumentType node,\"WRONG_DOCUMENT_ERR\"": true,
"createDocument test 94: null,null,DocumentType node,\"WRONG_DOCUMENT_ERR\"": true,
"createDocument test 96: \"foo\",null,DocumentType node,null": true
"createDocument test 94: null,null,DocumentType node,\"WRONG_DOCUMENT_ERR\"": true
}

View File

@ -19,7 +19,8 @@ interface DOMImplementation {
DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId,
DOMString systemId);
[Throws]
Document createDocument(DOMString? namespace, DOMString? qualifiedName,
Document createDocument(DOMString? namespace,
[TreatNullAs=EmptyString] DOMString qualifiedName,
DocumentType? doctype);
[Throws]
Document createHTMLDocument(DOMString title);