Commit d04fd1d0 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msxml3: Fail on certain node types in insertBefore() for attributes, remove broken tests.

parent 873619e9
......@@ -309,13 +309,32 @@ static HRESULT WINAPI domattr_get_attributes(
static HRESULT WINAPI domattr_insertBefore(
IXMLDOMAttribute *iface,
IXMLDOMNode* newNode, VARIANT refChild,
IXMLDOMNode** outOldNode)
IXMLDOMNode** old_node)
{
domattr *This = impl_from_IXMLDOMAttribute( iface );
DOMNodeType type;
HRESULT hr;
FIXME("(%p)->(%p %s %p) needs test\n", This, newNode, debugstr_variant(&refChild), old_node);
FIXME("(%p)->(%p %s %p) needs test\n", This, newNode, debugstr_variant(&refChild), outOldNode);
if (!newNode) return E_INVALIDARG;
return node_insert_before(&This->node, newNode, &refChild, outOldNode);
hr = IXMLDOMNode_get_nodeType(newNode, &type);
if (hr != S_OK) return hr;
TRACE("new node type %d\n", type);
switch (type)
{
case NODE_ATTRIBUTE:
case NODE_CDATA_SECTION:
case NODE_COMMENT:
case NODE_ELEMENT:
case NODE_PROCESSING_INSTRUCTION:
if (old_node) *old_node = NULL;
return E_FAIL;
default:
return node_insert_before(&This->node, newNode, &refChild, old_node);
}
}
static HRESULT WINAPI domattr_replaceChild(
......
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