Author: akhaldi
Date: Wed Jul 22 00:37:05 2015
New Revision: 68533
URL:
http://svn.reactos.org/svn/reactos?rev=68533&view=rev
Log:
[URLMON] Sync with Wine Staging 1.7.47. CORE-9924
Modified:
trunk/reactos/dll/win32/urlmon/bindctx.c
trunk/reactos/dll/win32/urlmon/file.c
trunk/reactos/dll/win32/urlmon/mimefilter.c
trunk/reactos/dll/win32/urlmon/sec_mgr.c
trunk/reactos/dll/win32/urlmon/uri.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/urlmon/bindctx.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/bindctx.c…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/bindctx.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/bindctx.c [iso-8859-1] Wed Jul 22 00:37:05 2015
@@ -24,6 +24,7 @@
typedef struct {
IBindStatusCallbackEx IBindStatusCallbackEx_iface;
+ IInternetBindInfo IInternetBindInfo_iface;
IServiceProvider IServiceProvider_iface;
IHttpNegotiate2 IHttpNegotiate2_iface;
IAuthenticate IAuthenticate_iface;
@@ -121,6 +122,9 @@
}else if(IsEqualGUID(&IID_IAuthenticate, riid)) {
TRACE("(%p)->(IID_IAuthenticate, %p)\n", This, ppv);
*ppv = &This->IAuthenticate_iface;
+ }else if(IsEqualGUID(&IID_IInternetBindInfo, riid)) {
+ TRACE("(%p)->(IID_IInternetBindInfo, %p)\n", This, ppv);
+ *ppv = &This->IInternetBindInfo_iface;
}
if(*ppv) {
@@ -492,6 +496,63 @@
BSCAuthenticate_Authenticate
};
+static inline BindStatusCallback *impl_from_IInternetBindInfo(IInternetBindInfo *iface)
+{
+ return CONTAINING_RECORD(iface, BindStatusCallback, IInternetBindInfo_iface);
+}
+
+static HRESULT WINAPI BSCInternetBindInfo_QueryInterface(IInternetBindInfo *iface, REFIID
riid, void **ppv)
+{
+ BindStatusCallback *This = impl_from_IInternetBindInfo(iface);
+ return
IBindStatusCallbackEx_QueryInterface(&This->IBindStatusCallbackEx_iface, riid,
ppv);
+}
+
+static ULONG WINAPI BSCInternetBindInfo_AddRef(IInternetBindInfo *iface)
+{
+ BindStatusCallback *This = impl_from_IInternetBindInfo(iface);
+ return IBindStatusCallbackEx_AddRef(&This->IBindStatusCallbackEx_iface);
+}
+
+static ULONG WINAPI BSCInternetBindInfo_Release(IInternetBindInfo *iface)
+{
+ BindStatusCallback *This = impl_from_IInternetBindInfo(iface);
+ return IBindStatusCallbackEx_Release(&This->IBindStatusCallbackEx_iface);
+}
+
+static HRESULT WINAPI BSCInternetBindInfo_GetBindInfo(IInternetBindInfo *iface, DWORD
*bindf, BINDINFO *bindinfo)
+{
+ BindStatusCallback *This = impl_from_IInternetBindInfo(iface);
+ FIXME("(%p)->(%p %p)\n", This, bindf, bindinfo);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI BSCInternetBindInfo_GetBindString(IInternetBindInfo *iface, ULONG
string_type,
+ WCHAR **strs, ULONG cnt, ULONG *fetched)
+{
+ BindStatusCallback *This = impl_from_IInternetBindInfo(iface);
+ IInternetBindInfo *bind_info;
+ HRESULT hres;
+
+ TRACE("(%p)->(%d %p %d %p)\n", This, string_type, strs, cnt, fetched);
+
+ hres = IBindStatusCallback_QueryInterface(This->callback,
&IID_IInternetBindInfo, (void**)&bind_info);
+ if(FAILED(hres))
+ return hres;
+
+ hres = IInternetBindInfo_GetBindString(bind_info, string_type, strs, cnt, fetched);
+
+ IInternetBindInfo_Release(bind_info);
+ return hres;
+}
+
+static IInternetBindInfoVtbl BSCInternetBindInfoVtbl = {
+ BSCInternetBindInfo_QueryInterface,
+ BSCInternetBindInfo_AddRef,
+ BSCInternetBindInfo_Release,
+ BSCInternetBindInfo_GetBindInfo,
+ BSCInternetBindInfo_GetBindString
+};
+
static void set_callback(BindStatusCallback *This, IBindStatusCallback *bsc)
{
IServiceProvider *serv_prov;
@@ -518,6 +579,7 @@
return E_OUTOFMEMORY;
ret->IBindStatusCallbackEx_iface.lpVtbl = &BindStatusCallbackExVtbl;
+ ret->IInternetBindInfo_iface.lpVtbl = &BSCInternetBindInfoVtbl;
ret->IServiceProvider_iface.lpVtbl = &BSCServiceProviderVtbl;
ret->IHttpNegotiate2_iface.lpVtbl = &BSCHttpNegotiateVtbl;
ret->IAuthenticate_iface.lpVtbl = &BSCAuthenticateVtbl;
Modified: trunk/reactos/dll/win32/urlmon/file.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/file.c?re…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/file.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/file.c [iso-8859-1] Wed Jul 22 00:37:05 2015
@@ -211,35 +211,14 @@
return hres;
}
-static HRESULT open_file(FileProtocol *This, const WCHAR *path, IInternetProtocolSink
*protocol_sink)
-{
- LARGE_INTEGER size;
- HANDLE file;
-
- file = CreateFileW(path, GENERIC_READ, FILE_SHARE_READ, NULL,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- if(file == INVALID_HANDLE_VALUE)
- return report_result(protocol_sink, INET_E_RESOURCE_NOT_FOUND, GetLastError());
-
- if(!GetFileSizeEx(file, &size)) {
- CloseHandle(file);
- return report_result(protocol_sink, INET_E_RESOURCE_NOT_FOUND, GetLastError());
- }
-
- This->file = file;
- This->size = size.u.LowPart;
-
- IInternetProtocolSink_ReportProgress(protocol_sink,
- BINDSTATUS_CACHEFILENAMEAVAILABLE, path);
- return S_OK;
-}
-
static HRESULT WINAPI FileProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUri,
IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo,
DWORD grfPI, HANDLE *dwReserved)
{
FileProtocol *This = impl_from_IInternetProtocolEx(iface);
- WCHAR path[MAX_PATH];
+ WCHAR path[MAX_PATH], *ptr;
+ LARGE_INTEGER file_size;
+ HANDLE file_handle;
BINDINFO bindinfo;
DWORD grfBINDF = 0;
DWORD scheme, size;
@@ -290,13 +269,31 @@
return report_result(pOIProtSink, hres, 0);
}
- hres = open_file(This, path, pOIProtSink);
- if(FAILED(hres))
- return hres;
+ file_handle = CreateFileW(path, GENERIC_READ, FILE_SHARE_READ, NULL,
+ OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+ if(file_handle == INVALID_HANDLE_VALUE && (ptr = strrchrW(path,
'#'))) {
+ /* If path contains fragment part, try without it. */
+ *ptr = 0;
+ file_handle = CreateFileW(path, GENERIC_READ, FILE_SHARE_READ, NULL,
+ OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+ }
+ if(file_handle == INVALID_HANDLE_VALUE)
+ return report_result(pOIProtSink, INET_E_RESOURCE_NOT_FOUND, GetLastError());
+
+ if(!GetFileSizeEx(file_handle, &file_size)) {
+ CloseHandle(file_handle);
+ return report_result(pOIProtSink, INET_E_RESOURCE_NOT_FOUND, GetLastError());
+ }
+
+ This->file = file_handle;
+ This->size = file_size.u.LowPart;
+ IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_CACHEFILENAMEAVAILABLE,
path);
hres = IUri_GetExtension(pUri, &ext);
if(SUCCEEDED(hres)) {
if(hres == S_OK && *ext) {
+ if((ptr = strchrW(ext, '#')))
+ *ptr = 0;
hres = find_mime_from_ext(ext, &mime);
if(SUCCEEDED(hres)) {
IInternetProtocolSink_ReportProgress(pOIProtSink,
Modified: trunk/reactos/dll/win32/urlmon/mimefilter.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/mimefilte…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/mimefilter.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/mimefilter.c [iso-8859-1] Wed Jul 22 00:37:05 2015
@@ -694,8 +694,5 @@
if(pwzMimeProposed || pBuffer)
return find_mime_from_buffer(pBuffer, cbSize, pwzMimeProposed, pwzUrl,
ppwzMimeOut);
- if(pwzUrl)
- return find_mime_from_url(pwzUrl, ppwzMimeOut);
-
- return E_FAIL;
-}
+ return find_mime_from_url(pwzUrl, ppwzMimeOut);
+}
Modified: trunk/reactos/dll/win32/urlmon/sec_mgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/sec_mgr.c…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/sec_mgr.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/sec_mgr.c [iso-8859-1] Wed Jul 22 00:37:05 2015
@@ -884,7 +884,7 @@
TRACE("(%p) ref=%u\n", This, refCount);
- /* destroy the object if there's no more reference on it */
+ /* destroy the object if there are no more references on it */
if (!refCount){
if(This->mgrsite)
IInternetSecurityMgrSite_Release(This->mgrsite);
Modified: trunk/reactos/dll/win32/urlmon/uri.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/uri.c?rev…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/uri.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/uri.c [iso-8859-1] Wed Jul 22 00:37:05 2015
@@ -6834,8 +6834,7 @@
ptr = uri->canon_uri+uri->scheme_start+uri->scheme_len+1;
pptr = &ptr;
}
- reduce_path = !(flags & URL_NO_META) &&
- !(flags & URL_DONT_SIMPLIFY) &&
+ reduce_path = !(flags & URL_DONT_SIMPLIFY) &&
ptr && check_hierarchical(pptr);
for(ptr = uri->canon_uri; ptr < uri->canon_uri+uri->canon_len; ++ptr) {
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Wed Jul 22 00:37:05 2015
@@ -195,7 +195,7 @@
reactos/dll/win32/unicows # Synced to Wine-1.3.32 (Win9x only, why do we need
this?!)
reactos/dll/win32/updspapi # Synced to WineStaging-1.7.37
reactos/dll/win32/url # Synced to WineStaging-1.7.37
-reactos/dll/win32/urlmon # Synced to WineStaging-1.7.37
+reactos/dll/win32/urlmon # Synced to WineStaging-1.7.47
reactos/dll/win32/usp10 # Synced to WineStaging-1.7.47
reactos/dll/win32/uxtheme # Forked
reactos/dll/win32/vbscript # Synced to WineStaging-1.7.37