mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 06:30:37 +00:00
msxml3: Text node should not aggregate element.
This commit is contained in:
parent
64e44d1156
commit
9fe98546e4
@ -559,6 +559,9 @@ static void test_domdoc( void )
|
||||
{
|
||||
IXMLDOMNamedNodeMap *pAttribs;
|
||||
|
||||
r = IXMLDOMText_QueryInterface(nodetext, &IID_IXMLDOMElement, (LPVOID*)&element);
|
||||
ok(r == E_NOINTERFACE, "ret %08x\n", r );
|
||||
|
||||
/* Text Last Child Checks */
|
||||
r = IXMLDOMText_get_lastChild(nodetext, NULL);
|
||||
ok(r == E_INVALIDARG, "ret %08x\n", r );
|
||||
|
@ -42,7 +42,7 @@ typedef struct _domtext
|
||||
{
|
||||
const struct IXMLDOMTextVtbl *lpVtbl;
|
||||
LONG ref;
|
||||
IUnknown *element_unk;
|
||||
IUnknown *node_unk;
|
||||
IXMLDOMNode *node;
|
||||
} domtext;
|
||||
|
||||
@ -66,10 +66,9 @@ static HRESULT WINAPI domtext_QueryInterface(
|
||||
{
|
||||
*ppvObject = iface;
|
||||
}
|
||||
else if ( IsEqualGUID( riid, &IID_IXMLDOMNode ) ||
|
||||
IsEqualGUID( riid, &IID_IXMLDOMElement ) )
|
||||
else if ( IsEqualGUID( riid, &IID_IXMLDOMNode ) )
|
||||
{
|
||||
return IUnknown_QueryInterface(This->element_unk, riid, ppvObject);
|
||||
return IUnknown_QueryInterface(This->node_unk, riid, ppvObject);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -98,7 +97,7 @@ static ULONG WINAPI domtext_Release(
|
||||
ref = InterlockedDecrement( &This->ref );
|
||||
if ( ref == 0 )
|
||||
{
|
||||
IUnknown_Release( This->element_unk );
|
||||
IUnknown_Release( This->node_unk );
|
||||
HeapFree( GetProcessHeap(), 0, This );
|
||||
}
|
||||
|
||||
@ -773,17 +772,17 @@ IUnknown* create_text( xmlNodePtr text )
|
||||
This->lpVtbl = &domtext_vtbl;
|
||||
This->ref = 1;
|
||||
|
||||
This->element_unk = create_element( text, (IUnknown*)&This->lpVtbl );
|
||||
if(!This->element_unk)
|
||||
This->node_unk = create_basic_node( text, (IUnknown*)&This->lpVtbl );
|
||||
if(!This->node_unk)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
hr = IUnknown_QueryInterface(This->element_unk, &IID_IXMLDOMNode, (LPVOID*)&This->node);
|
||||
hr = IUnknown_QueryInterface(This->node_unk, &IID_IXMLDOMNode, (LPVOID*)&This->node);
|
||||
if(FAILED(hr))
|
||||
{
|
||||
IUnknown_Release(This->element_unk);
|
||||
IUnknown_Release(This->node_unk);
|
||||
HeapFree( GetProcessHeap(), 0, This );
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user