[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: [PATCH 2/3] msxml3: Copy namespaces as attributes.
From: Nikolay Sivov <nsivov () codeweavers ! com>
Date: 2018-08-31 6:08:16
Message-ID: 43b57d41-3b0f-3bf5-2bde-f5aef3d93190 () codeweavers ! com
[Download RAW message or body]
On 08/26/2018 07:27 PM, Daniel Lehman wrote:
> static HRESULT WINAPI xmlnodemap_get_item(
> IXMLDOMNamedNodeMap *iface,
> LONG index,
> IXMLDOMNode** item)
> {
> + HRESULT hr;
> + xmlAttrPtr cur;
> + struct list *ptr;
> + nsattr_entry *nsattr;
> xmlnodemap *This = impl_from_IXMLDOMNamedNodeMap( iface );
>
> TRACE("(%p)->(%d %p)\n", This, index, item);
>
> - return This->funcs->get_item(This->node, index, item);
> + hr = This->funcs->get_item(This->node, index, item);
> + if (hr != S_FALSE)
> + return hr;
> +
> + ptr = list_head(&This->nsattrs);
> + if (!ptr)
> + {
> + if (!This->node->nsDef)
> + return S_FALSE;
> +
> + if (This->node->nsDef)
> + {
> + hr = copy_ns_as_attrs(This);
> + if (FAILED(hr))
> + return hr;
> + }
> +
> + ptr = list_head(&This->nsattrs);
> + if (!ptr)
> + return FALSE;
> + }
> +
> + if (This->node->properties)
> + {
> + --index;
> + cur = This->node->properties;
> + while (cur->next)
> + {
> + --index;
> + cur = cur->next;
> + }
> + }
> +
> + if (index < 0)
> + return S_FALSE;
> +
> + while (index--)
> + ptr = list_next(ptr, ptr);
> +
> + nsattr = LIST_ENTRY(ptr, nsattr_entry, entry);
> + cur = nsattr->attr;
> + *item = create_node((xmlNodePtr) cur);
> +
> + return S_OK;
> }
This only applies to elements, so such fixup should happen there, not in
generic nodemap method.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic