Commit 6e76c894 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

msxml3: Don't use xmlnode's IXMLDOMNode iface in get_nodeType and get_nodeParent implementations.

parent 9413fab3
......@@ -215,7 +215,11 @@ static HRESULT WINAPI domattr_get_nodeType(
DOMNodeType* domNodeType )
{
domattr *This = impl_from_IXMLDOMAttribute( iface );
return IXMLDOMNode_get_nodeType( IXMLDOMNode_from_impl(&This->node), domNodeType );
TRACE("(%p)->(%p)\n", This, domNodeType);
*domNodeType = NODE_ATTRIBUTE;
return S_OK;
}
static HRESULT WINAPI domattr_get_parentNode(
......
......@@ -226,7 +226,11 @@ static HRESULT WINAPI domcdata_get_nodeType(
DOMNodeType* domNodeType )
{
domcdata *This = impl_from_IXMLDOMCDATASection( iface );
return IXMLDOMNode_get_nodeType( IXMLDOMNode_from_impl(&This->node), domNodeType );
TRACE("(%p)->(%p)\n", This, domNodeType);
*domNodeType = NODE_CDATA_SECTION;
return S_OK;
}
static HRESULT WINAPI domcdata_get_parentNode(
......@@ -234,7 +238,10 @@ static HRESULT WINAPI domcdata_get_parentNode(
IXMLDOMNode** parent )
{
domcdata *This = impl_from_IXMLDOMCDATASection( iface );
return IXMLDOMNode_get_parentNode( IXMLDOMNode_from_impl(&This->node), parent );
TRACE("(%p)->(%p)\n", This, parent);
return node_get_parent(&This->node, parent);
}
static HRESULT WINAPI domcdata_get_childNodes(
......
......@@ -219,7 +219,11 @@ static HRESULT WINAPI domcomment_get_nodeType(
DOMNodeType* domNodeType )
{
domcomment *This = impl_from_IXMLDOMComment( iface );
return IXMLDOMNode_get_nodeType( IXMLDOMNode_from_impl(&This->node), domNodeType );
TRACE("(%p)->(%p)\n", This, domNodeType);
*domNodeType = NODE_COMMENT;
return S_OK;
}
static HRESULT WINAPI domcomment_get_parentNode(
......@@ -227,7 +231,10 @@ static HRESULT WINAPI domcomment_get_parentNode(
IXMLDOMNode** parent )
{
domcomment *This = impl_from_IXMLDOMComment( iface );
return IXMLDOMNode_get_parentNode( IXMLDOMNode_from_impl(&This->node), parent );
TRACE("(%p)->(%p)\n", This, parent);
return node_get_parent(&This->node, parent);
}
static HRESULT WINAPI domcomment_get_childNodes(
......
......@@ -221,7 +221,11 @@ static HRESULT WINAPI domfrag_get_nodeType(
DOMNodeType* domNodeType )
{
domfrag *This = impl_from_IXMLDOMDocumentFragment( iface );
return IXMLDOMNode_get_nodeType( IXMLDOMNode_from_impl(&This->node), domNodeType );
TRACE("(%p)->(%p)\n", This, domNodeType);
*domNodeType = NODE_DOCUMENT_FRAGMENT;
return S_OK;
}
static HRESULT WINAPI domfrag_get_parentNode(
......@@ -229,7 +233,10 @@ static HRESULT WINAPI domfrag_get_parentNode(
IXMLDOMNode** parent )
{
domfrag *This = impl_from_IXMLDOMDocumentFragment( iface );
return IXMLDOMNode_get_parentNode( IXMLDOMNode_from_impl(&This->node), parent );
TRACE("(%p)->(%p)\n", This, parent);
return node_get_parent(&This->node, parent);
}
static HRESULT WINAPI domfrag_get_childNodes(
......
......@@ -727,7 +727,11 @@ static HRESULT WINAPI domdoc_get_nodeType(
DOMNodeType* type )
{
domdoc *This = impl_from_IXMLDOMDocument3( iface );
return IXMLDOMNode_get_nodeType( IXMLDOMNode_from_impl(&This->node), type );
TRACE("(%p)->(%p)\n", This, type);
*type = NODE_DOCUMENT;
return S_OK;
}
......@@ -736,7 +740,10 @@ static HRESULT WINAPI domdoc_get_parentNode(
IXMLDOMNode** parent )
{
domdoc *This = impl_from_IXMLDOMDocument3( iface );
return IXMLDOMNode_get_parentNode( IXMLDOMNode_from_impl(&This->node), parent );
TRACE("(%p)->(%p)\n", This, parent);
return node_get_parent(&This->node, parent);
}
......
......@@ -230,7 +230,11 @@ static HRESULT WINAPI domelem_get_nodeType(
DOMNodeType* domNodeType )
{
domelem *This = impl_from_IXMLDOMElement( iface );
return IXMLDOMNode_get_nodeType( IXMLDOMNode_from_impl(&This->node), domNodeType );
TRACE("(%p)->(%p)\n", This, domNodeType);
*domNodeType = NODE_ELEMENT;
return S_OK;
}
static HRESULT WINAPI domelem_get_parentNode(
......@@ -238,7 +242,10 @@ static HRESULT WINAPI domelem_get_parentNode(
IXMLDOMNode** parent )
{
domelem *This = impl_from_IXMLDOMElement( iface );
return IXMLDOMNode_get_parentNode( IXMLDOMNode_from_impl(&This->node), parent );
TRACE("(%p)->(%p)\n", This, parent);
return node_get_parent(&This->node, parent);
}
static HRESULT WINAPI domelem_get_childNodes(
......
......@@ -217,7 +217,11 @@ static HRESULT WINAPI entityref_get_nodeType(
DOMNodeType* domNodeType )
{
entityref *This = impl_from_IXMLDOMEntityReference( iface );
return IXMLDOMNode_get_nodeType( IXMLDOMNode_from_impl(&This->node), domNodeType );
TRACE("(%p)->(%p)\n", This, domNodeType);
*domNodeType = NODE_ENTITY_REFERENCE;
return S_OK;
}
static HRESULT WINAPI entityref_get_parentNode(
......@@ -225,7 +229,10 @@ static HRESULT WINAPI entityref_get_parentNode(
IXMLDOMNode** parent )
{
entityref *This = impl_from_IXMLDOMEntityReference( iface );
return IXMLDOMNode_get_parentNode( IXMLDOMNode_from_impl(&This->node), parent );
TRACE("(%p)->(%p)\n", This, parent);
return node_get_parent(&This->node, parent);
}
static HRESULT WINAPI entityref_get_childNodes(
......
......@@ -162,6 +162,7 @@ extern xmlnode *get_node_obj(IXMLDOMNode*);
extern HRESULT node_get_nodeName(xmlnode*,BSTR*);
extern HRESULT node_get_content(xmlnode*,VARIANT*);
extern HRESULT node_put_value(xmlnode*,VARIANT*);
extern HRESULT node_get_parent(xmlnode*,IXMLDOMNode**);
extern HRESULT DOMDocument_create_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument3 **document);
......
......@@ -255,16 +255,8 @@ static HRESULT WINAPI xmlnode_get_nodeType(
IXMLDOMNode *iface,
DOMNodeType* type)
{
xmlnode *This = impl_from_IXMLDOMNode( iface );
TRACE("(%p)->(%p)\n", This, type);
assert( (int)NODE_ELEMENT == (int)XML_ELEMENT_NODE );
assert( (int)NODE_NOTATION == (int)XML_NOTATION_NODE );
*type = This->node->type;
return S_OK;
ERR("Should not be called\n");
return E_NOTIMPL;
}
static HRESULT get_node(
......@@ -288,12 +280,17 @@ static HRESULT get_node(
return S_OK;
}
HRESULT node_get_parent(xmlnode *This, IXMLDOMNode **parent)
{
return get_node( This, "parent", This->node->parent, parent );
}
static HRESULT WINAPI xmlnode_get_parentNode(
IXMLDOMNode *iface,
IXMLDOMNode** parent)
{
xmlnode *This = impl_from_IXMLDOMNode( iface );
return get_node( This, "parent", This->node->parent, parent );
ERR("Should not be called\n");
return E_NOTIMPL;
}
static HRESULT WINAPI xmlnode_get_childNodes(
......@@ -1805,7 +1802,11 @@ static HRESULT WINAPI unknode_get_nodeType(
DOMNodeType* domNodeType )
{
unknode *This = impl_from_unkIXMLDOMNode( iface );
return IXMLDOMNode_get_nodeType( IXMLDOMNode_from_impl(&This->node), domNodeType );
FIXME("(%p)->(%p)\n", This, domNodeType);
*domNodeType = This->node.node->type;
return S_OK;
}
static HRESULT WINAPI unknode_get_parentNode(
......@@ -1813,7 +1814,7 @@ static HRESULT WINAPI unknode_get_parentNode(
IXMLDOMNode** parent )
{
unknode *This = impl_from_unkIXMLDOMNode( iface );
TRACE("(%p)->(%p)\n", This, parent);
FIXME("(%p)->(%p)\n", This, parent);
if (!parent) return E_INVALIDARG;
*parent = NULL;
return S_FALSE;
......
......@@ -232,7 +232,11 @@ static HRESULT WINAPI dom_pi_get_nodeType(
DOMNodeType* domNodeType )
{
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_nodeType( IXMLDOMNode_from_impl(&This->node), domNodeType );
TRACE("(%p)->(%p)\n", This, domNodeType);
*domNodeType = NODE_PROCESSING_INSTRUCTION;
return S_OK;
}
static HRESULT WINAPI dom_pi_get_parentNode(
......@@ -240,7 +244,10 @@ static HRESULT WINAPI dom_pi_get_parentNode(
IXMLDOMNode** parent )
{
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_parentNode( IXMLDOMNode_from_impl(&This->node), parent );
TRACE("(%p)->(%p)\n", This, parent);
return node_get_parent(&This->node, parent);
}
static HRESULT WINAPI dom_pi_get_childNodes(
......
......@@ -232,7 +232,11 @@ static HRESULT WINAPI domtext_get_nodeType(
DOMNodeType* domNodeType )
{
domtext *This = impl_from_IXMLDOMText( iface );
return IXMLDOMNode_get_nodeType( IXMLDOMNode_from_impl(&This->node), domNodeType );
TRACE("(%p)->(%p)\n", This, domNodeType);
*domNodeType = NODE_TEXT;
return S_OK;
}
static HRESULT WINAPI domtext_get_parentNode(
......@@ -240,7 +244,10 @@ static HRESULT WINAPI domtext_get_parentNode(
IXMLDOMNode** parent )
{
domtext *This = impl_from_IXMLDOMText( iface );
return IXMLDOMNode_get_parentNode( IXMLDOMNode_from_impl(&This->node), parent );
TRACE("(%p)->(%p)\n", This, parent);
return node_get_parent(&This->node, parent);
}
static HRESULT WINAPI domtext_get_childNodes(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment