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 2008
----- 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
944 discussions
Start a n
N
ew thread
Hans Leidekker : wininet: Win64 compatibility fixes.
by Alexandre Julliard
24 Jun '08
24 Jun '08
Module: wine Branch: master Commit: e43cda6b54e2d54c14f414e3e6eaf007463bbdcc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e43cda6b54e2d54c14f414e3e…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Mon Jun 23 20:58:53 2008 +0200 wininet: Win64 compatibility fixes. --- dlls/wininet/internet.c | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index fb3b982..41e7b2d 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -2258,44 +2258,44 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption, break; case INTERNET_OPTION_ERROR_MASK: { - unsigned long flags=*(unsigned long*)lpBuffer; - FIXME("Option INTERNET_OPTION_ERROR_MASK(%ld): STUB\n",flags); + ULONG flags = *(ULONG *)lpBuffer; + FIXME("Option INTERNET_OPTION_ERROR_MASK(%d): STUB\n", flags); } break; case INTERNET_OPTION_CODEPAGE: { - unsigned long codepage=*(unsigned long*)lpBuffer; - FIXME("Option INTERNET_OPTION_CODEPAGE (%ld): STUB\n",codepage); + ULONG codepage = *(ULONG *)lpBuffer; + FIXME("Option INTERNET_OPTION_CODEPAGE (%d): STUB\n", codepage); } break; case INTERNET_OPTION_REQUEST_PRIORITY: { - unsigned long priority=*(unsigned long*)lpBuffer; - FIXME("Option INTERNET_OPTION_REQUEST_PRIORITY (%ld): STUB\n",priority); + ULONG priority = *(ULONG *)lpBuffer; + FIXME("Option INTERNET_OPTION_REQUEST_PRIORITY (%d): STUB\n", priority); } break; case INTERNET_OPTION_CONNECT_TIMEOUT: { - unsigned long connecttimeout=*(unsigned long*)lpBuffer; - FIXME("Option INTERNET_OPTION_CONNECT_TIMEOUT (%ld): STUB\n",connecttimeout); + ULONG connecttimeout = *(ULONG *)lpBuffer; + FIXME("Option INTERNET_OPTION_CONNECT_TIMEOUT (%d): STUB\n", connecttimeout); } break; case INTERNET_OPTION_DATA_RECEIVE_TIMEOUT: { - unsigned long receivetimeout=*(unsigned long*)lpBuffer; - FIXME("Option INTERNET_OPTION_DATA_RECEIVE_TIMEOUT (%ld): STUB\n",receivetimeout); + ULONG receivetimeout = *(ULONG *)lpBuffer; + FIXME("Option INTERNET_OPTION_DATA_RECEIVE_TIMEOUT (%d): STUB\n", receivetimeout); } break; case INTERNET_OPTION_MAX_CONNS_PER_SERVER: { - unsigned long conns=*(unsigned long*)lpBuffer; - FIXME("Option INTERNET_OPTION_MAX_CONNS_PER_SERVER (%ld): STUB\n",conns); + ULONG conns = *(ULONG *)lpBuffer; + FIXME("Option INTERNET_OPTION_MAX_CONNS_PER_SERVER (%d): STUB\n", conns); } break; case INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER: { - unsigned long conns=*(unsigned long*)lpBuffer; - FIXME("Option INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER (%ld): STUB\n",conns); + ULONG conns = *(ULONG *)lpBuffer; + FIXME("Option INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER (%d): STUB\n", conns); } break; case INTERNET_OPTION_RESET_URLCACHE_SESSION:
1
0
0
0
Hans Leidekker : wininet: Resolve hostname once per connection.
by Alexandre Julliard
24 Jun '08
24 Jun '08
Module: wine Branch: master Commit: 62337044819bbb418f33abcf3869f2b5a915e6cf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=62337044819bbb418f33abcf3…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Mon Jun 23 20:58:41 2008 +0200 wininet: Resolve hostname once per connection. --- dlls/wininet/http.c | 13 +++---------- dlls/wininet/tests/http.c | 18 ++++-------------- 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index ea2afb3..fdfd9da 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1329,6 +1329,8 @@ static BOOL HTTP_ResolveName(LPWININETHTTPREQW lpwhr) char szaddr[32]; LPWININETHTTPSESSIONW lpwhs = lpwhr->lpHttpSession; + if (lpwhs->socketAddress.sin_addr.s_addr) return TRUE; + INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_STATUS_RESOLVING_NAME, lpwhs->lpszServerName, @@ -2016,16 +2018,6 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs, INTERNET_STATUS_HANDLE_CREATED, &handle, sizeof(handle)); - /* - * A STATUS_REQUEST_COMPLETE is NOT sent here as per my tests on windows - */ - - if (!HTTP_ResolveName(lpwhr)) - { - InternetCloseHandle( handle ); - handle = NULL; - } - lend: if( lpwhr ) WININET_Release( &lpwhr->hdr ); @@ -3600,6 +3592,7 @@ static BOOL HTTP_OpenConnection(LPWININETHTTPREQW lpwhr) bSuccess = TRUE; goto lend; } + if (!HTTP_ResolveName(lpwhr)) goto lend; lpwhs = lpwhr->lpHttpSession; diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index 9ad9790..dfe48c0 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -270,8 +270,6 @@ static void InternetReadFile_test(int flags) CHECK_NOTIFIED(INTERNET_STATUS_HANDLE_CREATED); SET_EXPECT(INTERNET_STATUS_HANDLE_CREATED); - SET_WINE_ALLOW(INTERNET_STATUS_RESOLVING_NAME); - SET_WINE_ALLOW(INTERNET_STATUS_NAME_RESOLVED); trace("HttpOpenRequestA <--\n"); hor = HttpOpenRequestA(hic, "GET", "/about/", NULL, NULL, types, @@ -297,11 +295,8 @@ static void InternetReadFile_test(int flags) ok(!strcmp(buffer, "
http://www.winehq.org/about/
"), "Wrong URL %s\n", buffer); CHECK_NOTIFIED(INTERNET_STATUS_HANDLE_CREATED); - todo_wine - { - CHECK_NOT_NOTIFIED(INTERNET_STATUS_RESOLVING_NAME); - CHECK_NOT_NOTIFIED(INTERNET_STATUS_NAME_RESOLVED); - } + CHECK_NOT_NOTIFIED(INTERNET_STATUS_RESOLVING_NAME); + CHECK_NOT_NOTIFIED(INTERNET_STATUS_NAME_RESOLVED); if (first_connection_to_test_url) { SET_EXPECT(INTERNET_STATUS_RESOLVING_NAME); @@ -516,8 +511,6 @@ static void InternetReadFileExA_test(int flags) CHECK_NOTIFIED(INTERNET_STATUS_HANDLE_CREATED); SET_EXPECT(INTERNET_STATUS_HANDLE_CREATED); - SET_WINE_ALLOW(INTERNET_STATUS_RESOLVING_NAME); - SET_WINE_ALLOW(INTERNET_STATUS_NAME_RESOLVED); trace("HttpOpenRequestA <--\n"); hor = HttpOpenRequestA(hic, "GET", "/about/", NULL, NULL, types, @@ -538,11 +531,8 @@ static void InternetReadFileExA_test(int flags) if (hor == 0x0) goto abort; CHECK_NOTIFIED(INTERNET_STATUS_HANDLE_CREATED); - todo_wine - { - CHECK_NOT_NOTIFIED(INTERNET_STATUS_RESOLVING_NAME); - CHECK_NOT_NOTIFIED(INTERNET_STATUS_NAME_RESOLVED); - } + CHECK_NOT_NOTIFIED(INTERNET_STATUS_RESOLVING_NAME); + CHECK_NOT_NOTIFIED(INTERNET_STATUS_NAME_RESOLVED); if (first_connection_to_test_url) { SET_EXPECT(INTERNET_STATUS_RESOLVING_NAME);
1
0
0
0
Hans Leidekker : wininet: Send a 'Pragma: no-cache' header if asked for.
by Alexandre Julliard
24 Jun '08
24 Jun '08
Module: wine Branch: master Commit: 34ff555cf9198d64bb46959e7bbafc66957efc5a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=34ff555cf9198d64bb46959e7…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Mon Jun 23 20:58:25 2008 +0200 wininet: Send a 'Pragma: no-cache' header if asked for. --- dlls/wininet/http.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index c8a9608..ea2afb3 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -3190,6 +3190,11 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders, HTTP_HttpAddRequestHeadersW(lpwhr, agent_header, strlenW(agent_header), HTTP_ADDREQ_FLAG_ADD_IF_NEW); HeapFree(GetProcessHeap(), 0, agent_header); } + if (lpwhr->hdr.dwFlags & INTERNET_FLAG_PRAGMA_NOCACHE) + { + static const WCHAR pragma_nocache[] = {'P','r','a','g','m','a',':',' ','n','o','-','c','a','c','h','e','\r','\n',0}; + HTTP_HttpAddRequestHeadersW(lpwhr, pragma_nocache, strlenW(pragma_nocache), HTTP_ADDREQ_FLAG_ADD_IF_NEW); + } do {
1
0
0
0
Hans Leidekker : wininet: Improve some traces.
by Alexandre Julliard
24 Jun '08
24 Jun '08
Module: wine Branch: master Commit: ed38af127dcb61921fe63b199b2872096181043a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ed38af127dcb61921fe63b199…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Mon Jun 23 20:58:01 2008 +0200 wininet: Improve some traces. --- dlls/wininet/internet.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 1ae8cce..fb3b982 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -2312,11 +2312,17 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption, break; case INTERNET_OPTION_SEND_TIMEOUT: case INTERNET_OPTION_RECEIVE_TIMEOUT: - FIXME("INTERNET_OPTION_SEND/RECEIVE_TIMEOUT\n"); + { + ULONG timeout = *(ULONG *)lpBuffer; + FIXME("INTERNET_OPTION_SEND/RECEIVE_TIMEOUT %d\n", timeout); break; + } case INTERNET_OPTION_CONNECT_RETRIES: - FIXME("Option INTERNET_OPTION_CONNECT_RETRIES: STUB\n"); + { + ULONG retries = *(ULONG *)lpBuffer; + FIXME("INTERNET_OPTION_CONNECT_RETRIES %d\n", retries); break; + } case INTERNET_OPTION_CONTEXT_VALUE: FIXME("Option INTERNET_OPTION_CONTEXT_VALUE; STUB\n"); break;
1
0
0
0
Hans Leidekker : wininet: Clear last error upon successful return from HttpSendRequest.
by Alexandre Julliard
24 Jun '08
24 Jun '08
Module: wine Branch: master Commit: 3434935f44eadecae1e8aa11d08142a40b671978 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3434935f44eadecae1e8aa11d…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Mon Jun 23 20:57:46 2008 +0200 wininet: Clear last error upon successful return from HttpSendRequest. --- dlls/wininet/http.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 10fa8a5..c8a9608 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -3168,9 +3168,6 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders, assert(lpwhr->hdr.htype == WH_HHTTPREQ); - /* Clear any error information */ - INTERNET_SetLastError(0); - /* if the verb is NULL default to GET */ if (!lpwhr->lpszVerb) lpwhr->lpszVerb = WININET_strdupW(szGET); @@ -3412,6 +3409,7 @@ lend: sizeof(INTERNET_ASYNC_RESULT)); TRACE("<--\n"); + if (bSuccess) INTERNET_SetLastError(ERROR_SUCCESS); return bSuccess; }
1
0
0
0
Alex Villacís Lasso : richedit: EM_POSFROMCHAR should take into account scrollbar position. With tests.
by Alexandre Julliard
24 Jun '08
24 Jun '08
Module: wine Branch: master Commit: acec891ac292caf7330658ae6216f6ccda3df238 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=acec891ac292caf7330658ae6…
Author: Alex Villacís Lasso <a_villacis(a)palosanto.com> Date: Sat Jun 21 15:50:12 2008 -0500 richedit: EM_POSFROMCHAR should take into account scrollbar position. With tests. --- dlls/riched20/editor.c | 9 ++++++ dlls/riched20/tests/editor.c | 55 +++++++++++++++++++++++++++++++++++++- dlls/riched32/tests/editor.c | 59 ++++++++++++++++++++++++++++++++++++++++- 3 files changed, 119 insertions(+), 4 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 4d6cdd9..60db1bf 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2899,6 +2899,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, ME_DisplayItem *pRun; int nCharOfs, nOffset, nLength; POINTL pt = {0,0}; + SCROLLINFO si; nCharOfs = wParam; /* detect which API version we're dealing with */ @@ -2917,6 +2918,14 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, pt.y = editor->pBuffer->pLast->member.para.nYPos; } pt.x += editor->selofs; + + si.cbSize = sizeof(si); + si.fMask = SIF_POS; + if (GetScrollInfo(editor->hWnd, SB_VERT, &si)) pt.y -= si.nPos; + si.cbSize = sizeof(si); + si.fMask = SIF_POS; + if (GetScrollInfo(editor->hWnd, SB_HORZ, &si)) pt.x -= si.nPos; + if (wParam >= 0x40000) { *(POINTL *)wParam = pt; } diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index d51da22..68e1d7e 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -400,10 +400,19 @@ static void test_EM_SCROLLCARET(void) static void test_EM_POSFROMCHAR(void) { HWND hwndRichEdit = new_richedit(NULL); - unsigned int i; + int i; LRESULT result; unsigned int height = 0; - unsigned int xpos = 0; + int xpos = 0; + static const char text[] = "aa\n" + "this is a long line of text that should be longer than the " + "control's width\n" + "cc\n" + "dd\n" + "ee\n" + "ff\n" + "gg\n" + "hh\n"; /* Fill the control to lines to ensure that most of them are offscreen */ for (i = 0; i < 50; i++) @@ -460,6 +469,48 @@ static void test_EM_POSFROMCHAR(void) ok(HIWORD(result) == 50 * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", HIWORD(result), 50 * height); ok(LOWORD(result) == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", LOWORD(result)); + /* Testing that vertical scrolling does, in fact, have an effect on EM_POSFROMCHAR */ + SendMessage(hwndRichEdit, EM_SCROLL, SB_LINEDOWN, 0); /* line down */ + for (i = 0; i < 50; i++) + { + /* All the lines are 16 characters long */ + result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, i * 16, 0); + ok((signed short)(HIWORD(result)) == (i - 1) * height, + "EM_POSFROMCHAR reports y=%hd, expected %d\n", + (signed short)(HIWORD(result)), (i - 1) * height); + ok(LOWORD(result) == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", LOWORD(result)); + } + + /* Testing position at end of text */ + result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, 50 * 16, 0); + ok(HIWORD(result) == (50 - 1) * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", HIWORD(result), (50 - 1) * height); + ok(LOWORD(result) == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", LOWORD(result)); + + /* Testing position way past end of text */ + result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, 55 * 16, 0); + ok(HIWORD(result) == (50 - 1) * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", HIWORD(result), (50 - 1) * height); + ok(LOWORD(result) == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", LOWORD(result)); + + /* Testing that horizontal scrolling does, in fact, have an effect on EM_POSFROMCHAR */ + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text); + SendMessage(hwndRichEdit, EM_SCROLL, SB_LINEUP, 0); /* line up */ + + result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, 0, 0); + ok(HIWORD(result) == 0, "EM_POSFROMCHAR reports y=%d, expected 0\n", HIWORD(result)); + todo_wine { + ok(LOWORD(result) == 1, "EM_POSFROMCHAR reports x=%d, expected 1\n", LOWORD(result)); + } + xpos = LOWORD(result); + + SendMessage(hwndRichEdit, WM_HSCROLL, SB_LINERIGHT, 0); + result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, 0, 0); + ok(HIWORD(result) == 0, "EM_POSFROMCHAR reports y=%d, expected 0\n", HIWORD(result)); + todo_wine { + /* Fails on builtin because horizontal scrollbar is not being shown */ + ok((signed short)(LOWORD(result)) < xpos, + "EM_POSFROMCHAR reports x=%hd, expected value less than %d\n", + (signed short)(LOWORD(result)), xpos); + } DestroyWindow(hwndRichEdit); } diff --git a/dlls/riched32/tests/editor.c b/dlls/riched32/tests/editor.c index 13e2245..63a63f1 100644 --- a/dlls/riched32/tests/editor.c +++ b/dlls/riched32/tests/editor.c @@ -699,11 +699,20 @@ static void test_EM_FINDTEXT(void) static void test_EM_POSFROMCHAR(void) { HWND hwndRichEdit = new_richedit(NULL); - unsigned int i; + int i; POINTL pl; LRESULT result; unsigned int height = 0; - unsigned int xpos = 0; + int xpos = 0; + static const char text[] = "aa\n" + "this is a long line of text that should be longer than the " + "control's width\n" + "cc\n" + "dd\n" + "ee\n" + "ff\n" + "gg\n" + "hh\n"; /* Fill the control to lines to ensure that most of them are offscreen */ for (i = 0; i < 50; i++) @@ -763,6 +772,52 @@ static void test_EM_POSFROMCHAR(void) ok(pl.y == 50 * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, 50 * height); ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); + + /* Testing that vertical scrolling does, in fact, have an effect on EM_POSFROMCHAR */ + SendMessage(hwndRichEdit, EM_SCROLL, SB_LINEDOWN, 0); /* line down */ + for (i = 0; i < 50; i++) + { + /* All the lines are 16 characters long */ + result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, i * 16); + ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); + ok(pl.y == (i - 1) * height, + "EM_POSFROMCHAR reports y=%d, expected %d\n", + pl.y, (i - 1) * height); + ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); + } + + /* Testing position at end of text */ + result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 50 * 16); + ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); + ok(pl.y == (50 - 1) * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, (50 - 1) * height); + ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); + + /* Testing position way past end of text */ + result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 55 * 16); + ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); + ok(pl.y == (50 - 1) * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, (50 - 1) * height); + ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); + + /* Testing that horizontal scrolling does, in fact, have an effect on EM_POSFROMCHAR */ + SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text); + SendMessage(hwndRichEdit, EM_SCROLL, SB_LINEUP, 0); /* line up */ + + result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 0); + ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); + ok(pl.y == 0, "EM_POSFROMCHAR reports y=%d, expected 0\n", pl.y); + todo_wine { + ok(pl.x == 1, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); + } + xpos = pl.x; + + SendMessage(hwndRichEdit, WM_HSCROLL, SB_LINERIGHT, 0); + result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 0); + ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); + ok(pl.y == 0, "EM_POSFROMCHAR reports y=%d, expected 0\n", pl.y); + todo_wine { + /* Fails on builtin because horizontal scrollbar is not being shown */ + ok(pl.x < xpos, "EM_POSFROMCHAR reports x=%hd, expected value less than %d\n", pl.x, xpos); + } DestroyWindow(hwndRichEdit); }
1
0
0
0
Alex Villacís Lasso : richedit: When returning position through wParam pointer, EM_POSFROMCHAR must return 0 as LRESULT.
by Alexandre Julliard
24 Jun '08
24 Jun '08
Module: wine Branch: master Commit: 3cc6e2365a7742317b12ec44c0b49773cc17e654 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3cc6e2365a7742317b12ec44c…
Author: Alex Villacís Lasso <a_villacis(a)palosanto.com> Date: Mon Jun 23 13:49:49 2008 -0500 richedit: When returning position through wParam pointer, EM_POSFROMCHAR must return 0 as LRESULT. Add tests for EM_POSFROMCHAR for 1.0 and 2.0. --- dlls/riched20/editor.c | 2 +- dlls/riched20/tests/editor.c | 67 ++++++++++++++++++++++++++++++++++++++++ dlls/riched20/wrap.c | 3 ++ dlls/riched32/tests/editor.c | 70 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 141 insertions(+), 1 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 899b82f..4d6cdd9 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2920,7 +2920,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, if (wParam >= 0x40000) { *(POINTL *)wParam = pt; } - return MAKELONG( pt.x, pt.y ); + return (wParam >= 0x40000) ? 0 : MAKELONG( pt.x, pt.y ); } case WM_CREATE: if (GetWindowLongW(hWnd, GWL_STYLE) & WS_HSCROLL) diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index c9aa194..d51da22 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -397,6 +397,72 @@ static void test_EM_SCROLLCARET(void) DestroyWindow(hwndRichEdit); } +static void test_EM_POSFROMCHAR(void) +{ + HWND hwndRichEdit = new_richedit(NULL); + unsigned int i; + LRESULT result; + unsigned int height = 0; + unsigned int xpos = 0; + + /* Fill the control to lines to ensure that most of them are offscreen */ + for (i = 0; i < 50; i++) + { + /* Do not modify the string; it is exactly 16 characters long. */ + SendMessage(hwndRichEdit, EM_SETSEL, 0, 0); + SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM)"0123456789ABCDE\n"); + } + + /* + Richedit 1.0 receives a POINTL* on wParam and character offset on lParam, returns void. + Richedit 2.0 receives character offset on wParam, ignores lParam, returns MAKELONG(x,y) + Richedit 3.0 accepts either of the above API conventions. + */ + + /* Testing Richedit 2.0 API format */ + + /* Testing start of lines. X-offset should be constant on all cases (native is 1). + Since all lines are identical and drawn with the same font, + they should have the same height... right? + */ + for (i = 0; i < 50; i++) + { + /* All the lines are 16 characters long */ + result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, i * 16, 0); + if (i == 0) + { + ok(HIWORD(result) == 0, "EM_POSFROMCHAR reports y=%d, expected 0\n", HIWORD(result)); + todo_wine { + ok(LOWORD(result) == 1, "EM_POSFROMCHAR reports x=%d, expected 1\n", LOWORD(result)); + } + xpos = LOWORD(result); + } + else if (i == 1) + { + ok(HIWORD(result) > 0, "EM_POSFROMCHAR reports y=%d, expected > 0\n", HIWORD(result)); + ok(LOWORD(result) == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", LOWORD(result)); + height = HIWORD(result); + } + else + { + ok(HIWORD(result) == i * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", HIWORD(result), i * height); + ok(LOWORD(result) == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", LOWORD(result)); + } + } + + /* Testing position at end of text */ + result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, 50 * 16, 0); + ok(HIWORD(result) == 50 * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", HIWORD(result), 50 * height); + ok(LOWORD(result) == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", LOWORD(result)); + + /* Testing position way past end of text */ + result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, 55 * 16, 0); + ok(HIWORD(result) == 50 * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", HIWORD(result), 50 * height); + ok(LOWORD(result) == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", LOWORD(result)); + + DestroyWindow(hwndRichEdit); +} + static void test_EM_SETCHARFORMAT(void) { HWND hwndRichEdit = new_richedit(NULL); @@ -4170,6 +4236,7 @@ START_TEST( editor ) test_WM_CHAR(); test_EM_FINDTEXT(); test_EM_GETLINE(); + test_EM_POSFROMCHAR(); test_EM_SCROLLCARET(); test_EM_SCROLL(); test_WM_SETTEXT(); diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c index da5fef7..3230ff7 100644 --- a/dlls/riched20/wrap.c +++ b/dlls/riched20/wrap.c @@ -471,6 +471,7 @@ BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor) { ME_Context c; BOOL bModified = FALSE; int yStart = -1; + int yLastPos = 0; ME_InitContext(&c, editor, GetDC(editor->hWnd)); editor->nHeight = 0; @@ -496,6 +497,7 @@ BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor) { bModified = bModified | bRedraw; + yLastPos = c.pt.y; c.pt.y += item->member.para.nHeight; item = item->member.para.next_para; } @@ -503,6 +505,7 @@ BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor) { editor->sizeWindow.cy = c.rcView.bottom-c.rcView.top; editor->nTotalLength = c.pt.y; + editor->pBuffer->pLast->member.para.nYPos = yLastPos; ME_DestroyContext(&c, editor->hWnd); diff --git a/dlls/riched32/tests/editor.c b/dlls/riched32/tests/editor.c index ff82654..13e2245 100644 --- a/dlls/riched32/tests/editor.c +++ b/dlls/riched32/tests/editor.c @@ -696,6 +696,75 @@ static void test_EM_FINDTEXT(void) DestroyWindow(hwndRichEdit); } +static void test_EM_POSFROMCHAR(void) +{ + HWND hwndRichEdit = new_richedit(NULL); + unsigned int i; + POINTL pl; + LRESULT result; + unsigned int height = 0; + unsigned int xpos = 0; + + /* Fill the control to lines to ensure that most of them are offscreen */ + for (i = 0; i < 50; i++) + { + /* Do not modify the string; it is exactly 16 characters long. */ + SendMessage(hwndRichEdit, EM_SETSEL, 0, 0); + SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM)"0123456789ABCD\r\n"); + } + + /* + Richedit 1.0 receives a POINTL* on wParam and character offset on lParam, returns void. + Richedit 2.0 receives character offset on wParam, ignores lParam, returns MAKELONG(x,y) + Richedit 3.0 accepts either of the above API conventions. + */ + + /* Testing Richedit 1.0 API format */ + + /* Testing start of lines. X-offset should be constant on all cases (native is 1). + Since all lines are identical and drawn with the same font, + they should have the same height... right? + */ + for (i = 0; i < 50; i++) + { + /* All the lines are 16 characters long */ + result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, i * 16); + ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); + if (i == 0) + { + ok(pl.y == 0, "EM_POSFROMCHAR reports y=%d, expected 0\n", pl.y); + todo_wine { + ok(pl.x == 1, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); + } + xpos = pl.x; + } + else if (i == 1) + { + ok(pl.y > 0, "EM_POSFROMCHAR reports y=%d, expected > 0\n", pl.y); + ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); + height = pl.y; + } + else + { + ok(pl.y == i * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, i * height); + ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); + } + } + + /* Testing position at end of text */ + result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 50 * 16); + ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); + ok(pl.y == 50 * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, 50 * height); + ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); + + /* Testing position way past end of text */ + result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 55 * 16); + ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); + ok(pl.y == 50 * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, 50 * height); + ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); + + DestroyWindow(hwndRichEdit); +} START_TEST( editor ) @@ -717,6 +786,7 @@ START_TEST( editor ) test_EM_GETLINE(); test_EM_LINELENGTH(); test_EM_FINDTEXT(); + test_EM_POSFROMCHAR(); /* Set the environment variable WINETEST_RICHED32 to keep windows * responsive and open for 30 seconds. This is useful for debugging.
1
0
0
0
Alexandre Julliard : d3d9/tests: Test for Direct3DCreate9 failure.
by Alexandre Julliard
24 Jun '08
24 Jun '08
Module: wine Branch: master Commit: 15a5da9790aaf36105c0a42370d2bb5da67f9195 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=15a5da9790aaf36105c0a4237…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jun 24 11:09:47 2008 +0200 d3d9/tests: Test for Direct3DCreate9 failure. --- dlls/d3d9/tests/d3d9ex.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index 6df4c45..0d80abb 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -58,6 +58,9 @@ static void test_qi_base_to_ex(void) HWND window = create_window(); D3DPRESENT_PARAMETERS present_parameters; + ok( d3d9 != NULL, "Failed to create D3D9 object\n" ); + if (!d3d9) return; + hr = IDirect3D9_QueryInterface(d3d9, &IID_IDirect3D9Ex, (void **) &d3d9ex); ok(hr == E_NOINTERFACE, "IDirect3D9::QueryInterface for IID_IDirect3D9Ex returned %s, expected E_NOINTERFACE\n",
1
0
0
0
Alexandre Julliard : d3d9: Make Direct3DCreate9 fail if we can' t initialize wined3d.
by Alexandre Julliard
24 Jun '08
24 Jun '08
Module: wine Branch: master Commit: a6e0c9cbf3e22084e23924c6ae0c3da3cabd500a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a6e0c9cbf3e22084e23924c6a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jun 24 11:07:53 2008 +0200 d3d9: Make Direct3DCreate9 fail if we can't initialize wined3d. --- dlls/d3d9/d3d9_main.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/dlls/d3d9/d3d9_main.c b/dlls/d3d9/d3d9_main.c index 69ad9c8..a93c122 100644 --- a/dlls/d3d9/d3d9_main.c +++ b/dlls/d3d9/d3d9_main.c @@ -53,6 +53,11 @@ IDirect3D9* WINAPI Direct3DCreate9(UINT SDKVersion) { TRACE("SDKVersion = %x, Created Direct3D object @ %p, WineObj @ %p\n", SDKVersion, object, object->WineD3D); + if (!object->WineD3D) + { + HeapFree( GetProcessHeap(), 0, object ); + object = NULL; + } return (IDirect3D9*) object; }
1
0
0
0
Alexandre Julliard : d3d8: Make Direct3DCreate8 fail if we can' t initialize wined3d.
by Alexandre Julliard
24 Jun '08
24 Jun '08
Module: wine Branch: master Commit: 360d87f420bc446c51d6ff184c6a7baac004b87b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=360d87f420bc446c51d6ff184…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jun 24 11:07:43 2008 +0200 d3d8: Make Direct3DCreate8 fail if we can't initialize wined3d. --- dlls/d3d8/d3d8_main.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/dlls/d3d8/d3d8_main.c b/dlls/d3d8/d3d8_main.c index 63cb472..56de60d 100644 --- a/dlls/d3d8/d3d8_main.c +++ b/dlls/d3d8/d3d8_main.c @@ -58,6 +58,11 @@ IDirect3D8* WINAPI Direct3DCreate8(UINT SDKVersion) { TRACE("Created Direct3D object @ %p, WineObj @ %p\n", object, object->WineD3D); LeaveCriticalSection(&d3d8_cs); + if (!object->WineD3D) + { + HeapFree( GetProcessHeap(), 0, object ); + object = NULL; + } return (IDirect3D8*) object; }
1
0
0
0
← Newer
1
...
34
35
36
37
38
39
40
...
95
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
84
85
86
87
88
89
90
91
92
93
94
95
Results per page:
10
25
50
100
200