[MSXML3] Sync with Wine Staging 1.9.16. CORE-11866

svn path=/trunk/; revision=72296
This commit is contained in:
Amine Khaldi 2016-08-18 10:27:06 +00:00
parent 5613aa4e45
commit 2336f78df3
5 changed files with 38 additions and 15 deletions

View file

@ -90,7 +90,6 @@ typedef struct
{ {
httprequest req; httprequest req;
IServerXMLHTTPRequest IServerXMLHTTPRequest_iface; IServerXMLHTTPRequest IServerXMLHTTPRequest_iface;
LONG ref;
} serverhttp; } serverhttp;
static inline httprequest *impl_from_IXMLHTTPRequest( IXMLHTTPRequest *iface ) static inline httprequest *impl_from_IXMLHTTPRequest( IXMLHTTPRequest *iface )
@ -1536,19 +1535,19 @@ static HRESULT WINAPI
httprequest_ObjectWithSite_QueryInterface( IObjectWithSite* iface, REFIID riid, void** ppvObject ) httprequest_ObjectWithSite_QueryInterface( IObjectWithSite* iface, REFIID riid, void** ppvObject )
{ {
httprequest *This = impl_from_IObjectWithSite(iface); httprequest *This = impl_from_IObjectWithSite(iface);
return IXMLHTTPRequest_QueryInterface( (IXMLHTTPRequest *)This, riid, ppvObject ); return IXMLHTTPRequest_QueryInterface(&This->IXMLHTTPRequest_iface, riid, ppvObject);
} }
static ULONG WINAPI httprequest_ObjectWithSite_AddRef( IObjectWithSite* iface ) static ULONG WINAPI httprequest_ObjectWithSite_AddRef( IObjectWithSite* iface )
{ {
httprequest *This = impl_from_IObjectWithSite(iface); httprequest *This = impl_from_IObjectWithSite(iface);
return IXMLHTTPRequest_AddRef((IXMLHTTPRequest *)This); return IXMLHTTPRequest_AddRef(&This->IXMLHTTPRequest_iface);
} }
static ULONG WINAPI httprequest_ObjectWithSite_Release( IObjectWithSite* iface ) static ULONG WINAPI httprequest_ObjectWithSite_Release( IObjectWithSite* iface )
{ {
httprequest *This = impl_from_IObjectWithSite(iface); httprequest *This = impl_from_IObjectWithSite(iface);
return IXMLHTTPRequest_Release((IXMLHTTPRequest *)This); return IXMLHTTPRequest_Release(&This->IXMLHTTPRequest_iface);
} }
static HRESULT WINAPI httprequest_ObjectWithSite_GetSite( IObjectWithSite *iface, REFIID iid, void **ppvSite ) static HRESULT WINAPI httprequest_ObjectWithSite_GetSite( IObjectWithSite *iface, REFIID iid, void **ppvSite )
@ -1632,19 +1631,19 @@ static const IObjectWithSiteVtbl ObjectWithSiteVtbl =
static HRESULT WINAPI httprequest_Safety_QueryInterface(IObjectSafety *iface, REFIID riid, void **ppv) static HRESULT WINAPI httprequest_Safety_QueryInterface(IObjectSafety *iface, REFIID riid, void **ppv)
{ {
httprequest *This = impl_from_IObjectSafety(iface); httprequest *This = impl_from_IObjectSafety(iface);
return IXMLHTTPRequest_QueryInterface( (IXMLHTTPRequest *)This, riid, ppv ); return IXMLHTTPRequest_QueryInterface(&This->IXMLHTTPRequest_iface, riid, ppv);
} }
static ULONG WINAPI httprequest_Safety_AddRef(IObjectSafety *iface) static ULONG WINAPI httprequest_Safety_AddRef(IObjectSafety *iface)
{ {
httprequest *This = impl_from_IObjectSafety(iface); httprequest *This = impl_from_IObjectSafety(iface);
return IXMLHTTPRequest_AddRef((IXMLHTTPRequest *)This); return IXMLHTTPRequest_AddRef(&This->IXMLHTTPRequest_iface);
} }
static ULONG WINAPI httprequest_Safety_Release(IObjectSafety *iface) static ULONG WINAPI httprequest_Safety_Release(IObjectSafety *iface)
{ {
httprequest *This = impl_from_IObjectSafety(iface); httprequest *This = impl_from_IObjectSafety(iface);
return IXMLHTTPRequest_Release((IXMLHTTPRequest *)This); return IXMLHTTPRequest_Release(&This->IXMLHTTPRequest_iface);
} }
static HRESULT WINAPI httprequest_Safety_GetInterfaceSafetyOptions(IObjectSafety *iface, REFIID riid, static HRESULT WINAPI httprequest_Safety_GetInterfaceSafetyOptions(IObjectSafety *iface, REFIID riid,
@ -1713,7 +1712,7 @@ static HRESULT WINAPI ServerXMLHTTPRequest_QueryInterface(IServerXMLHTTPRequest
static ULONG WINAPI ServerXMLHTTPRequest_AddRef(IServerXMLHTTPRequest *iface) static ULONG WINAPI ServerXMLHTTPRequest_AddRef(IServerXMLHTTPRequest *iface)
{ {
serverhttp *This = impl_from_IServerXMLHTTPRequest( iface ); serverhttp *This = impl_from_IServerXMLHTTPRequest( iface );
ULONG ref = InterlockedIncrement( &This->ref ); ULONG ref = InterlockedIncrement( &This->req.ref );
TRACE("(%p)->(%u)\n", This, ref ); TRACE("(%p)->(%u)\n", This, ref );
return ref; return ref;
} }
@ -1721,7 +1720,7 @@ static ULONG WINAPI ServerXMLHTTPRequest_AddRef(IServerXMLHTTPRequest *iface)
static ULONG WINAPI ServerXMLHTTPRequest_Release(IServerXMLHTTPRequest *iface) static ULONG WINAPI ServerXMLHTTPRequest_Release(IServerXMLHTTPRequest *iface)
{ {
serverhttp *This = impl_from_IServerXMLHTTPRequest( iface ); serverhttp *This = impl_from_IServerXMLHTTPRequest( iface );
ULONG ref = InterlockedDecrement( &This->ref ); ULONG ref = InterlockedDecrement( &This->req.ref );
TRACE("(%p)->(%u)\n", This, ref ); TRACE("(%p)->(%u)\n", This, ref );
@ -2017,7 +2016,6 @@ HRESULT ServerXMLHTTP_create(void **obj)
init_httprequest(&req->req); init_httprequest(&req->req);
req->IServerXMLHTTPRequest_iface.lpVtbl = &ServerXMLHTTPRequestVtbl; req->IServerXMLHTTPRequest_iface.lpVtbl = &ServerXMLHTTPRequestVtbl;
req->ref = 1;
*obj = &req->IServerXMLHTTPRequest_iface; *obj = &req->IServerXMLHTTPRequest_iface;

View file

@ -2500,7 +2500,7 @@ static HRESULT internal_parseBuffer(saxreader *This, const char *buffer, int siz
if (encoding == XML_CHAR_ENCODING_NONE) if (encoding == XML_CHAR_ENCODING_NONE)
{ {
const WCHAR *ptr = (WCHAR*)buffer; const WCHAR *ptr = (WCHAR*)buffer;
/* xml declaration with possibly specified encoding will be still handled by parser */ /* an xml declaration with optional encoding will still be handled by the parser */
if ((size >= 2) && *ptr == '<' && ptr[1] != '?') if ((size >= 2) && *ptr == '<' && ptr[1] != '?')
{ {
enc_name = (xmlChar*)xmlGetCharEncodingName(XML_CHAR_ENCODING_UTF16LE); enc_name = (xmlChar*)xmlGetCharEncodingName(XML_CHAR_ENCODING_UTF16LE);

View file

@ -1227,7 +1227,30 @@ static HRESULT WINAPI schema_cache_add(IXMLDOMSchemaCollection2* iface, BSTR uri
IUnknown_QueryInterface(V_UNKNOWN(&var), &IID_IXMLDOMNode, (void**)&domnode); IUnknown_QueryInterface(V_UNKNOWN(&var), &IID_IXMLDOMNode, (void**)&domnode);
if (domnode) if (domnode)
doc = xmlNodePtr_from_domnode(domnode, XML_DOCUMENT_NODE)->doc; {
DOMNodeType type;
IXMLDOMNode_get_nodeType(domnode, &type);
switch (type)
{
case NODE_ELEMENT:
{
IXMLDOMDocument *domdoc;
VARIANT_BOOL b;
BSTR xml;
IXMLDOMNode_get_xml(domnode, &xml);
DOMDocument_create(This->version, (void**)&domdoc);
IXMLDOMDocument_loadXML(domdoc, xml, &b);
SysFreeString(xml);
doc = xmlNodePtr_from_domnode((IXMLDOMNode*)domdoc, XML_DOCUMENT_NODE)->doc;
break;
}
default:
doc = xmlNodePtr_from_domnode(domnode, XML_DOCUMENT_NODE)->doc;
break;
}
}
if (!doc) if (!doc)
{ {

View file

@ -31,6 +31,7 @@ typedef struct _xmlparser
LONG ref; LONG ref;
int flags; int flags;
XML_PARSER_STATE state;
} xmlparser; } xmlparser;
static inline xmlparser *impl_from_IXMLParser( IXMLParser *iface ) static inline xmlparser *impl_from_IXMLParser( IXMLParser *iface )
@ -325,9 +326,9 @@ static HRESULT WINAPI xmlparser_GetParserState(IXMLParser *iface)
{ {
xmlparser *This = impl_from_IXMLParser( iface ); xmlparser *This = impl_from_IXMLParser( iface );
FIXME("(%p)\n", This); TRACE("(%p)\n", This);
return E_NOTIMPL; return This->state;
} }
static HRESULT WINAPI xmlparser_Suspend(IXMLParser *iface) static HRESULT WINAPI xmlparser_Suspend(IXMLParser *iface)
@ -427,6 +428,7 @@ HRESULT XMLParser_create(void **ppObj)
This->nodefactory = NULL; This->nodefactory = NULL;
This->input = NULL; This->input = NULL;
This->flags = 0; This->flags = 0;
This->state = XMLPARSER_IDLE;
This->ref = 1; This->ref = 1;
*ppObj = &This->IXMLParser_iface; *ppObj = &This->IXMLParser_iface;

View file

@ -131,7 +131,7 @@ reactos/dll/win32/msvfw32 # Synced to WineStaging-1.9.16
reactos/dll/win32/msvidc32 # Synced to WineStaging-1.9.11 reactos/dll/win32/msvidc32 # Synced to WineStaging-1.9.11
reactos/dll/win32/msxml # Synced to WineStaging-1.9.11 reactos/dll/win32/msxml # Synced to WineStaging-1.9.11
reactos/dll/win32/msxml2 # Synced to WineStaging-1.9.11 reactos/dll/win32/msxml2 # Synced to WineStaging-1.9.11
reactos/dll/win32/msxml3 # Synced to WineStaging-1.9.11 reactos/dll/win32/msxml3 # Synced to WineStaging-1.9.16
reactos/dll/win32/msxml4 # Synced to WineStaging-1.9.11 reactos/dll/win32/msxml4 # Synced to WineStaging-1.9.11
reactos/dll/win32/msxml6 # Synced to WineStaging-1.9.11 reactos/dll/win32/msxml6 # Synced to WineStaging-1.9.11
reactos/dll/win32/nddeapi # Synced to WineStaging-1.9.11 reactos/dll/win32/nddeapi # Synced to WineStaging-1.9.11