[MSXML3] Sync with Wine Staging 1.7.55. CORE-10536

svn path=/trunk/; revision=70049
This commit is contained in:
Amine Khaldi 2015-11-23 09:11:20 +00:00
parent 60505b44a7
commit 36c9923227
6 changed files with 34 additions and 8 deletions

View file

@ -1945,7 +1945,7 @@ static HRESULT WINAPI domdoc_createNode(
}
xml_name = xmlchar_from_wchar(name);
/* prevent empty href to be allocated */
/* prevent empty href from being allocated */
href = namespaceURI ? xmlchar_from_wchar(namespaceURI) : NULL;
switch(node_type)
@ -1958,7 +1958,7 @@ static HRESULT WINAPI domdoc_createNode(
xmlnode = xmlNewDocNode(get_doc(This), NULL, local ? local : xml_name, NULL);
/* allow to create default namespace xmlns= */
/* allow creating the default namespace xmlns= */
if (local || (href && *href))
{
xmlNsPtr ns = xmlNewNs(xmlnode, href, prefix);

View file

@ -1182,7 +1182,9 @@ static HRESULT WINAPI domelem_getAttribute(
domelem *This = impl_from_IXMLDOMElement( iface );
xmlNodePtr element;
xmlChar *xml_name, *xml_value = NULL;
xmlChar *local, *prefix;
HRESULT hr = S_FALSE;
xmlNsPtr ns;
TRACE("(%p)->(%s %p)\n", This, debugstr_w(name), value);
@ -1201,7 +1203,28 @@ static HRESULT WINAPI domelem_getAttribute(
if(!xmlValidateNameValue(xml_name))
hr = E_FAIL;
else
xml_value = xmlGetNsProp(element, xml_name, NULL);
{
if ((local = xmlSplitQName2(xml_name, &prefix)))
{
if (xmlStrEqual(prefix, BAD_CAST "xmlns"))
{
ns = xmlSearchNs(element->doc, element, local);
if (ns)
xml_value = xmlStrdup(ns->href);
}
else
{
ns = xmlSearchNs(element->doc, element, prefix);
if (ns)
xml_value = xmlGetNsProp(element, local, ns->href);
}
xmlFree(prefix);
xmlFree(local);
}
else
xml_value = xmlGetNsProp(element, xml_name, NULL);
}
heap_free(xml_name);
if(xml_value)

View file

@ -477,7 +477,7 @@ HRESULT node_insert_before(xmlnode *This, IXMLDOMNode *new_child, const VARIANT
refcount = xmlnode_get_inst_cnt(node_obj);
if (refcount) xmldoc_add_refs(before_node_obj->node->doc, refcount);
xmlAddPrevSibling(before_node_obj->node, node_obj->node);
node_obj->node = xmlAddPrevSibling(before_node_obj->node, node_obj->node);
if (refcount) xmldoc_release_refs(doc, refcount);
node_obj->parent = This->parent;
}
@ -489,7 +489,7 @@ HRESULT node_insert_before(xmlnode *This, IXMLDOMNode *new_child, const VARIANT
if (refcount) xmldoc_add_refs(This->node->doc, refcount);
/* xmlAddChild doesn't unlink node from previous parent */
xmlUnlinkNode(node_obj->node);
xmlAddChild(This->node, node_obj->node);
node_obj->node = xmlAddChild(This->node, node_obj->node);
if (refcount) xmldoc_release_refs(doc, refcount);
node_obj->parent = This->iface;
}
@ -635,6 +635,8 @@ HRESULT node_has_childnodes(const xmlnode *This, VARIANT_BOOL *ret)
HRESULT node_get_owner_doc(const xmlnode *This, IXMLDOMDocument **doc)
{
if(!doc)
return E_INVALIDARG;
return get_domdoc_from_xmldoc(This->node->doc, (IXMLDOMDocument3**)doc);
}

View file

@ -668,12 +668,13 @@ static void format_error_message_from_id(saxlocator *This, HRESULT hr)
static void update_position(saxlocator *This, BOOL fix_column)
{
const xmlChar *p = This->pParserCtxt->input->cur-1;
const xmlChar *baseP = This->pParserCtxt->input->base;
This->line = xmlSAX2GetLineNumber(This->pParserCtxt);
if(fix_column)
{
This->column = 1;
for(; *p!='\n' && *p!='\r' && p>=This->pParserCtxt->input->base; p--)
for(;p>=baseP && *p!='\n' && *p!='\r'; p--)
This->column++;
}
else

View file

@ -256,7 +256,7 @@ typedef struct _XML_NODE_INFO
]
library XMLPSR
{
importlib("stdole32.tlb");
/* importlib("stdole32.tlb"); */
importlib("stdole2.tlb");
[

View file

@ -132,7 +132,7 @@ reactos/dll/win32/msvfw32 # Synced to WineStaging-1.7.55
reactos/dll/win32/msvidc32 # Synced to WineStaging-1.7.55
reactos/dll/win32/msxml # Synced to WineStaging-1.7.47
reactos/dll/win32/msxml2 # Synced to WineStaging-1.7.47
reactos/dll/win32/msxml3 # Synced to WineStaging-1.7.47
reactos/dll/win32/msxml3 # Synced to WineStaging-1.7.55
reactos/dll/win32/msxml4 # Synced to WineStaging-1.7.47
reactos/dll/win32/msxml6 # Synced to WineStaging-1.7.47
reactos/dll/win32/nddeapi # Synced to WineStaging-1.7.47