зеркало из https://github.com/mozilla/pjs.git
Bug 614724. Quickstub createElementNS. r=peterv a=jst
This commit is contained in:
Родитель
709b88033c
Коммит
03283958ad
|
@ -4351,7 +4351,18 @@ nsDocument::CreateElementNS(const nsAString& aNamespaceURI,
|
|||
nsIDOMElement** aReturn)
|
||||
{
|
||||
*aReturn = nsnull;
|
||||
nsCOMPtr<nsIContent> content;
|
||||
nsresult rv = CreateElementNS(aNamespaceURI, aQualifiedName,
|
||||
getter_AddRefs(content));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
return CallQueryInterface(content, aReturn);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsDocument::CreateElementNS(const nsAString& aNamespaceURI,
|
||||
const nsAString& aQualifiedName,
|
||||
nsIContent** aReturn)
|
||||
{
|
||||
nsCOMPtr<nsINodeInfo> nodeInfo;
|
||||
nsresult rv = nsContentUtils::GetNodeInfoFromQName(aNamespaceURI,
|
||||
aQualifiedName,
|
||||
|
@ -4359,13 +4370,9 @@ nsDocument::CreateElementNS(const nsAString& aNamespaceURI,
|
|||
getter_AddRefs(nodeInfo));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIContent> content;
|
||||
PRInt32 ns = nodeInfo->NamespaceID();
|
||||
rv = NS_NewElement(getter_AddRefs(content), ns, nodeInfo.forget(),
|
||||
NOT_FROM_PARSER);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return CallQueryInterface(content, aReturn);
|
||||
return NS_NewElement(aReturn, nodeInfo->NamespaceID(),
|
||||
nodeInfo.forget(), NOT_FROM_PARSER);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -859,6 +859,9 @@ public:
|
|||
|
||||
nsresult CreateElement(const nsAString& aTagName,
|
||||
nsIContent** aReturn);
|
||||
nsresult CreateElementNS(const nsAString& aNamespaceURI,
|
||||
const nsAString& aQualifiedName,
|
||||
nsIContent** aReturn);
|
||||
|
||||
nsresult CreateTextNode(const nsAString& aData, nsIContent** aReturn);
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ members = [
|
|||
'nsIDOMDocument.getElementById',
|
||||
'nsIDOMDocument.createDocumentFragment',
|
||||
'nsIDOMDocument.createElement',
|
||||
'nsIDOMDocument.createElementNS',
|
||||
'nsIDOMDocument.importNode',
|
||||
'nsIDOMDocument.createTextNode',
|
||||
'nsIDOMElement.removeAttributeNS',
|
||||
|
@ -909,6 +910,11 @@ customMethodCalls = {
|
|||
'code': ' nsCOMPtr<nsIContent> result;\n'
|
||||
' rv = self->CreateElement(arg0, getter_AddRefs(result));'
|
||||
},
|
||||
'nsIDOMDocument_CreateElementNS': {
|
||||
'thisType': 'nsDocument',
|
||||
'code': ' nsCOMPtr<nsIContent> result;\n'
|
||||
' rv = self->CreateElementNS(arg0, arg1, getter_AddRefs(result));'
|
||||
},
|
||||
'nsIDOMDocument_CreateTextNode': {
|
||||
'thisType': 'nsDocument',
|
||||
'code': ' nsCOMPtr<nsIContent> result;\n'
|
||||
|
|
Загрузка…
Ссылка в новой задаче