winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2012
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
827 discussions
Start a n
N
ew thread
Jacek Caban : wininet: Added InternetGetSecurityInfoByURL tests.
by Alexandre Julliard
11 Jun '12
11 Jun '12
Module: wine Branch: master Commit: 1325c400c13dddc1078fc242e799653404345203 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1325c400c13dddc1078fc242e…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jun 11 10:22:54 2012 +0200 wininet: Added InternetGetSecurityInfoByURL tests. --- dlls/wininet/tests/Makefile.in | 2 +- dlls/wininet/tests/http.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletions(-) diff --git a/dlls/wininet/tests/Makefile.in b/dlls/wininet/tests/Makefile.in index 2f58593..4d8473f 100644 --- a/dlls/wininet/tests/Makefile.in +++ b/dlls/wininet/tests/Makefile.in @@ -1,5 +1,5 @@ TESTDLL = wininet.dll -IMPORTS = wininet ws2_32 user32 advapi32 +IMPORTS = wininet crypt32 ws2_32 user32 advapi32 C_SRCS = \ ftp.c \ diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index e7be839..fe986e4 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -27,6 +27,7 @@ #include "windef.h" #include "winbase.h" #include "wininet.h" +#include "winineti.h" #include "winsock.h" #include "wine/test.h" @@ -158,6 +159,7 @@ static const test_data_t test_data[] = { }; static INTERNET_STATUS_CALLBACK (WINAPI *pInternetSetStatusCallbackA)(HINTERNET ,INTERNET_STATUS_CALLBACK); +static BOOL (WINAPI *pInternetGetSecurityInfoByURLA)(LPSTR,PCCERT_CHAIN_CONTEXT*,DWORD*); static BOOL proxy_active(void) { @@ -2917,6 +2919,34 @@ static void test_cert_struct(HINTERNET req) release_cert_info(&info); } +#define test_security_info(a,b,c) _test_security_info(__LINE__,a,b,c) +static void _test_security_info(unsigned line, const char *urlc, DWORD error, DWORD ex_flags) +{ + char url[INTERNET_MAX_URL_LENGTH]; + const CERT_CHAIN_CONTEXT *chain; + DWORD flags; + BOOL res; + + if(!pInternetGetSecurityInfoByURLA) { + win_skip("pInternetGetSecurityInfoByURLA not available\n"); + return; + } + + strcpy(url, urlc); + chain = (void*)0xdeadbeef; + flags = 0xdeadbeef; + res = pInternetGetSecurityInfoByURLA(url, &chain, &flags); + if(error == ERROR_SUCCESS) { + ok_(__FILE__,line)(res, "InternetGetSecurityInfoByURLA failed: %u\n", GetLastError()); + ok_(__FILE__,line)(chain != NULL, "chain = NULL\n"); + ok_(__FILE__,line)(flags == ex_flags, "flags = %x\n", flags); + CertFreeCertificateChain(chain); + }else { + ok_(__FILE__,line)(!res && GetLastError() == error, + "InternetGetSecurityInfoByURLA returned: %x(%u), exected %u\n", res, GetLastError(), error); + } +} + #define test_secflags_option(a,b) _test_secflags_option(__LINE__,a,b) static void _test_secflags_option(unsigned line, HINTERNET req, DWORD ex_flags) { @@ -2987,6 +3017,7 @@ static void test_security_flags(void) } test_secflags_option(req, 0); + test_security_info("
https://test.winehq.org/data/some_file.html?q
", ERROR_INTERNET_ITEM_NOT_FOUND, 0); set_secflags(req, TRUE, SECURITY_FLAG_IGNORE_REVOCATION); test_secflags_option(req, SECURITY_FLAG_IGNORE_REVOCATION); @@ -3119,6 +3150,7 @@ static void test_security_flags(void) test_request_flags(req, INTERNET_REQFLAG_NO_HEADERS); test_secflags_option(req, SECURITY_FLAG_IGNORE_REVOCATION|0x1800000); + test_security_info("
https://test.winehq.org/data/some_file.html?q
", ERROR_INTERNET_ITEM_NOT_FOUND, 0); set_secflags(req, FALSE, SECURITY_FLAG_IGNORE_UNKNOWN_CA); test_secflags_option(req, 0x1800000|SECURITY_FLAG_IGNORE_REVOCATION|SECURITY_FLAG_IGNORE_UNKNOWN_CA @@ -3156,6 +3188,7 @@ static void test_security_flags(void) |SECURITY_FLAG_STRENGTH_STRONG|0x1800000); test_cert_struct(req); + test_security_info("
https://test.winehq.org/data/some_file.html?q
", 0, 0x1800000); res = InternetReadFile(req, buf, sizeof(buf), &size); ok(res, "InternetReadFile failed: %u\n", GetLastError()); @@ -3226,6 +3259,10 @@ static void test_security_flags(void) close_async_handle(ses, hCompleteEvent, 2); CloseHandle(hCompleteEvent); + + test_security_info("
http://test.winehq.org/data/some_file.html?q
", ERROR_INTERNET_ITEM_NOT_FOUND, 0); + test_security_info("file:///c:/dir/file.txt", ERROR_INTERNET_ITEM_NOT_FOUND, 0); + test_security_info("xxx:///c:/dir/file.txt", ERROR_INTERNET_ITEM_NOT_FOUND, 0); } static void test_secure_connection(void) @@ -4009,6 +4046,7 @@ START_TEST(http) } pInternetSetStatusCallbackA = (void*)GetProcAddress(hdll, "InternetSetStatusCallbackA"); + pInternetGetSecurityInfoByURLA = (void*)GetProcAddress(hdll, "InternetGetSecurityInfoByURLA"); init_status_tests(); test_InternetCloseHandle();
1
0
0
0
Jacek Caban : wininet: Added InternetGetSecurityInfoByURL[AW] implementation.
by Alexandre Julliard
11 Jun '12
11 Jun '12
Module: wine Branch: master Commit: 6c764fbd4758e1d9d9b2d97c324cc51fe2d09b6e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6c764fbd4758e1d9d9b2d97c3…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jun 11 10:22:38 2012 +0200 wininet: Added InternetGetSecurityInfoByURL[AW] implementation. --- dlls/wininet/http.c | 16 +++++----- dlls/wininet/internet.c | 59 ++++++++++++++++++++++++++++++++++++++--- dlls/wininet/internet.h | 5 +++ dlls/wininet/netconnection.c | 13 +++++++-- 4 files changed, 77 insertions(+), 16 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 620fcf7..0cec4fb 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -244,11 +244,13 @@ void server_release(server_t *server) list_remove(&server->entry); + if(server->cert_chain) + CertFreeCertificateChain(server->cert_chain); heap_free(server->name); heap_free(server); } -static server_t *get_server(const WCHAR *name, INTERNET_PORT port) +server_t *get_server(const WCHAR *name, INTERNET_PORT port, BOOL do_create) { server_t *iter, *server = NULL; @@ -262,13 +264,11 @@ static server_t *get_server(const WCHAR *name, INTERNET_PORT port) } } - if(!server) { - server = heap_alloc(sizeof(*server)); + if(!server && do_create) { + server = heap_alloc_zero(sizeof(*server)); if(server) { - server->addr_len = 0; server->ref = 2; /* list reference and return */ server->port = port; - server->security_flags = 0; list_init(&server->conn_pool); server->name = heap_strdupW(name); if(server->name) { @@ -1724,7 +1724,7 @@ static BOOL HTTP_DealWithProxy(appinfo_t *hIC, http_session_t *session, http_req if(UrlComponents.nPort == INTERNET_INVALID_PORT_NUMBER) UrlComponents.nPort = INTERNET_DEFAULT_HTTP_PORT; - new_server = get_server(UrlComponents.lpszHostName, UrlComponents.nPort); + new_server = get_server(UrlComponents.lpszHostName, UrlComponents.nPort, TRUE); if(!new_server) return FALSE; @@ -3103,7 +3103,7 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session, if(port == INTERNET_INVALID_PORT_NUMBER) port = dwFlags & INTERNET_FLAG_SECURE ? INTERNET_DEFAULT_HTTPS_PORT : INTERNET_DEFAULT_HTTP_PORT; - request->server = get_server(session->hostName, port); + request->server = get_server(session->hostName, port, TRUE); if(!request->server) { WININET_Release(&request->hdr); return ERROR_OUTOFMEMORY; @@ -3931,7 +3931,7 @@ static DWORD HTTP_HandleRedirect(http_request_t *request, LPCWSTR lpszUrl) if(!using_proxy && (strcmpiW(request->server->name, hostName) || request->server->port != urlComponents.nPort)) { server_t *new_server; - new_server = get_server(hostName, urlComponents.nPort); + new_server = get_server(hostName, urlComponents.nPort, TRUE); server_release(request->server); request->server = new_server; } diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 118dcdd..2b659da 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -61,7 +61,6 @@ #include "winreg.h" #include "winuser.h" #include "wininet.h" -#include "winineti.h" #include "winnls.h" #include "wine/debug.h" #include "winerror.h" @@ -4419,8 +4418,18 @@ DWORD WINAPI PrivacyGetZonePreferenceW( DWORD zone, DWORD type, LPDWORD template */ BOOL WINAPI InternetGetSecurityInfoByURLA(LPSTR lpszURL, PCCERT_CHAIN_CONTEXT *ppCertChain, DWORD *pdwSecureFlags) { - FIXME("(%s %p %p)\n", debugstr_a(lpszURL), ppCertChain, pdwSecureFlags); - return FALSE; + WCHAR *url; + BOOL res; + + TRACE("(%s %p %p)\n", debugstr_a(lpszURL), ppCertChain, pdwSecureFlags); + + url = heap_strdupAtoW(lpszURL); + if(!url) + return FALSE; + + res = InternetGetSecurityInfoByURLW(url, ppCertChain, pdwSecureFlags); + heap_free(url); + return res; } /*********************************************************************** @@ -4428,8 +4437,48 @@ BOOL WINAPI InternetGetSecurityInfoByURLA(LPSTR lpszURL, PCCERT_CHAIN_CONTEXT *p */ BOOL WINAPI InternetGetSecurityInfoByURLW(LPCWSTR lpszURL, PCCERT_CHAIN_CONTEXT *ppCertChain, DWORD *pdwSecureFlags) { - FIXME("(%s %p %p)\n", debugstr_w(lpszURL), ppCertChain, pdwSecureFlags); - return FALSE; + WCHAR hostname[INTERNET_MAX_HOST_NAME_LENGTH]; + URL_COMPONENTSW url = {sizeof(url)}; + server_t *server; + BOOL res = FALSE; + + TRACE("(%s %p %p)\n", debugstr_w(lpszURL), ppCertChain, pdwSecureFlags); + + url.lpszHostName = hostname; + url.dwHostNameLength = sizeof(hostname)/sizeof(WCHAR); + + res = InternetCrackUrlW(lpszURL, 0, 0, &url); + if(!res || url.nScheme != INTERNET_SCHEME_HTTPS) { + SetLastError(ERROR_INTERNET_ITEM_NOT_FOUND); + return FALSE; + } + + if(url.nPort == INTERNET_INVALID_PORT_NUMBER) + url.nPort = INTERNET_DEFAULT_HTTPS_PORT; + + server = get_server(hostname, url.nPort, FALSE); + if(!server) { + SetLastError(ERROR_INTERNET_ITEM_NOT_FOUND); + return FALSE; + } + + if(server->cert_chain) { + const CERT_CHAIN_CONTEXT *chain_dup; + + chain_dup = CertDuplicateCertificateChain(server->cert_chain); + if(chain_dup) { + *ppCertChain = chain_dup; + *pdwSecureFlags = server->security_flags & _SECURITY_ERROR_FLAGS_MASK; + }else { + res = FALSE; + } + }else { + SetLastError(ERROR_INTERNET_ITEM_NOT_FOUND); + res = FALSE; + } + + server_release(server); + return res; } DWORD WINAPI InternetDialA( HWND hwndParent, LPSTR lpszConnectoid, DWORD dwFlags, diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h index a25be32..e3fb530 100644 --- a/dlls/wininet/internet.h +++ b/dlls/wininet/internet.h @@ -47,6 +47,8 @@ #define ioctlsocket ioctl #endif /* __MINGW32__ */ +#include "winineti.h" + extern HMODULE WININET_hModule DECLSPEC_HIDDEN; #ifndef INET6_ADDRSTRLEN @@ -63,6 +65,7 @@ typedef struct { LONG ref; DWORD security_flags; + const CERT_CHAIN_CONTEXT *cert_chain; struct list entry; struct list conn_pool; @@ -546,6 +549,8 @@ int NETCON_GetCipherStrength(netconn_t*) DECLSPEC_HIDDEN; DWORD NETCON_set_timeout(netconn_t *connection, BOOL send, DWORD value) DECLSPEC_HIDDEN; int sock_get_error(int) DECLSPEC_HIDDEN; +server_t *get_server(const WCHAR*,INTERNET_PORT,BOOL); + extern void URLCacheContainers_CreateDefaults(void) DECLSPEC_HIDDEN; extern void URLCacheContainers_DeleteAll(void) DECLSPEC_HIDDEN; diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c index 47b8453..a705cce 100644 --- a/dlls/wininet/netconnection.c +++ b/dlls/wininet/netconnection.c @@ -80,7 +80,6 @@ #include "winbase.h" #include "wininet.h" #include "winerror.h" -#include "wincrypt.h" #include "wine/debug.h" #include "internet.h" @@ -358,15 +357,23 @@ static DWORD netconn_verify_cert(netconn_t *conn, PCCERT_CONTEXT cert, HCERTSTOR } } - CertFreeCertificateChain(chain); - if(err) { WARN("failed %u\n", err); + CertFreeCertificateChain(chain); + if(conn->server->cert_chain) { + CertFreeCertificateChain(conn->server->cert_chain); + conn->server->cert_chain = NULL; + } if(conn->mask_errors) conn->server->security_flags |= conn->security_flags & _SECURITY_ERROR_FLAGS_MASK; return err; } + /* FIXME: Reuse cached chain */ + if(conn->server->cert_chain) + CertFreeCertificateChain(chain); + else + conn->server->cert_chain = chain; return ERROR_SUCCESS; }
1
0
0
0
Nikolay Sivov : msxml3: Fix status text value parsing.
by Alexandre Julliard
11 Jun '12
11 Jun '12
Module: wine Branch: master Commit: ad914986e8ed3c56c21c7a355d2279b7e075b4fd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ad914986e8ed3c56c21c7a355…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Jun 10 00:48:09 2012 +0400 msxml3: Fix status text value parsing. --- dlls/msxml3/httprequest.c | 35 ++++++++++++++++++----------------- 1 files changed, 18 insertions(+), 17 deletions(-) diff --git a/dlls/msxml3/httprequest.c b/dlls/msxml3/httprequest.c index 0abe2ff..ea5fb14 100644 --- a/dlls/msxml3/httprequest.c +++ b/dlls/msxml3/httprequest.c @@ -540,31 +540,32 @@ static HRESULT WINAPI BSCHttpNegotiate_OnResponse(IHttpNegotiate *iface, DWORD c This->request->status_text = NULL; if (resp_headers) { - const WCHAR *ptr, *line; + const WCHAR *ptr, *line, *status_text; ptr = line = resp_headers; - /* skip status line */ - while (*ptr) + /* skip HTTP-Version */ + ptr = strchrW(ptr, ' '); + if (ptr) { - if (*ptr == '\r' && *(ptr+1) == '\n') + /* skip Status-Code */ + ptr = strchrW(++ptr, ' '); + if (ptr) { - const WCHAR *end = ptr-1; - line = ptr + 2; - /* scan back to get status phrase */ - while (ptr > resp_headers) + status_text = ++ptr; + /* now it supposed to end with CRLF */ + while (*ptr) { - if (*ptr == ' ') - { - This->request->status_text = SysAllocStringLen(ptr+1, end-ptr); - TRACE("status text %s\n", debugstr_w(This->request->status_text)); - break; - } - ptr--; + if (*ptr == '\r' && *(ptr+1) == '\n') + { + line = ptr + 2; + This->request->status_text = SysAllocStringLen(status_text, ptr-status_text); + TRACE("status text %s\n", debugstr_w(This->request->status_text)); + break; + } + ptr++; } - break; } - ptr++; } /* store as unparsed string for now */
1
0
0
0
Nikolay Sivov : msxml3: Reuse MXAttributes implementation for SAX reader attributes reporting.
by Alexandre Julliard
11 Jun '12
11 Jun '12
Module: wine Branch: master Commit: c2c8b9e771a1eb80cab4b142a3bc3ed5434a4a47 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c2c8b9e771a1eb80cab4b142a…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Jun 9 15:37:52 2012 +0400 msxml3: Reuse MXAttributes implementation for SAX reader attributes reporting. --- dlls/msxml3/saxreader.c | 532 +++++++++++------------------------------ dlls/msxml3/tests/saxreader.c | 1 - 2 files changed, 142 insertions(+), 391 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=c2c8b9e771a1eb80cab4b…
1
0
0
0
Nikolay Sivov : comctl32/listview: Properly update selection mark on item state change.
by Alexandre Julliard
11 Jun '12
11 Jun '12
Module: wine Branch: master Commit: 6560d881511bc2affba709803275d086e8d41249 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6560d881511bc2affba709803…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Jun 9 12:15:16 2012 +0400 comctl32/listview: Properly update selection mark on item state change. --- dlls/comctl32/listview.c | 6 ++- dlls/comctl32/tests/listview.c | 126 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 130 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 7111560..27b2fd0 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -6,7 +6,7 @@ * Copyright 2000 Jason Mawdsley * Copyright 2001 CodeWeavers Inc. * Copyright 2002 Dimitrie O. Paun - * Copyright 2009-2011 Nikolay Sivov + * Copyright 2009-2012 Nikolay Sivov * Copyright 2009 Owen Rudge for CodeWeavers * * This library is free software; you can redistribute it and/or @@ -4276,6 +4276,10 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL { if (lpLVItem->state & LVIS_FOCUSED) { + /* update selection mark */ + if (infoPtr->nFocusedItem == -1 && infoPtr->nSelectionMark == -1) + infoPtr->nSelectionMark = lpLVItem->iItem; + if (infoPtr->nFocusedItem != -1) { /* remove current focus */ diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index b96e85f..255ef50 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -2090,7 +2090,6 @@ static void test_multiselect(void) { "using VK_HOME", -1, VK_HOME, 1, -1 } }; - hwnd = create_listview_control(LVS_REPORT); for (i=0;i<items;i++) { @@ -2237,6 +2236,131 @@ static void test_multiselect(void) r = ListView_GetSelectedCount(hwnd); expect(0, r); + /* 1. selection mark is update when new focused item is set */ + style = GetWindowLongPtrA(hwnd, GWL_STYLE); + SetWindowLongPtrA(hwnd, GWL_STYLE, style & ~LVS_SINGLESEL); + + r = SendMessage(hwnd, LVM_SETSELECTIONMARK, 0, -1); + expect(-1, r); + + item.stateMask = LVIS_FOCUSED; + item.state = LVIS_FOCUSED; + r = SendMessage(hwnd, LVM_SETITEMSTATE, 0, (LPARAM)&item); + expect(TRUE, r); + + r = SendMessage(hwnd, LVM_GETSELECTIONMARK, 0, 0); + expect(0, r); + + /* it's not updated if already set */ + item.stateMask = LVIS_FOCUSED; + item.state = LVIS_FOCUSED; + r = SendMessage(hwnd, LVM_SETITEMSTATE, 1, (LPARAM)&item); + expect(TRUE, r); + + r = SendMessage(hwnd, LVM_GETSELECTIONMARK, 0, 0); + expect(0, r); + + r = SendMessage(hwnd, LVM_SETSELECTIONMARK, 0, -1); + expect(0, r); + + item.stateMask = LVIS_FOCUSED; + item.state = LVIS_FOCUSED; + r = SendMessage(hwnd, LVM_SETITEMSTATE, 1, (LPARAM)&item); + expect(TRUE, r); + + r = SendMessage(hwnd, LVM_GETSELECTIONMARK, 0, 0); + expect(-1, r); + + /* need to reset focused item first */ + item.stateMask = LVIS_FOCUSED; + item.state = 0; + r = SendMessage(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); + expect(TRUE, r); + + item.stateMask = LVIS_FOCUSED; + item.state = LVIS_FOCUSED; + r = SendMessage(hwnd, LVM_SETITEMSTATE, 2, (LPARAM)&item); + expect(TRUE, r); + + r = SendMessage(hwnd, LVM_GETSELECTIONMARK, 0, 0); + expect(2, r); + + item.stateMask = LVIS_FOCUSED; + item.state = 0; + r = SendMessage(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); + expect(TRUE, r); + + r = SendMessage(hwnd, LVM_GETSELECTIONMARK, 0, 0); + expect(2, r); + + /* 2. same tests, with LVM_SETITEM */ + style = GetWindowLongPtrA(hwnd, GWL_STYLE); + SetWindowLongPtrA(hwnd, GWL_STYLE, style & ~LVS_SINGLESEL); + + r = SendMessage(hwnd, LVM_SETSELECTIONMARK, 0, -1); + expect(2, r); + + item.stateMask = LVIS_FOCUSED; + item.state = LVIS_FOCUSED; + item.mask = LVIF_STATE; + item.iItem = item.iSubItem = 0; + r = SendMessage(hwnd, LVM_SETITEMA, 0, (LPARAM)&item); + expect(TRUE, r); + + r = SendMessage(hwnd, LVM_GETSELECTIONMARK, 0, 0); + expect(0, r); + + /* it's not updated if already set */ + item.stateMask = LVIS_FOCUSED; + item.state = LVIS_FOCUSED; + item.mask = LVIF_STATE; + item.iItem = 1; + item.iSubItem = 0; + r = SendMessage(hwnd, LVM_SETITEMA, 0, (LPARAM)&item); + expect(TRUE, r); + + r = SendMessage(hwnd, LVM_GETSELECTIONMARK, 0, 0); + expect(0, r); + + r = SendMessage(hwnd, LVM_SETSELECTIONMARK, 0, -1); + expect(0, r); + + item.stateMask = LVIS_FOCUSED; + item.state = LVIS_FOCUSED; + item.mask = LVIF_STATE; + item.iItem = 1; + item.iSubItem = 0; + r = SendMessage(hwnd, LVM_SETITEMA, 0, (LPARAM)&item); + expect(TRUE, r); + + r = SendMessage(hwnd, LVM_GETSELECTIONMARK, 0, 0); + expect(-1, r); + + /* need to reset focused item first */ + item.stateMask = LVIS_FOCUSED; + item.state = 0; + r = SendMessage(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); + expect(TRUE, r); + + item.stateMask = LVIS_FOCUSED; + item.state = LVIS_FOCUSED; + item.mask = LVIF_STATE; + item.iItem = 2; + item.iSubItem = 0; + r = SendMessage(hwnd, LVM_SETITEMA, 0, (LPARAM)&item); + expect(TRUE, r); + + r = SendMessage(hwnd, LVM_GETSELECTIONMARK, 0, 0); + expect(2, r); + + item.stateMask = LVIS_FOCUSED; + item.state = 0; + r = SendMessage(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); + expect(TRUE, r); + + r = SendMessage(hwnd, LVM_GETSELECTIONMARK, 0, 0); + expect(2, r); + DestroyWindow(hwnd); }
1
0
0
0
Thomas Faber : oleaut32: Fix build with MSVC.
by Alexandre Julliard
11 Jun '12
11 Jun '12
Module: wine Branch: master Commit: 7f5714107896a8820f85b21852c4288607ecd7a9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7f5714107896a8820f85b2185…
Author: Thomas Faber <thfabba(a)gmx.de> Date: Mon Jun 11 09:35:46 2012 +0200 oleaut32: Fix build with MSVC. --- dlls/oleaut32/typelib2.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index fd4e547..bf45ce8 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -1987,7 +1987,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc( if(!insert) return E_OUTOFMEMORY; insert->u.data = heap_alloc(FIELD_OFFSET(MSFT_FuncRecord, HelpContext) + - sizeof(int[(num_defaults?4:3)])*pFuncDesc->cParams); + sizeof(int)*(num_defaults?4:3)*pFuncDesc->cParams); if(!insert->u.data) { heap_free(insert); return E_OUTOFMEMORY;
1
0
0
0
André Hentschel : winedbg: Add long multiplication and division operators to Thumb2 disassembler.
by Alexandre Julliard
11 Jun '12
11 Jun '12
Module: wine Branch: master Commit: 44411a3c7acdb1fa1edb6af572f9e71137cf582e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=44411a3c7acdb1fa1edb6af57…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Sun Jun 10 20:09:10 2012 +0200 winedbg: Add long multiplication and division operators to Thumb2 disassembler. --- programs/winedbg/be_arm.c | 52 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 52 insertions(+), 0 deletions(-) diff --git a/programs/winedbg/be_arm.c b/programs/winedbg/be_arm.c index c5edfd9..866ab61 100644 --- a/programs/winedbg/be_arm.c +++ b/programs/winedbg/be_arm.c @@ -631,6 +631,56 @@ static UINT thumb2_disasm_mul(UINT inst, ADDRESS64 *addr) return inst; } +static UINT thumb2_disasm_longmuldiv(UINT inst, ADDRESS64 *addr) +{ + WORD op1 = (inst >> 20) & 0x07; + WORD op2 = (inst >> 4) & 0x0f; + + if (op2 == 0) + { + switch (op1) + { + case 0: + dbg_printf("\n\tsmull\t"); + break; + case 2: + dbg_printf("\n\tumull\t"); + break; + case 4: + dbg_printf("\n\tsmlal\t"); + break; + case 6: + dbg_printf("\n\tumlal\t"); + break; + default: + return inst; + } + dbg_printf("%s, %s, %s, %s\t", tbl_regs[get_nibble(inst, 3)], tbl_regs[get_nibble(inst, 2)], + tbl_regs[get_nibble(inst, 4)], tbl_regs[get_nibble(inst, 0)]); + return 0; + } + + if (op2 == 0xffff) + { + switch (op1) + { + case 1: + dbg_printf("\n\tsdiv\t"); + break; + case 3: + dbg_printf("\n\tudiv\t"); + break; + default: + return inst; + } + dbg_printf("%s, %s, %s\t", tbl_regs[get_nibble(inst, 2)], tbl_regs[get_nibble(inst, 4)], + tbl_regs[get_nibble(inst, 0)]); + return 0; + } + + return inst; +} + struct inst_arm { UINT mask; @@ -686,6 +736,8 @@ static const struct inst_arm tbl_thumb32[] = { { 0xf800f800, 0xf000f800, thumb2_disasm_branchlinked }, { 0xffc0f0c0, 0xfa80f080, thumb2_disasm_misc }, { 0xff8000c0, 0xfb000000, thumb2_disasm_mul }, + { 0xff8000f0, 0xfb800000, thumb2_disasm_longmuldiv }, + { 0xff8000f0, 0xfb8000f0, thumb2_disasm_longmuldiv }, { 0x00000000, 0x00000000, NULL } };
1
0
0
0
André Hentschel : winedbg: Add multiplication operators to Thumb2 disassembler.
by Alexandre Julliard
11 Jun '12
11 Jun '12
Module: wine Branch: master Commit: 82dbeed2cc7324e667478b3f324440f5b0cb60d0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=82dbeed2cc7324e667478b3f3…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Sun Jun 10 20:07:14 2012 +0200 winedbg: Add multiplication operators to Thumb2 disassembler. --- programs/winedbg/be_arm.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/programs/winedbg/be_arm.c b/programs/winedbg/be_arm.c index c66c2b0..c5edfd9 100644 --- a/programs/winedbg/be_arm.c +++ b/programs/winedbg/be_arm.c @@ -594,6 +594,43 @@ static UINT thumb2_disasm_misc(UINT inst, ADDRESS64 *addr) return inst; } +static UINT thumb2_disasm_mul(UINT inst, ADDRESS64 *addr) +{ + WORD op1 = (inst >> 20) & 0x07; + WORD op2 = (inst >> 4) & 0x03; + + if (op1) + return inst; + + if (op2 == 0 && get_nibble(inst, 3) != 0xf) + { + dbg_printf("\n\tmla\t%s, %s, %s, %s\t", tbl_regs[get_nibble(inst, 2)], + tbl_regs[get_nibble(inst, 4)], + tbl_regs[get_nibble(inst, 0)], + tbl_regs[get_nibble(inst, 3)]); + return 0; + } + + if (op2 == 0 && get_nibble(inst, 3) == 0xf) + { + dbg_printf("\n\tmul\t%s, %s, %s\t", tbl_regs[get_nibble(inst, 2)], + tbl_regs[get_nibble(inst, 4)], + tbl_regs[get_nibble(inst, 0)]); + return 0; + } + + if (op2 == 1) + { + dbg_printf("\n\tmls\t%s, %s, %s, %s\t", tbl_regs[get_nibble(inst, 2)], + tbl_regs[get_nibble(inst, 4)], + tbl_regs[get_nibble(inst, 0)], + tbl_regs[get_nibble(inst, 3)]); + return 0; + } + + return inst; +} + struct inst_arm { UINT mask; @@ -648,6 +685,7 @@ static const struct inst_thumb16 tbl_thumb16[] = { static const struct inst_arm tbl_thumb32[] = { { 0xf800f800, 0xf000f800, thumb2_disasm_branchlinked }, { 0xffc0f0c0, 0xfa80f080, thumb2_disasm_misc }, + { 0xff8000c0, 0xfb000000, thumb2_disasm_mul }, { 0x00000000, 0x00000000, NULL } };
1
0
0
0
Dan Kegel : kernel32: Quiet an extremely verbose stub fixme.
by Alexandre Julliard
11 Jun '12
11 Jun '12
Module: wine Branch: master Commit: db48235880b61eaa8fc351f8c987d3c530379a86 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=db48235880b61eaa8fc351f8c…
Author: Dan Kegel <dank(a)kegel.com> Date: Sun Jun 10 10:02:42 2012 -0700 kernel32: Quiet an extremely verbose stub fixme. --- dlls/kernel32/thread.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c index c56e1d3..5702d6c 100644 --- a/dlls/kernel32/thread.c +++ b/dlls/kernel32/thread.c @@ -377,7 +377,9 @@ BOOL WINAPI SetThreadPriorityBoost( */ BOOL WINAPI SetThreadStackGuarantee(PULONG stacksize) { - FIXME("(%p): stub\n", stacksize); + static int once; + if (once++ == 0) + FIXME("(%p): stub\n", stacksize); return TRUE; }
1
0
0
0
Dan Kegel : ntdll: Avoid clobbering valgrind annotations during HeapReAlloc .
by Alexandre Julliard
11 Jun '12
11 Jun '12
Module: wine Branch: master Commit: 9af12506b0395b9d6bc035b31e6a9f8dde451650 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9af12506b0395b9d6bc035b31…
Author: Dan Kegel <dank(a)kegel.com> Date: Sat Jun 9 19:42:13 2012 -0700 ntdll: Avoid clobbering valgrind annotations during HeapReAlloc. --- dlls/ntdll/heap.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index 6ca509a..a9044714 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -1892,8 +1892,8 @@ PVOID WINAPI RtlReAllocateHeap( HANDLE heap, ULONG flags, PVOID ptr, SIZE_T size } else { - HEAP_ShrinkBlock( subheap, pArena, rounded_size ); notify_realloc( pArena + 1, oldActualSize, size ); + HEAP_ShrinkBlock( subheap, pArena, rounded_size ); } pArena->unused_bytes = (pArena->size & ARENA_SIZE_MASK) - size;
1
0
0
0
← Newer
1
...
60
61
62
63
64
65
66
...
83
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Results per page:
10
25
50
100
200