msxml3: Don't use xmlnode's IXMLDOMNode iface in get_[previous|next]Sibling implementations.
This commit is contained in:
parent
5e5cd71ff1
commit
55175042eb
|
@ -271,7 +271,10 @@ static HRESULT WINAPI domattr_get_previousSibling(
|
|||
IXMLDOMNode** domNode)
|
||||
{
|
||||
domattr *This = impl_from_IXMLDOMAttribute( iface );
|
||||
return IXMLDOMNode_get_previousSibling( IXMLDOMNode_from_impl(&This->node), domNode );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, domNode);
|
||||
|
||||
return return_null_node(domNode);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domattr_get_nextSibling(
|
||||
|
@ -279,7 +282,10 @@ static HRESULT WINAPI domattr_get_nextSibling(
|
|||
IXMLDOMNode** domNode)
|
||||
{
|
||||
domattr *This = impl_from_IXMLDOMAttribute( iface );
|
||||
return IXMLDOMNode_get_nextSibling( IXMLDOMNode_from_impl(&This->node), domNode );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, domNode);
|
||||
|
||||
return return_null_node(domNode);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domattr_get_attributes(
|
||||
|
|
|
@ -282,7 +282,10 @@ static HRESULT WINAPI domcdata_get_previousSibling(
|
|||
IXMLDOMNode** domNode)
|
||||
{
|
||||
domcdata *This = impl_from_IXMLDOMCDATASection( iface );
|
||||
return IXMLDOMNode_get_previousSibling( IXMLDOMNode_from_impl(&This->node), domNode );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, domNode);
|
||||
|
||||
return node_get_previous_sibling(&This->node, domNode);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domcdata_get_nextSibling(
|
||||
|
@ -290,7 +293,10 @@ static HRESULT WINAPI domcdata_get_nextSibling(
|
|||
IXMLDOMNode** domNode)
|
||||
{
|
||||
domcdata *This = impl_from_IXMLDOMCDATASection( iface );
|
||||
return IXMLDOMNode_get_nextSibling( IXMLDOMNode_from_impl(&This->node), domNode );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, domNode);
|
||||
|
||||
return node_get_next_sibling(&This->node, domNode);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domcdata_get_attributes(
|
||||
|
|
|
@ -275,7 +275,10 @@ static HRESULT WINAPI domcomment_get_previousSibling(
|
|||
IXMLDOMNode** domNode)
|
||||
{
|
||||
domcomment *This = impl_from_IXMLDOMComment( iface );
|
||||
return IXMLDOMNode_get_previousSibling( IXMLDOMNode_from_impl(&This->node), domNode );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, domNode);
|
||||
|
||||
return node_get_previous_sibling(&This->node, domNode);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domcomment_get_nextSibling(
|
||||
|
@ -283,7 +286,10 @@ static HRESULT WINAPI domcomment_get_nextSibling(
|
|||
IXMLDOMNode** domNode)
|
||||
{
|
||||
domcomment *This = impl_from_IXMLDOMComment( iface );
|
||||
return IXMLDOMNode_get_nextSibling( IXMLDOMNode_from_impl(&This->node), domNode );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, domNode);
|
||||
|
||||
return node_get_next_sibling(&This->node, domNode);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domcomment_get_attributes(
|
||||
|
|
|
@ -277,7 +277,10 @@ static HRESULT WINAPI domfrag_get_previousSibling(
|
|||
IXMLDOMNode** domNode)
|
||||
{
|
||||
domfrag *This = impl_from_IXMLDOMDocumentFragment( iface );
|
||||
return IXMLDOMNode_get_previousSibling( IXMLDOMNode_from_impl(&This->node), domNode );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, domNode);
|
||||
|
||||
return return_null_node(domNode);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domfrag_get_nextSibling(
|
||||
|
@ -285,7 +288,10 @@ static HRESULT WINAPI domfrag_get_nextSibling(
|
|||
IXMLDOMNode** domNode)
|
||||
{
|
||||
domfrag *This = impl_from_IXMLDOMDocumentFragment( iface );
|
||||
return IXMLDOMNode_get_nextSibling( IXMLDOMNode_from_impl(&This->node), domNode );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, domNode);
|
||||
|
||||
return return_null_node(domNode);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domfrag_get_attributes(
|
||||
|
|
|
@ -788,7 +788,10 @@ static HRESULT WINAPI domdoc_get_previousSibling(
|
|||
IXMLDOMNode** previousSibling )
|
||||
{
|
||||
domdoc *This = impl_from_IXMLDOMDocument3( iface );
|
||||
return IXMLDOMNode_get_previousSibling( IXMLDOMNode_from_impl(&This->node), previousSibling );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, previousSibling);
|
||||
|
||||
return return_null_node(previousSibling);
|
||||
}
|
||||
|
||||
|
||||
|
@ -797,7 +800,10 @@ static HRESULT WINAPI domdoc_get_nextSibling(
|
|||
IXMLDOMNode** nextSibling )
|
||||
{
|
||||
domdoc *This = impl_from_IXMLDOMDocument3( iface );
|
||||
return IXMLDOMNode_get_nextSibling( IXMLDOMNode_from_impl(&This->node), nextSibling );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, nextSibling);
|
||||
|
||||
return return_null_node(nextSibling);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -286,7 +286,10 @@ static HRESULT WINAPI domelem_get_previousSibling(
|
|||
IXMLDOMNode** domNode)
|
||||
{
|
||||
domelem *This = impl_from_IXMLDOMElement( iface );
|
||||
return IXMLDOMNode_get_previousSibling( IXMLDOMNode_from_impl(&This->node), domNode );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, domNode);
|
||||
|
||||
return node_get_previous_sibling(&This->node, domNode);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domelem_get_nextSibling(
|
||||
|
@ -294,7 +297,10 @@ static HRESULT WINAPI domelem_get_nextSibling(
|
|||
IXMLDOMNode** domNode)
|
||||
{
|
||||
domelem *This = impl_from_IXMLDOMElement( iface );
|
||||
return IXMLDOMNode_get_nextSibling( IXMLDOMNode_from_impl(&This->node), domNode );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, domNode);
|
||||
|
||||
return node_get_next_sibling(&This->node, domNode);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domelem_get_attributes(
|
||||
|
|
|
@ -273,7 +273,10 @@ static HRESULT WINAPI entityref_get_previousSibling(
|
|||
IXMLDOMNode** domNode)
|
||||
{
|
||||
entityref *This = impl_from_IXMLDOMEntityReference( iface );
|
||||
return IXMLDOMNode_get_previousSibling( IXMLDOMNode_from_impl(&This->node), domNode );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, domNode);
|
||||
|
||||
return node_get_previous_sibling(&This->node, domNode);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI entityref_get_nextSibling(
|
||||
|
@ -281,7 +284,10 @@ static HRESULT WINAPI entityref_get_nextSibling(
|
|||
IXMLDOMNode** domNode)
|
||||
{
|
||||
entityref *This = impl_from_IXMLDOMEntityReference( iface );
|
||||
return IXMLDOMNode_get_nextSibling( IXMLDOMNode_from_impl(&This->node), domNode );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, domNode);
|
||||
|
||||
return node_get_next_sibling(&This->node, domNode);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI entityref_get_attributes(
|
||||
|
|
|
@ -166,6 +166,8 @@ extern HRESULT node_get_parent(xmlnode*,IXMLDOMNode**);
|
|||
extern HRESULT node_get_child_nodes(xmlnode*,IXMLDOMNodeList**);
|
||||
extern HRESULT node_get_first_child(xmlnode*,IXMLDOMNode**);
|
||||
extern HRESULT node_get_last_child(xmlnode*,IXMLDOMNode**);
|
||||
extern HRESULT node_get_previous_sibling(xmlnode*,IXMLDOMNode**);
|
||||
extern HRESULT node_get_next_sibling(xmlnode*,IXMLDOMNode**);
|
||||
|
||||
|
||||
extern HRESULT DOMDocument_create_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument3 **document);
|
||||
|
|
|
@ -339,52 +339,30 @@ static HRESULT WINAPI xmlnode_get_lastChild(
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT node_get_previous_sibling(xmlnode *This, IXMLDOMNode **ret)
|
||||
{
|
||||
return get_node(This, "previous", This->node->prev, ret);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI xmlnode_get_previousSibling(
|
||||
IXMLDOMNode *iface,
|
||||
IXMLDOMNode** previousSibling)
|
||||
{
|
||||
xmlnode *This = impl_from_IXMLDOMNode( iface );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, previousSibling );
|
||||
|
||||
if (!previousSibling)
|
||||
return E_INVALIDARG;
|
||||
|
||||
switch( This->node->type )
|
||||
{
|
||||
/* Attribute, Document and Document Fragment Nodes do not support previousSibling */
|
||||
case XML_DOCUMENT_NODE:
|
||||
case XML_DOCUMENT_FRAG_NODE:
|
||||
case XML_ATTRIBUTE_NODE:
|
||||
*previousSibling = NULL;
|
||||
return S_FALSE;
|
||||
default:
|
||||
return get_node( This, "previous", This->node->prev, previousSibling );
|
||||
ERR("Should not be called\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT node_get_next_sibling(xmlnode *This, IXMLDOMNode **ret)
|
||||
{
|
||||
return get_node(This, "next", This->node->next, ret);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI xmlnode_get_nextSibling(
|
||||
IXMLDOMNode *iface,
|
||||
IXMLDOMNode** nextSibling)
|
||||
{
|
||||
xmlnode *This = impl_from_IXMLDOMNode( iface );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, nextSibling );
|
||||
|
||||
if (!nextSibling)
|
||||
return E_INVALIDARG;
|
||||
|
||||
switch( This->node->type )
|
||||
{
|
||||
/* Attribute, Document and Document Fragment Nodes do not support nextSibling */
|
||||
case XML_DOCUMENT_NODE:
|
||||
case XML_DOCUMENT_FRAG_NODE:
|
||||
case XML_ATTRIBUTE_NODE:
|
||||
*nextSibling = NULL;
|
||||
return S_FALSE;
|
||||
default:
|
||||
return get_node( This, "next", This->node->next, nextSibling );
|
||||
}
|
||||
ERR("Should not be called\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI xmlnode_get_attributes(
|
||||
|
@ -1852,7 +1830,10 @@ static HRESULT WINAPI unknode_get_previousSibling(
|
|||
IXMLDOMNode** domNode)
|
||||
{
|
||||
unknode *This = impl_from_unkIXMLDOMNode( iface );
|
||||
return IXMLDOMNode_get_previousSibling( IXMLDOMNode_from_impl(&This->node), domNode );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, domNode);
|
||||
|
||||
return node_get_previous_sibling(&This->node, domNode);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI unknode_get_nextSibling(
|
||||
|
@ -1860,7 +1841,10 @@ static HRESULT WINAPI unknode_get_nextSibling(
|
|||
IXMLDOMNode** domNode)
|
||||
{
|
||||
unknode *This = impl_from_unkIXMLDOMNode( iface );
|
||||
return IXMLDOMNode_get_nextSibling( IXMLDOMNode_from_impl(&This->node), domNode );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, domNode);
|
||||
|
||||
return node_get_next_sibling(&This->node, domNode);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI unknode_get_attributes(
|
||||
|
|
|
@ -288,7 +288,10 @@ static HRESULT WINAPI dom_pi_get_previousSibling(
|
|||
IXMLDOMNode** domNode)
|
||||
{
|
||||
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
|
||||
return IXMLDOMNode_get_previousSibling( IXMLDOMNode_from_impl(&This->node), domNode );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, domNode);
|
||||
|
||||
return node_get_previous_sibling(&This->node, domNode);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dom_pi_get_nextSibling(
|
||||
|
@ -296,7 +299,10 @@ static HRESULT WINAPI dom_pi_get_nextSibling(
|
|||
IXMLDOMNode** domNode)
|
||||
{
|
||||
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
|
||||
return IXMLDOMNode_get_nextSibling( IXMLDOMNode_from_impl(&This->node), domNode );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, domNode);
|
||||
|
||||
return node_get_next_sibling(&This->node, domNode);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dom_pi_get_attributes(
|
||||
|
|
|
@ -288,7 +288,10 @@ static HRESULT WINAPI domtext_get_previousSibling(
|
|||
IXMLDOMNode** domNode)
|
||||
{
|
||||
domtext *This = impl_from_IXMLDOMText( iface );
|
||||
return IXMLDOMNode_get_previousSibling( IXMLDOMNode_from_impl(&This->node), domNode );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, domNode);
|
||||
|
||||
return node_get_previous_sibling(&This->node, domNode);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domtext_get_nextSibling(
|
||||
|
@ -296,7 +299,10 @@ static HRESULT WINAPI domtext_get_nextSibling(
|
|||
IXMLDOMNode** domNode)
|
||||
{
|
||||
domtext *This = impl_from_IXMLDOMText( iface );
|
||||
return IXMLDOMNode_get_nextSibling( IXMLDOMNode_from_impl(&This->node), domNode );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, domNode);
|
||||
|
||||
return node_get_next_sibling(&This->node, domNode);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domtext_get_attributes(
|
||||
|
|
Loading…
Reference in New Issue