msxml3: Remove forward to removeChild() method for nodes.

This commit is contained in:
Nikolay Sivov 2011-02-23 14:28:44 +03:00 committed by Alexandre Julliard
parent 12d4683f05
commit 1178f7b46e
11 changed files with 37 additions and 33 deletions

View File

@ -326,10 +326,11 @@ static HRESULT WINAPI domattr_replaceChild(
static HRESULT WINAPI domattr_removeChild(
IXMLDOMAttribute *iface,
IXMLDOMNode* domNode, IXMLDOMNode** oldNode)
IXMLDOMNode *child, IXMLDOMNode **oldChild)
{
domattr *This = impl_from_IXMLDOMAttribute( iface );
return IXMLDOMNode_removeChild( &This->node.IXMLDOMNode_iface, domNode, oldNode );
TRACE("(%p)->(%p %p)\n", This, child, oldChild);
return node_remove_child(&This->node, child, oldChild);
}
static HRESULT WINAPI domattr_appendChild(

View File

@ -337,10 +337,11 @@ static HRESULT WINAPI domcdata_replaceChild(
static HRESULT WINAPI domcdata_removeChild(
IXMLDOMCDATASection *iface,
IXMLDOMNode* domNode, IXMLDOMNode** oldNode)
IXMLDOMNode *child, IXMLDOMNode **oldChild)
{
domcdata *This = impl_from_IXMLDOMCDATASection( iface );
return IXMLDOMNode_removeChild( &This->node.IXMLDOMNode_iface, domNode, oldNode );
TRACE("(%p)->(%p %p)\n", This, child, oldChild);
return node_remove_child(&This->node, child, oldChild);
}
static HRESULT WINAPI domcdata_appendChild(

View File

@ -330,10 +330,11 @@ static HRESULT WINAPI domcomment_replaceChild(
static HRESULT WINAPI domcomment_removeChild(
IXMLDOMComment *iface,
IXMLDOMNode* domNode, IXMLDOMNode** oldNode)
IXMLDOMNode *child, IXMLDOMNode **oldChild)
{
domcomment *This = impl_from_IXMLDOMComment( iface );
return IXMLDOMNode_removeChild( &This->node.IXMLDOMNode_iface, domNode, oldNode );
TRACE("(%p)->(%p %p)\n", This, child, oldChild);
return node_remove_child(&This->node, child, oldChild);
}
static HRESULT WINAPI domcomment_appendChild(

View File

@ -334,10 +334,11 @@ static HRESULT WINAPI domfrag_replaceChild(
static HRESULT WINAPI domfrag_removeChild(
IXMLDOMDocumentFragment *iface,
IXMLDOMNode* domNode, IXMLDOMNode** oldNode)
IXMLDOMNode *child, IXMLDOMNode **oldChild)
{
domfrag *This = impl_from_IXMLDOMDocumentFragment( iface );
return IXMLDOMNode_removeChild( &This->node.IXMLDOMNode_iface, domNode, oldNode );
TRACE("(%p)->(%p %p)\n", This, child, oldChild);
return node_remove_child(&This->node, child, oldChild);
}
static HRESULT WINAPI domfrag_appendChild(

View File

@ -1217,11 +1217,12 @@ static HRESULT WINAPI domdoc_replaceChild(
static HRESULT WINAPI domdoc_removeChild(
IXMLDOMDocument3 *iface,
IXMLDOMNode* childNode,
IXMLDOMNode** oldChild)
IXMLDOMNode *child,
IXMLDOMNode **oldChild)
{
domdoc *This = impl_from_IXMLDOMDocument3( iface );
return IXMLDOMNode_removeChild( &This->node.IXMLDOMNode_iface, childNode, oldChild );
TRACE("(%p)->(%p %p)\n", This, child, oldChild);
return node_remove_child(&This->node, child, oldChild);
}

View File

@ -345,10 +345,11 @@ static HRESULT WINAPI domelem_replaceChild(
static HRESULT WINAPI domelem_removeChild(
IXMLDOMElement *iface,
IXMLDOMNode* domNode, IXMLDOMNode** oldNode)
IXMLDOMNode *child, IXMLDOMNode **oldChild)
{
domelem *This = impl_from_IXMLDOMElement( iface );
return IXMLDOMNode_removeChild( &This->node.IXMLDOMNode_iface, domNode, oldNode );
TRACE("(%p)->(%p %p)\n", This, child, oldChild);
return node_remove_child(&This->node, child, oldChild);
}
static HRESULT WINAPI domelem_appendChild(

View File

@ -328,10 +328,11 @@ static HRESULT WINAPI entityref_replaceChild(
static HRESULT WINAPI entityref_removeChild(
IXMLDOMEntityReference *iface,
IXMLDOMNode* domNode, IXMLDOMNode** oldNode)
IXMLDOMNode *child, IXMLDOMNode **oldChild)
{
entityref *This = impl_from_IXMLDOMEntityReference( iface );
return IXMLDOMNode_removeChild( &This->node.IXMLDOMNode_iface, domNode, oldNode );
TRACE("(%p)->(%p %p)\n", This, child, oldChild);
return node_remove_child(&This->node, child, oldChild);
}
static HRESULT WINAPI entityref_appendChild(

View File

@ -271,6 +271,7 @@ extern HRESULT node_clone(xmlnode*,VARIANT_BOOL,IXMLDOMNode**);
extern HRESULT node_get_prefix(xmlnode*,BSTR*);
extern HRESULT node_get_base_name(xmlnode*,BSTR*);
extern HRESULT node_get_namespaceURI(xmlnode*,BSTR*);
extern HRESULT node_remove_child(xmlnode*,IXMLDOMNode*,IXMLDOMNode**);
extern HRESULT DOMDocument_create_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument3 **document);
extern HRESULT SchemaCache_validate_tree(IXMLDOMSchemaCollection2* iface, xmlNodePtr tree);

View File

@ -401,22 +401,16 @@ HRESULT node_replace_child(xmlnode *This, IXMLDOMNode *newChild, IXMLDOMNode *ol
return S_OK;
}
static HRESULT WINAPI xmlnode_removeChild(
IXMLDOMNode *iface,
IXMLDOMNode* childNode,
IXMLDOMNode** oldChild)
HRESULT node_remove_child(xmlnode *This, IXMLDOMNode* child, IXMLDOMNode** oldChild)
{
xmlnode *This = impl_from_IXMLDOMNode( iface );
xmlnode *child_node;
TRACE("(%p)->(%p %p)\n", This, childNode, oldChild);
if(!childNode) return E_INVALIDARG;
if(!child) return E_INVALIDARG;
if(oldChild)
*oldChild = NULL;
child_node = get_node_obj(childNode);
child_node = get_node_obj(child);
if(!child_node) {
FIXME("childNode is not our node implementation\n");
return E_FAIL;
@ -424,7 +418,7 @@ static HRESULT WINAPI xmlnode_removeChild(
if(child_node->node->parent != This->node)
{
WARN("childNode %p is not a child of %p\n", childNode, iface);
WARN("childNode %p is not a child of %p\n", child, This);
return E_INVALIDARG;
}
@ -432,8 +426,8 @@ static HRESULT WINAPI xmlnode_removeChild(
if(oldChild)
{
IXMLDOMNode_AddRef(childNode);
*oldChild = childNode;
IXMLDOMNode_AddRef(child);
*oldChild = child;
}
return S_OK;
@ -1152,7 +1146,7 @@ static const struct IXMLDOMNodeVtbl xmlnode_vtbl =
NULL,
NULL,
NULL,
xmlnode_removeChild,
NULL,
xmlnode_appendChild,
xmlnode_hasChildNodes,
xmlnode_get_ownerDocument,
@ -1494,7 +1488,7 @@ static HRESULT WINAPI unknode_removeChild(
IXMLDOMNode* domNode, IXMLDOMNode** oldNode)
{
unknode *This = unknode_from_IXMLDOMNode( iface );
return IXMLDOMNode_removeChild( &This->node.IXMLDOMNode_iface, domNode, oldNode );
return node_remove_child(&This->node, domNode, oldNode);
}
static HRESULT WINAPI unknode_appendChild(

View File

@ -344,10 +344,11 @@ static HRESULT WINAPI dom_pi_replaceChild(
static HRESULT WINAPI dom_pi_removeChild(
IXMLDOMProcessingInstruction *iface,
IXMLDOMNode* domNode, IXMLDOMNode** oldNode)
IXMLDOMNode *child, IXMLDOMNode **oldChild)
{
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_removeChild( &This->node.IXMLDOMNode_iface, domNode, oldNode );
TRACE("(%p)->(%p %p)\n", This, child, oldChild);
return node_remove_child(&This->node, child, oldChild);
}
static HRESULT WINAPI dom_pi_appendChild(

View File

@ -343,10 +343,11 @@ static HRESULT WINAPI domtext_replaceChild(
static HRESULT WINAPI domtext_removeChild(
IXMLDOMText *iface,
IXMLDOMNode* domNode, IXMLDOMNode** oldNode)
IXMLDOMNode *child, IXMLDOMNode **oldChild)
{
domtext *This = impl_from_IXMLDOMText( iface );
return IXMLDOMNode_removeChild( &This->node.IXMLDOMNode_iface, domNode, oldNode );
TRACE("(%p)->(%p %p)\n", This, child, oldChild);
return node_remove_child(&This->node, child, oldChild);
}
static HRESULT WINAPI domtext_appendChild(