mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 614724. Quickstub createElementNS. r=peterv
This commit is contained in:
parent
1073d6a819
commit
5fbee7c023
@ -4351,7 +4351,18 @@ nsDocument::CreateElementNS(const nsAString& aNamespaceURI,
|
|||||||
nsIDOMElement** aReturn)
|
nsIDOMElement** aReturn)
|
||||||
{
|
{
|
||||||
*aReturn = nsnull;
|
*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;
|
nsCOMPtr<nsINodeInfo> nodeInfo;
|
||||||
nsresult rv = nsContentUtils::GetNodeInfoFromQName(aNamespaceURI,
|
nsresult rv = nsContentUtils::GetNodeInfoFromQName(aNamespaceURI,
|
||||||
aQualifiedName,
|
aQualifiedName,
|
||||||
@ -4359,13 +4370,9 @@ nsDocument::CreateElementNS(const nsAString& aNamespaceURI,
|
|||||||
getter_AddRefs(nodeInfo));
|
getter_AddRefs(nodeInfo));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
nsCOMPtr<nsIContent> content;
|
|
||||||
PRInt32 ns = nodeInfo->NamespaceID();
|
PRInt32 ns = nodeInfo->NamespaceID();
|
||||||
rv = NS_NewElement(getter_AddRefs(content), ns, nodeInfo.forget(),
|
return NS_NewElement(aReturn, nodeInfo->NamespaceID(),
|
||||||
NOT_FROM_PARSER);
|
nodeInfo.forget(), NOT_FROM_PARSER);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
|
|
||||||
return CallQueryInterface(content, aReturn);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
@ -859,6 +859,9 @@ public:
|
|||||||
|
|
||||||
nsresult CreateElement(const nsAString& aTagName,
|
nsresult CreateElement(const nsAString& aTagName,
|
||||||
nsIContent** aReturn);
|
nsIContent** aReturn);
|
||||||
|
nsresult CreateElementNS(const nsAString& aNamespaceURI,
|
||||||
|
const nsAString& aQualifiedName,
|
||||||
|
nsIContent** aReturn);
|
||||||
|
|
||||||
nsresult CreateTextNode(const nsAString& aData, nsIContent** aReturn);
|
nsresult CreateTextNode(const nsAString& aData, nsIContent** aReturn);
|
||||||
|
|
||||||
|
@ -103,6 +103,7 @@ members = [
|
|||||||
'nsIDOMDocument.getElementById',
|
'nsIDOMDocument.getElementById',
|
||||||
'nsIDOMDocument.createDocumentFragment',
|
'nsIDOMDocument.createDocumentFragment',
|
||||||
'nsIDOMDocument.createElement',
|
'nsIDOMDocument.createElement',
|
||||||
|
'nsIDOMDocument.createElementNS',
|
||||||
'nsIDOMDocument.importNode',
|
'nsIDOMDocument.importNode',
|
||||||
'nsIDOMDocument.createTextNode',
|
'nsIDOMDocument.createTextNode',
|
||||||
'nsIDOMElement.removeAttributeNS',
|
'nsIDOMElement.removeAttributeNS',
|
||||||
@ -909,6 +910,11 @@ customMethodCalls = {
|
|||||||
'code': ' nsCOMPtr<nsIContent> result;\n'
|
'code': ' nsCOMPtr<nsIContent> result;\n'
|
||||||
' rv = self->CreateElement(arg0, getter_AddRefs(result));'
|
' 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': {
|
'nsIDOMDocument_CreateTextNode': {
|
||||||
'thisType': 'nsDocument',
|
'thisType': 'nsDocument',
|
||||||
'code': ' nsCOMPtr<nsIContent> result;\n'
|
'code': ' nsCOMPtr<nsIContent> result;\n'
|
||||||
|
Loading…
Reference in New Issue
Block a user