Author: akhaldi
Date: Thu Sep 25 15:39:47 2014
New Revision: 64278
URL:
http://svn.reactos.org/svn/reactos?rev=64278&view=rev
Log:
[URLMON]
* Sync with Wine 1.7.27.
CORE-8540
Modified:
trunk/reactos/dll/win32/urlmon/bindprot.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/dll/win32/urlmon/urlmon_main.c
trunk/reactos/dll/win32/urlmon/urlmon_main.h
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/urlmon/bindprot.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/bindprot.…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/bindprot.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/bindprot.c [iso-8859-1] Thu Sep 25 15:39:47 2014
@@ -80,14 +80,49 @@
return DefWindowProcW(hwnd, msg, wParam, lParam);
}
+#ifndef __REACTOS__
+
+static const WCHAR wszURLMonikerNotificationWindow[] =
+ {'U','R','L','
','M','o','n','i','k','e','r','
',
+
'N','o','t','i','f','i','c','a','t','i','o','n','
','W','i','n','d','o','w',0};
+
+static ATOM notif_wnd_class;
+
+static BOOL WINAPI register_notif_wnd_class(INIT_ONCE *once, void *param, void
**context)
+{
+ static WNDCLASSEXW wndclass = {
+ sizeof(wndclass), 0, notif_wnd_proc, 0, 0,
+ NULL, NULL, NULL, NULL, NULL,
+ wszURLMonikerNotificationWindow, NULL
+ };
+
+ wndclass.hInstance = hProxyDll;
+ notif_wnd_class = RegisterClassExW(&wndclass);
+ return TRUE;
+}
+
+void unregister_notif_wnd_class(void)
+{
+ if(notif_wnd_class)
+ UnregisterClassW(MAKEINTRESOURCEW(notif_wnd_class), hProxyDll);
+}
+
+#endif /* !__REACTOS__ */
+
HWND get_notif_hwnd(void)
{
+#ifdef __REACTOS__
static ATOM wnd_class = 0;
+#endif
tls_data_t *tls_data;
+#ifdef __REACTOS__
static const WCHAR wszURLMonikerNotificationWindow[] =
{'U','R','L','
','M','o','n','i','k','e','r','
',
'N','o','t','i','f','i','c','a','t','i','o','n','
','W','i','n','d','o','w',0};
+#else
+ static INIT_ONCE init_once = INIT_ONCE_STATIC_INIT;
+#endif
tls_data = get_tls_data();
if(!tls_data)
@@ -98,6 +133,11 @@
return tls_data->notif_hwnd;
}
+#ifndef __REACTOS__
+ InitOnceExecuteOnce(&init_once, register_notif_wnd_class, NULL, NULL);
+ if(!notif_wnd_class)
+ return NULL;
+#else
if(!wnd_class) {
static WNDCLASSEXW wndclass = {
sizeof(wndclass), 0,
@@ -113,8 +153,13 @@
if (!wnd_class && GetLastError() == ERROR_CLASS_ALREADY_EXISTS)
wnd_class = 1;
}
-
+#endif
+
+#ifndef __REACTOS__
+ tls_data->notif_hwnd = CreateWindowExW(0, MAKEINTRESOURCEW(notif_wnd_class),
+#else
tls_data->notif_hwnd = CreateWindowExW(0, wszURLMonikerNotificationWindow,
+#endif
wszURLMonikerNotificationWindow, 0, 0, 0, 0, 0, HWND_MESSAGE,
NULL, hProxyDll, NULL);
if(tls_data->notif_hwnd)
@@ -685,6 +730,9 @@
if(!This->reported_result)
return E_FAIL;
+ /* This may get released in Terminate call. */
+ IInternetProtocolEx_AddRef(&This->IInternetProtocolEx_iface);
+
IInternetProtocol_Terminate(This->protocol, 0);
set_binding_sink(This, NULL, NULL);
@@ -694,6 +742,7 @@
This->bind_info = NULL;
}
+ IInternetProtocolEx_Release(&This->IInternetProtocolEx_iface);
return S_OK;
}
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] Thu Sep 25 15:39:47 2014
@@ -277,7 +277,12 @@
&& (b[1] == 'h' || b[1] == 'H')
&& (b[2] == 'e' || b[2] == 'E')
&& (b[3] == 'a' || b[3] == 'A')
- && (b[4] == 'd' || b[4] == 'D'))) return TRUE;
+ && (b[4] == 'd' || b[4] == 'D'))
+ || (b[0] == '<'
+ && (b[1] == 'b' || b[1] == 'B')
+ && (b[2] == 'o' || b[2] == 'O')
+ && (b[3] == 'd' || b[3] == 'D')
+ && (b[4] == 'y' || b[4] == 'Y'))) return TRUE;
return FALSE;
}
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] Thu Sep 25 15:39:47 2014
@@ -230,11 +230,9 @@
*
* Doesn't match the pattern.
*/
- if(str_len > pattern_len) {
- if(str[str_len-pattern_len-1] == '.' &&
!strcmpiW(str+(str_len-pattern_len), pattern)) {
- matches = TRUE;
- *matched = str+(str_len-pattern_len);
- }
+ if(str[str_len-pattern_len-1] == '.' &&
!strcmpiW(str+(str_len-pattern_len), pattern)) {
+ matches = TRUE;
+ *matched = str+(str_len-pattern_len);
}
} else {
/* The pattern doesn't have an implicit wildcard, or an explicit
wildcard,
@@ -2066,7 +2064,7 @@
/********************************************************************
* IsInternetESCEnabledLocal (URLMON.108)
*
- * Undocumented, returns if IE is running in Enhanced Security Configuration.
+ * Undocumented, returns TRUE if IE is running in Enhanced Security Configuration.
*/
BOOL WINAPI IsInternetESCEnabledLocal(void)
{
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] Thu Sep 25 15:39:47 2014
@@ -340,8 +340,8 @@
(val >= '0' && val <= '9'));
}
-static inline BOOL is_path_delim(WCHAR val) {
- return (!val || val == '#' || val == '?');
+static inline BOOL is_path_delim(URL_SCHEME scheme, WCHAR val) {
+ return (!val || (val == '#' && scheme != URL_SCHEME_FILE) || val ==
'?');
}
static inline BOOL is_slash(WCHAR c)
@@ -1834,7 +1834,7 @@
static const WCHAR slash[] = {'/',0};
const BOOL is_file = data->scheme_type == URL_SCHEME_FILE;
- if(is_path_delim(**ptr)) {
+ if(is_path_delim(data->scheme_type, **ptr)) {
if(data->scheme_type == URL_SCHEME_WILDCARD &&
!data->must_have_path) {
data->path = NULL;
data->path_len = 0;
@@ -1844,7 +1844,7 @@
data->path_len = 1;
}
} else {
- while(!is_path_delim(**ptr)) {
+ while(!is_path_delim(data->scheme_type, **ptr)) {
if(**ptr == '%' && data->scheme_type != URL_SCHEME_UNKNOWN
&& !is_file) {
if(!check_pct_encoded(ptr)) {
*ptr = start;
@@ -1919,7 +1919,7 @@
else
data->path = *ptr;
- while(!is_path_delim(**ptr)) {
+ while(!is_path_delim(data->scheme_type, **ptr)) {
if(**ptr == '%' && known_scheme) {
if(!check_pct_encoded(ptr)) {
*ptr = data->path;
@@ -2830,7 +2830,7 @@
* file:///c:/test%test -> file:///c:/test%25test
*/
static DWORD canonicalize_path_hierarchical(const WCHAR *path, DWORD path_len, URL_SCHEME
scheme_type, BOOL has_host, DWORD flags,
- WCHAR *ret_path) {
+ BOOL is_implicit_scheme, WCHAR *ret_path) {
const BOOL known_scheme = scheme_type != URL_SCHEME_UNKNOWN;
const BOOL is_file = scheme_type == URL_SCHEME_FILE;
const BOOL is_res = scheme_type == URL_SCHEME_RES;
@@ -2896,7 +2896,7 @@
len += 3;
do_default_action = FALSE;
} else if((is_unreserved(val) && known_scheme) ||
- (is_file && (is_unreserved(val) || is_reserved(val) ||
+ (is_file && !is_implicit_scheme &&
(is_unreserved(val) || is_reserved(val) ||
(val && flags&Uri_CREATE_FILE_USE_DOS_PATH &&
!is_forbidden_dos_path_char(val))))) {
if(ret_path)
ret_path[len] = val;
@@ -2921,7 +2921,7 @@
}
} else if(known_scheme && !is_res && !is_unreserved(*ptr)
&& !is_reserved(*ptr) &&
(!(flags & Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS) || is_file))
{
- if(!(is_file && (flags & Uri_CREATE_FILE_USE_DOS_PATH))) {
+ if(!is_file || !(flags & Uri_CREATE_FILE_USE_DOS_PATH)) {
/* Escape the forbidden character. */
if(ret_path)
pct_encode_val(*ptr, ret_path+len);
@@ -3114,7 +3114,7 @@
if(!computeOnly)
uri->path_start = uri->canon_len;
uri->path_len = canonicalize_path_hierarchical(data->path,
data->path_len, data->scheme_type, data->host_len != 0,
- flags, computeOnly ? NULL : uri->canon_uri+uri->canon_len);
+ flags, data->has_implicit_scheme, computeOnly ? NULL :
uri->canon_uri+uri->canon_len);
uri->canon_len += uri->path_len;
if(!computeOnly && !uri->path_len)
uri->path_start = -1;
@@ -3881,8 +3881,8 @@
return S_OK;
}
- len_a = canonicalize_path_hierarchical(a->canon_uri+a->path_start,
a->path_len, a->scheme_type, FALSE, 0, NULL);
- len_b = canonicalize_path_hierarchical(b->canon_uri+b->path_start,
b->path_len, b->scheme_type, FALSE, 0, NULL);
+ len_a = canonicalize_path_hierarchical(a->canon_uri+a->path_start,
a->path_len, a->scheme_type, FALSE, 0, FALSE, NULL);
+ len_b = canonicalize_path_hierarchical(b->canon_uri+b->path_start,
b->path_len, b->scheme_type, FALSE, 0, FALSE, NULL);
canon_path_a = heap_alloc(len_a*sizeof(WCHAR));
if(!canon_path_a)
@@ -3893,8 +3893,8 @@
return E_OUTOFMEMORY;
}
- len_a = canonicalize_path_hierarchical(a->canon_uri+a->path_start,
a->path_len, a->scheme_type, FALSE, 0, canon_path_a);
- len_b = canonicalize_path_hierarchical(b->canon_uri+b->path_start,
b->path_len, b->scheme_type, FALSE, 0, canon_path_b);
+ len_a = canonicalize_path_hierarchical(a->canon_uri+a->path_start,
a->path_len, a->scheme_type, FALSE, 0, FALSE, canon_path_a);
+ len_b = canonicalize_path_hierarchical(b->canon_uri+b->path_start,
b->path_len, b->scheme_type, FALSE, 0, FALSE, canon_path_b);
*ret = len_a == len_b && !memicmpW(canon_path_a, canon_path_b, len_a);
Modified: trunk/reactos/dll/win32/urlmon/urlmon_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/urlmon_ma…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/urlmon_main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/urlmon_main.c [iso-8859-1] Thu Sep 25 15:39:47 2014
@@ -127,6 +127,9 @@
free_session();
free_tls_list();
+#ifndef __REACTOS__
+ unregister_notif_wnd_class();
+#endif
}
/***********************************************************************
Modified: trunk/reactos/dll/win32/urlmon/urlmon_main.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/urlmon_ma…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/urlmon_main.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/urlmon_main.h [iso-8859-1] Thu Sep 25 15:39:47 2014
@@ -236,6 +236,9 @@
tls_data_t *get_tls_data(void) DECLSPEC_HIDDEN;
+#ifndef __REACTOS__
+void unregister_notif_wnd_class(void) DECLSPEC_HIDDEN;
+#endif
HWND get_notif_hwnd(void) DECLSPEC_HIDDEN;
void release_notif_hwnd(HWND) DECLSPEC_HIDDEN;
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] Thu Sep 25 15:39:47 2014
@@ -198,7 +198,7 @@
reactos/dll/win32/unicows # Synced to Wine-1.3.32 (Win9x only, why do we need
this?!)
reactos/dll/win32/updspapi # Synced to Wine-1.7.17
reactos/dll/win32/url # Synced to Wine-1.7.17
-reactos/dll/win32/urlmon # Synced to Wine-1.7.17
+reactos/dll/win32/urlmon # Synced to Wine-1.7.27
reactos/dll/win32/usp10 # Synced to Wine-1.7.17
reactos/dll/win32/uxtheme # Forked
reactos/dll/win32/vbscript # Synced to Wine-1.7.17