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
December 2014
----- 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
2 participants
319 discussions
Start a n
N
ew thread
Andrew Eikum : mshtml: Support new window targets for FORM elements.
by Alexandre Julliard
16 Dec '14
16 Dec '14
Module: wine Branch: master Commit: 8df27741242e12060d1984ffa78a057bd7718209 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8df27741242e12060d1984ffa…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Tue Dec 16 09:13:05 2014 -0600 mshtml: Support new window targets for FORM elements. --- dlls/mshtml/binding.h | 4 ++-- dlls/mshtml/hlink.c | 2 +- dlls/mshtml/htmlanchor.c | 2 +- dlls/mshtml/htmlform.c | 27 +++++++++++++++------------ dlls/mshtml/htmlwindow.c | 2 +- dlls/mshtml/navigate.c | 36 +++++++++++++++++++++++++----------- 6 files changed, 45 insertions(+), 28 deletions(-) diff --git a/dlls/mshtml/binding.h b/dlls/mshtml/binding.h index 073f2fb..e40735c 100644 --- a/dlls/mshtml/binding.h +++ b/dlls/mshtml/binding.h @@ -138,9 +138,9 @@ HRESULT set_moniker(HTMLOuterWindow*,IMoniker*,IUri*,IBindCtx*,nsChannelBSC*,BOO void prepare_for_binding(HTMLDocument*,IMoniker*,DWORD) DECLSPEC_HIDDEN; HRESULT super_navigate(HTMLOuterWindow*,IUri*,DWORD,const WCHAR*,BYTE*,DWORD) DECLSPEC_HIDDEN; HRESULT load_uri(HTMLOuterWindow*,IUri*,DWORD) DECLSPEC_HIDDEN; -HRESULT navigate_new_window(HTMLOuterWindow*,IUri*,const WCHAR*,IHTMLWindow2**) DECLSPEC_HIDDEN; +HRESULT navigate_new_window(HTMLOuterWindow*,IUri*,const WCHAR*,request_data_t*,IHTMLWindow2**) DECLSPEC_HIDDEN; HRESULT navigate_url(HTMLOuterWindow*,const WCHAR*,IUri*,DWORD) DECLSPEC_HIDDEN; -HRESULT submit_form(HTMLOuterWindow*,IUri*,nsIInputStream*) DECLSPEC_HIDDEN; +HRESULT submit_form(HTMLOuterWindow*,const WCHAR*,IUri*,nsIInputStream*) DECLSPEC_HIDDEN; void init_bscallback(BSCallback*,const BSCallbackVtbl*,IMoniker*,DWORD) DECLSPEC_HIDDEN; HRESULT create_channelbsc(IMoniker*,const WCHAR*,BYTE*,DWORD,BOOL,nsChannelBSC**) DECLSPEC_HIDDEN; diff --git a/dlls/mshtml/hlink.c b/dlls/mshtml/hlink.c index 4e63498..7ce0423 100644 --- a/dlls/mshtml/hlink.c +++ b/dlls/mshtml/hlink.c @@ -85,7 +85,7 @@ static HRESULT WINAPI HlinkTarget_Navigate(IHlinkTarget *iface, DWORD grfHLNF, L FIXME("JumpLocation not supported\n"); if(!This->doc_obj->client) - return navigate_new_window(This->window, This->window->uri, NULL, NULL); + return navigate_new_window(This->window, This->window->uri, NULL, NULL, NULL); return IOleObject_DoVerb(&This->IOleObject_iface, OLEIVERB_SHOW, NULL, NULL, -1, NULL, NULL); } diff --git a/dlls/mshtml/htmlanchor.c b/dlls/mshtml/htmlanchor.c index df95c2b..6650a44 100644 --- a/dlls/mshtml/htmlanchor.c +++ b/dlls/mshtml/htmlanchor.c @@ -65,7 +65,7 @@ static HRESULT navigate_anchor_window(HTMLAnchorElement *This, const WCHAR *targ if(FAILED(hres)) return hres; - hres = navigate_new_window(This->element.node.doc->basedoc.window, uri, target, NULL); + hres = navigate_new_window(This->element.node.doc->basedoc.window, uri, target, NULL, NULL); IUri_Release(uri); return hres; } diff --git a/dlls/mshtml/htmlform.c b/dlls/mshtml/htmlform.c index e901dbe..2b2a62f 100644 --- a/dlls/mshtml/htmlform.c +++ b/dlls/mshtml/htmlform.c @@ -389,6 +389,7 @@ static HRESULT WINAPI HTMLFormElement_submit(IHTMLFormElement *iface) IUri *uri; nsresult nsres; HRESULT hres; + BOOL use_new_window; TRACE("(%p)->()\n", This); @@ -404,22 +405,21 @@ static HRESULT WINAPI HTMLFormElement_submit(IHTMLFormElement *iface) nsAString_Init(&target_str, NULL); nsres = nsIDOMHTMLFormElement_GetTarget(This->nsform, &target_str); - if(NS_SUCCEEDED(nsres)) { - BOOL use_new_window; + if(NS_SUCCEEDED(nsres)) window = get_target_window(this_window, &target_str, &use_new_window); - if(use_new_window) - FIXME("submit to new window is not supported\n"); - } - nsAString_Finish(&target_str); - if(!window) + + if(!window && !use_new_window) { + nsAString_Finish(&target_str); return S_OK; + } /* * FIXME: We currently don't use our submit implementation for sub-windows because * load_nsuri can't support post data. We should fix it. */ - if(!window->doc_obj || window->doc_obj->basedoc.window != window) { + if(window && (!window->doc_obj || window->doc_obj->basedoc.window != window)) { nsres = nsIDOMHTMLFormElement_Submit(This->nsform); + nsAString_Finish(&target_str); IHTMLWindow2_Release(&window->base.IHTMLWindow2_iface); if(NS_FAILED(nsres)) { ERR("Submit failed: %08x\n", nsres); @@ -442,13 +442,16 @@ static HRESULT WINAPI HTMLFormElement_submit(IHTMLFormElement *iface) } nsAString_Finish(&action_uri_str); if(SUCCEEDED(hres)) { - window->readystate_locked++; - hres = submit_form(window, uri, post_stream); - window->readystate_locked--; + const PRUnichar *target; + + nsAString_GetData(&target_str, &target); + hres = submit_form(window, target, uri, post_stream); IUri_Release(uri); } - IHTMLWindow2_Release(&window->base.IHTMLWindow2_iface); + nsAString_Finish(&target_str); + if(window) + IHTMLWindow2_Release(&window->base.IHTMLWindow2_iface); if(post_stream) nsIInputStream_Release(post_stream); return hres; diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 6c6c328..82bb374 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -967,7 +967,7 @@ static HRESULT WINAPI HTMLWindow2_open(IHTMLWindow2 *iface, BSTR url, BSTR name, if(FAILED(hres)) return hres; - hres = navigate_new_window(window, uri, name, pomWindowResult); + hres = navigate_new_window(window, uri, name, NULL, pomWindowResult); IUri_Release(uri); return hres; } diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index 85e47aa..2ac12ea 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -2107,7 +2107,7 @@ HRESULT super_navigate(HTMLOuterWindow *window, IUri *uri, DWORD flags, const WC return hres; } -HRESULT navigate_new_window(HTMLOuterWindow *window, IUri *uri, const WCHAR *name, IHTMLWindow2 **ret) +HRESULT navigate_new_window(HTMLOuterWindow *window, IUri *uri, const WCHAR *name, request_data_t *request_data, IHTMLWindow2 **ret) { IWebBrowser2 *web_browser; IHTMLWindow2 *new_window; @@ -2115,7 +2115,12 @@ HRESULT navigate_new_window(HTMLOuterWindow *window, IUri *uri, const WCHAR *nam nsChannelBSC *bsc; HRESULT hres; - hres = create_channelbsc(NULL, NULL, NULL, 0, FALSE, &bsc); + if(request_data) + hres = create_channelbsc(NULL, request_data->headers, + request_data->post_data, request_data->post_data_len, FALSE, + &bsc); + else + hres = create_channelbsc(NULL, NULL, NULL, 0, FALSE, &bsc); if(FAILED(hres)) return hres; @@ -2322,23 +2327,32 @@ static HRESULT translate_uri(HTMLOuterWindow *window, IUri *orig_uri, BSTR *ret_ return S_OK; } -HRESULT submit_form(HTMLOuterWindow *window, IUri *submit_uri, nsIInputStream *post_stream) +HRESULT submit_form(HTMLOuterWindow *window, const WCHAR *target, IUri *submit_uri, nsIInputStream *post_stream) { request_data_t request_data = {NULL}; - BSTR display_uri; - IUri *uri; HRESULT hres; hres = read_post_data_stream(post_stream, TRUE, NULL, &request_data); if(FAILED(hres)) return hres; - hres = translate_uri(window, submit_uri, &display_uri, &uri); - if(SUCCEEDED(hres)) { - hres = navigate_uri(window, uri, display_uri, &request_data, BINDING_NAVIGATED|BINDING_SUBMIT); - IUri_Release(uri); - SysFreeString(display_uri); - } + if(window) { + IUri *uri; + BSTR display_uri; + + window->readystate_locked++; + + hres = translate_uri(window, submit_uri, &display_uri, &uri); + if(SUCCEEDED(hres)) { + hres = navigate_uri(window, uri, display_uri, &request_data, BINDING_NAVIGATED|BINDING_SUBMIT); + IUri_Release(uri); + SysFreeString(display_uri); + } + + window->readystate_locked--; + }else + hres = navigate_new_window(window, submit_uri, target, &request_data, NULL); + release_request_data(&request_data); return hres; }
1
0
0
0
Sebastian Lackner : shlwapi: Add implementation for StrCatChainW.
by Alexandre Julliard
16 Dec '14
16 Dec '14
Module: wine Branch: master Commit: 4b33a339cc5328b1c117f5ed0cbde1a6c4f6b7f5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4b33a339cc5328b1c117f5ed0…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Sun Dec 7 22:55:31 2014 +0100 shlwapi: Add implementation for StrCatChainW. Based on a patch by Huw Campbell. --- .../api-ms-win-downlevel-shlwapi-l1-1-0.spec | 2 +- dlls/shlwapi/shlwapi.spec | 1 + dlls/shlwapi/string.c | 41 +++++++ dlls/shlwapi/tests/string.c | 122 +++++++++++++++++++++ 4 files changed, 165 insertions(+), 1 deletion(-) diff --git a/dlls/api-ms-win-downlevel-shlwapi-l1-1-0/api-ms-win-downlevel-shlwapi-l1-1-0.spec b/dlls/api-ms-win-downlevel-shlwapi-l1-1-0/api-ms-win-downlevel-shlwapi-l1-1-0.spec index 9d266fa..7736645 100644 --- a/dlls/api-ms-win-downlevel-shlwapi-l1-1-0/api-ms-win-downlevel-shlwapi-l1-1-0.spec +++ b/dlls/api-ms-win-downlevel-shlwapi-l1-1-0/api-ms-win-downlevel-shlwapi-l1-1-0.spec @@ -86,7 +86,7 @@ @ stdcall SHRegSetUSValueW( wstr wstr long ptr long long) shlwapi.SHRegSetUSValueW @ stdcall StrCatBuffA(str str long) shlwapi.StrCatBuffA @ stdcall StrCatBuffW(wstr wstr long) shlwapi.StrCatBuffW -@ stub StrCatChainW +@ stdcall StrCatChainW(ptr long long wstr) shlwapi.StrCatChainW @ stdcall StrChrA(str long) shlwapi.StrChrA @ stdcall StrChrIA(str long) shlwapi.StrChrIA @ stdcall StrChrIW(wstr long) shlwapi.StrChrIW diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec index b7aac08..6b6ead2 100644 --- a/dlls/shlwapi/shlwapi.spec +++ b/dlls/shlwapi/shlwapi.spec @@ -759,6 +759,7 @@ @ stdcall StrCSpnW (wstr wstr) @ stdcall StrCatBuffA (str str long) @ stdcall StrCatBuffW (wstr wstr long) +@ stdcall StrCatChainW (ptr long long wstr) @ stdcall StrCatW (ptr wstr) @ stdcall StrChrA (str long) @ stdcall StrChrIA (str long) diff --git a/dlls/shlwapi/string.c b/dlls/shlwapi/string.c index 9ba6038..ca2f9b9 100644 --- a/dlls/shlwapi/string.c +++ b/dlls/shlwapi/string.c @@ -459,6 +459,47 @@ LPWSTR WINAPI StrCatW(LPWSTR lpszStr, LPCWSTR lpszSrc) } /************************************************************************* + * StrCatChainW [SHLWAPI.@] + * + * Concatenates two unicode strings. + * + * PARAMS + * lpszStr [O] Initial string + * cchMax [I] Length of destination buffer + * ichAt [I] Offset from the destination buffer to begin concatenation + * lpszCat [I] String to concatenate + * + * RETURNS + * The offset from the beginning of pszDst to the terminating NULL. + */ +DWORD WINAPI StrCatChainW(LPWSTR lpszStr, DWORD cchMax, DWORD ichAt, LPCWSTR lpszCat) +{ + TRACE("(%s,%u,%d,%s)\n", debugstr_w(lpszStr), cchMax, ichAt, debugstr_w(lpszCat)); + + if (ichAt == -1) + ichAt = strlenW(lpszStr); + + if (!cchMax) + return ichAt; + + if (ichAt == cchMax) + ichAt--; + + if (lpszCat && ichAt < cchMax) + { + lpszStr += ichAt; + while (ichAt < cchMax - 1 && *lpszCat) + { + *lpszStr++ = *lpszCat++; + ichAt++; + } + *lpszStr = 0; + } + + return ichAt; +} + +/************************************************************************* * StrCpyW [SHLWAPI.@] * * Copy a string to another string. diff --git a/dlls/shlwapi/tests/string.c b/dlls/shlwapi/tests/string.c index c72b774..ac14db0 100644 --- a/dlls/shlwapi/tests/string.c +++ b/dlls/shlwapi/tests/string.c @@ -48,6 +48,7 @@ static DWORD (WINAPI *pSHAnsiToAnsi)(LPCSTR,LPSTR,int); static DWORD (WINAPI *pSHUnicodeToUnicode)(LPCWSTR,LPWSTR,int); static LPSTR (WINAPI *pStrCatBuffA)(LPSTR,LPCSTR,INT); static LPWSTR (WINAPI *pStrCatBuffW)(LPWSTR,LPCWSTR,INT); +static DWORD (WINAPI *pStrCatChainW)(LPWSTR,DWORD,DWORD,LPCWSTR); static LPSTR (WINAPI *pStrCpyNXA)(LPSTR,LPCSTR,int); static LPWSTR (WINAPI *pStrCpyNXW)(LPWSTR,LPCWSTR,int); static LPSTR (WINAPI *pStrFormatByteSize64A)(LONGLONG,LPSTR,UINT); @@ -1481,6 +1482,125 @@ static void test_StrStrNIW(void) } } +static void test_StrCatChainW(void) +{ + static const WCHAR deadbeefW[] = {'D','e','A','d','B','e','E','f',0}; + static const WCHAR deadW[] = {'D','e','A','d',0}; + static const WCHAR beefW[] = {'B','e','E','f',0}; + + WCHAR buf[32 + 1]; + DWORD ret; + + if (!pStrCatChainW) + { + win_skip("StrCatChainW is not available\n"); + return; + } + + /* Test with NULL buffer */ + ret = pStrCatChainW(NULL, 0, 0, beefW); + ok(ret == 0, "Expected StrCatChainW to return 0, got %u\n", ret); + + /* Test with empty buffer */ + memset(buf, 0x11, sizeof(buf)); + ret = pStrCatChainW(buf, 0, 0, beefW); + ok(ret == 0, "Expected StrCatChainW to return 0, got %u\n", ret); + ok(buf[0] == 0x1111, "Expected buf[0] = 0x1111, got %x\n", buf[0]); + + memcpy(buf, deadbeefW, sizeof(deadbeefW)); + ret = pStrCatChainW(buf, 0, -1, beefW); + ok(ret == 8, "Expected StrCatChainW to return 8, got %u\n", ret); + ok(!memcmp(buf, deadbeefW, sizeof(deadbeefW)), "Buffer contains wrong data\n"); + + /* Append data to existing string with offset = -1 */ + memset(buf, 0x11, sizeof(buf)); + ret = pStrCatChainW(buf, 32, 0, deadW); + ok(ret == 4, "Expected StrCatChainW to return 4, got %u\n", ret); + ok(!memcmp(buf, deadW, sizeof(deadW)), "Buffer contains wrong data\n"); + + ret = pStrCatChainW(buf, 32, -1, beefW); + ok(ret == 8, "Expected StrCatChainW to return 8, got %u\n", ret); + ok(!memcmp(buf, deadbeefW, sizeof(deadbeefW)), "Buffer contains wrong data\n"); + + /* Append data at a fixed offset */ + memset(buf, 0x11, sizeof(buf)); + ret = pStrCatChainW(buf, 32, 0, deadW); + ok(ret == 4, "Expected StrCatChainW to return 4, got %u\n", ret); + ok(!memcmp(buf, deadW, sizeof(deadW)), "Buffer contains wrong data\n"); + + ret = pStrCatChainW(buf, 32, 4, beefW); + ok(ret == 8, "Expected StrCatChainW to return 8, got %u\n", ret); + ok(!memcmp(buf, deadbeefW, sizeof(deadbeefW)), "Buffer contains wrong data\n"); + + /* Buffer exactly sufficient for string + terminating null */ + memset(buf, 0x11, sizeof(buf)); + ret = pStrCatChainW(buf, 5, 0, deadW); + ok(ret == 4, "Expected StrCatChainW to return 4, got %u\n", ret); + ok(!memcmp(buf, deadW, sizeof(deadW)), "Buffer contains wrong data\n"); + + /* Buffer too small, string will be truncated */ + memset(buf, 0x11, sizeof(buf)); + ret = pStrCatChainW(buf, 4, 0, deadW); + if (ret == 4) + { + /* Windows 2000 and XP uses a slightly different implementation + * for StrCatChainW, which doesn't ensure that strings are null- + * terminated. Skip test if we detect such an implementation. */ + win_skip("Windows2000/XP behaviour detected for StrCatChainW, skipping tests\n"); + return; + } + ok(ret == 3, "Expected StrCatChainW to return 3, got %u\n", ret); + ok(!memcmp(buf, deadW, 3 * sizeof(WCHAR)), "Buffer contains wrong data\n"); + ok(!buf[3], "String is not nullterminated\n"); + ok(buf[4] == 0x1111, "Expected buf[4] = 0x1111, got %x\n", buf[4]); + + /* Overwrite part of an existing string */ + ret = pStrCatChainW(buf, 4, 1, beefW); + ok(ret == 3, "Expected StrCatChainW to return 3, got %u\n", ret); + ok(buf[0] == 'D', "Expected buf[0] = 'D', got %x\n", buf[0]); + ok(buf[1] == 'B', "Expected buf[1] = 'B', got %x\n", buf[1]); + ok(buf[2] == 'e', "Expected buf[2] = 'e', got %x\n", buf[2]); + ok(!buf[3], "String is not nullterminated\n"); + ok(buf[4] == 0x1111, "Expected buf[4] = 0x1111, got %x\n", buf[4]); + + /* Test appending to full buffer */ + memset(buf, 0x11, sizeof(buf)); + memcpy(buf, deadbeefW, sizeof(deadbeefW)); + memcpy(buf + 9, deadW, sizeof(deadW)); + ret = pStrCatChainW(buf, 9, 8, beefW); + ok(ret == 8, "Expected StrCatChainW to return 8, got %u\n", ret); + ok(!memcmp(buf, deadbeefW, sizeof(deadbeefW)), "Buffer contains wrong data\n"); + ok(!memcmp(buf + 9, deadW, sizeof(deadW)), "Buffer contains wrong data\n"); + + /* Offset points at the end of the buffer */ + ret = pStrCatChainW(buf, 9, 9, beefW); + ok(ret == 8, "Expected StrCatChainW to return 8, got %u\n", ret); + ok(!memcmp(buf, deadbeefW, sizeof(deadbeefW)), "Buffer contains wrong data\n"); + ok(!memcmp(buf + 9, deadW, sizeof(deadW)), "Buffer contains wrong data\n"); + + /* Offset points outside of the buffer */ + ret = pStrCatChainW(buf, 9, 10, beefW); + ok(ret == 10, "Expected StrCatChainW to return 10, got %u\n", ret); + ok(!memcmp(buf, deadbeefW, sizeof(deadbeefW)), "Buffer contains wrong data\n"); + ok(!memcmp(buf + 9, deadW, sizeof(deadW)), "Buffer contains wrong data\n"); + + /* The same but without nullterminated string */ + memcpy(buf, deadbeefW, sizeof(deadbeefW)); + ret = pStrCatChainW(buf, 5, -1, deadW); + ok(ret == 8, "Expected StrCatChainW to return 8, got %u\n", ret); + ok(!memcmp(buf, deadbeefW, sizeof(deadbeefW)), "Buffer contains wrong data\n"); + + ret = pStrCatChainW(buf, 5, 5, deadW); + ok(ret == 4, "Expected StrCatChainW to return 4, got %u\n", ret); + ok(!memcmp(buf, deadW, sizeof(deadW)), "Buffer contains wrong data\n"); + ok(buf[5] == 'e', "Expected buf[5] = 'e', got %x\n", buf[5]); + + ret = pStrCatChainW(buf, 5, 6, deadW); + ok(ret == 6, "Expected StrCatChainW to return 6, got %u\n", ret); + ok(!memcmp(buf, deadW, sizeof(deadW)), "Buffer contains wrong data\n"); + ok(buf[5] == 'e', "Expected buf[5] = 'e', got %x\n", buf[5]); +} + START_TEST(string) { HMODULE hShlwapi; @@ -1500,6 +1620,7 @@ START_TEST(string) pSHUnicodeToUnicode = (void *)GetProcAddress(hShlwapi, (LPSTR)346); pStrCatBuffA = (void *)GetProcAddress(hShlwapi, "StrCatBuffA"); pStrCatBuffW = (void *)GetProcAddress(hShlwapi, "StrCatBuffW"); + pStrCatChainW = (void *)GetProcAddress(hShlwapi, "StrCatChainW"); pStrCpyNXA = (void *)GetProcAddress(hShlwapi, (LPSTR)399); pStrCpyNXW = (void *)GetProcAddress(hShlwapi, (LPSTR)400); pStrChrNW = (void *)GetProcAddress(hShlwapi, "StrChrNW"); @@ -1565,6 +1686,7 @@ START_TEST(string) test_StrStrIW(); test_StrStrNW(); test_StrStrNIW(); + test_StrCatChainW(); CoUninitialize(); }
1
0
0
0
Nikolay Sivov : dwrite: Release system collection pointer after using it, not before.
by Alexandre Julliard
16 Dec '14
16 Dec '14
Module: wine Branch: master Commit: 8dfe0ff251cfe7a098c456e3d6c2e6643f6ed5d0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8dfe0ff251cfe7a098c456e3d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Dec 16 17:59:44 2014 +0300 dwrite: Release system collection pointer after using it, not before. --- dlls/dwrite/main.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/dlls/dwrite/main.c b/dlls/dwrite/main.c index c960b1e..eeb8728 100644 --- a/dlls/dwrite/main.c +++ b/dlls/dwrite/main.c @@ -921,18 +921,22 @@ static HRESULT WINAPI dwritefactory_CreateTextFormat(IDWriteFactory2 *iface, WCH DWRITE_FONT_STRETCH stretch, FLOAT size, WCHAR const *locale, IDWriteTextFormat **format) { struct dwritefactory *This = impl_from_IDWriteFactory2(iface); + IDWriteFontCollection *syscollection = NULL; + HRESULT hr; + TRACE("(%p)->(%s %p %d %d %d %f %s %p)\n", This, debugstr_w(family_name), collection, weight, style, stretch, size, debugstr_w(locale), format); - if (!collection) - { - HRESULT hr = IDWriteFactory2_GetSystemFontCollection(iface, &collection, FALSE); - if (hr != S_OK) + if (!collection) { + hr = IDWriteFactory2_GetSystemFontCollection(iface, &syscollection, FALSE); + if (FAILED(hr)) return hr; - /* Our ref count is 1 too many, since we will add ref in create_textformat */ - IDWriteFontCollection_Release(This->system_collection); } - return create_textformat(family_name, collection, weight, style, stretch, size, locale, format); + + hr = create_textformat(family_name, collection ? collection : syscollection, weight, style, stretch, size, locale, format); + if (syscollection) + IDWriteFontCollection_Release(syscollection); + return hr; } static HRESULT WINAPI dwritefactory_CreateTypography(IDWriteFactory2 *iface, IDWriteTypography **typography)
1
0
0
0
Nikolay Sivov : dwrite: Font collection pointer is never null when creating text format.
by Alexandre Julliard
16 Dec '14
16 Dec '14
Module: wine Branch: master Commit: f4e30056454fff1c585564f6b3ec5123100b64e4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f4e30056454fff1c585564f6b…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Dec 16 17:48:15 2014 +0300 dwrite: Font collection pointer is never null when creating text format. --- dlls/dwrite/layout.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 6d8145d..4c65732 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -1972,14 +1972,8 @@ HRESULT create_textformat(const WCHAR *family_name, IDWriteFontCollection *colle This->format.trimming.delimiter = 0; This->format.trimming.delimiterCount = 0; This->format.trimmingsign = NULL; - - if (collection) - { - This->format.collection = collection; - IDWriteFontCollection_AddRef(collection); - } - else - ERR("Collection should always be set\n"); + This->format.collection = collection; + IDWriteFontCollection_AddRef(collection); *format = (IDWriteTextFormat*)&This->IDWriteTextFormat1_iface;
1
0
0
0
Nikolay Sivov : dwrite: Support outlines with oblique simulation.
by Alexandre Julliard
16 Dec '14
16 Dec '14
Module: wine Branch: master Commit: bbe6655280082fd39d4a90a36719f13b37de9df1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bbe6655280082fd39d4a90a36…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Dec 15 13:35:03 2014 +0300 dwrite: Support outlines with oblique simulation. --- dlls/dwrite/dwrite_private.h | 2 +- dlls/dwrite/font.c | 2 +- dlls/dwrite/freetype.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 07d894c..3558bf8 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -149,7 +149,7 @@ extern void release_freetype(void) DECLSPEC_HIDDEN; extern HRESULT freetype_get_design_glyph_metrics(IDWriteFontFace2*,UINT16,UINT16,DWRITE_GLYPH_METRICS*) DECLSPEC_HIDDEN; extern void freetype_notify_cacheremove(IDWriteFontFace2*) DECLSPEC_HIDDEN; extern BOOL freetype_is_monospaced(IDWriteFontFace2*) DECLSPEC_HIDDEN; -extern HRESULT freetype_get_glyph_outline(IDWriteFontFace2*,FLOAT,UINT16,struct glyph_outline**) DECLSPEC_HIDDEN; +extern HRESULT freetype_get_glyph_outline(IDWriteFontFace2*,FLOAT,UINT16,USHORT,struct glyph_outline**) DECLSPEC_HIDDEN; /* Glyph shaping */ enum SCRIPT_JUSTIFY diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 9611050..61d370b 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -515,7 +515,7 @@ static HRESULT WINAPI dwritefontface_GetGlyphRunOutline(IDWriteFontFace2 *iface, /* FIXME: cache outlines */ - hr = freetype_get_glyph_outline(iface, emSize, glyphs[g], &outline); + hr = freetype_get_glyph_outline(iface, emSize, glyphs[g], This->simulations, &outline); if (FAILED(hr)) return hr; diff --git a/dlls/dwrite/freetype.c b/dlls/dwrite/freetype.c index b4d9859..43fa4df 100644 --- a/dlls/dwrite/freetype.c +++ b/dlls/dwrite/freetype.c @@ -339,7 +339,7 @@ static HRESULT get_outline_data(const FT_Outline *outline, struct glyph_outline return S_OK; } -HRESULT freetype_get_glyph_outline(IDWriteFontFace2 *fontface, FLOAT emSize, UINT16 index, struct glyph_outline **ret) +HRESULT freetype_get_glyph_outline(IDWriteFontFace2 *fontface, FLOAT emSize, UINT16 index, USHORT simulations, struct glyph_outline **ret) { FTC_ScalerRec scaler; HRESULT hr = S_OK; @@ -358,10 +358,10 @@ HRESULT freetype_get_glyph_outline(IDWriteFontFace2 *fontface, FLOAT emSize, UIN FT_Outline *outline = &size->face->glyph->outline; FT_Matrix m; - m.xx = 1.0 * 0x10000; - m.xy = 0; + m.xx = 1 << 16; + m.xy = simulations & DWRITE_FONT_SIMULATIONS_OBLIQUE ? (1 << 16) / 3 : 0; m.yx = 0; - m.yy = -1.0 * 0x10000; /* flip Y axis */ + m.yy = -(1 << 16); /* flip Y axis */ pFT_Outline_Transform(outline, &m); @@ -400,7 +400,7 @@ BOOL freetype_is_monospaced(IDWriteFontFace2 *fontface) return FALSE; } -HRESULT freetype_get_glyph_outline(IDWriteFontFace2 *fontface, FLOAT emSize, UINT16 index, struct glyph_outline **ret) +HRESULT freetype_get_glyph_outline(IDWriteFontFace2 *fontface, FLOAT emSize, UINT16 index, USHORT simulations, struct glyph_outline **ret) { *ret = NULL; return E_NOTIMPL;
1
0
0
0
Dmitry Kozliuk : winecfg: Fix title reset when removing application from the list.
by Alexandre Julliard
16 Dec '14
16 Dec '14
Module: wine Branch: master Commit: b4e261480daa3e371826284d3f792897ddf29be5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b4e261480daa3e371826284d3…
Author: Dmitry Kozliuk <dmitry.kozliuk(a)gmail.com> Date: Tue Dec 16 01:42:37 2014 +0300 winecfg: Fix title reset when removing application from the list. --- programs/winecfg/appdefaults.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/winecfg/appdefaults.c b/programs/winecfg/appdefaults.c index 7dd3900..66085f4 100644 --- a/programs/winecfg/appdefaults.c +++ b/programs/winecfg/appdefaults.c @@ -394,7 +394,7 @@ static void on_remove_app_click(HWND dialog) item.mask = LVIF_STATE; item.state = LVIS_SELECTED | LVIS_FOCUSED; item.stateMask = LVIS_SELECTED | LVIS_FOCUSED; - SendMessageW(listview, LVM_SETITEMSTATE, -1, (LPARAM)&item); + SendMessageW(listview, LVM_SETITEMSTATE, 0, (LPARAM)&item); SetFocus(listview); SendMessageW(GetParent(dialog), PSM_CHANGED, (WPARAM) dialog, 0);
1
0
0
0
Austin English : include: Flesh out IEnumWIA_DEV_INFO.
by Alexandre Julliard
16 Dec '14
16 Dec '14
Module: wine Branch: master Commit: d3a3595e913c854609c11400e7d50fac14bdb62f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d3a3595e913c854609c11400e…
Author: Austin English <austinenglish(a)gmail.com> Date: Mon Dec 15 18:12:40 2014 -0600 include: Flesh out IEnumWIA_DEV_INFO. --- include/wia_lh.idl | 30 +++++++++++++++++++++++++++++- include/wia_xp.idl | 30 +++++++++++++++++++++++++++++- 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/include/wia_lh.idl b/include/wia_lh.idl index e13a658..7cadbc6 100644 --- a/include/wia_lh.idl +++ b/include/wia_lh.idl @@ -21,6 +21,7 @@ import "oaidl.idl"; import "propidl.idl"; interface IEnumWIA_DEV_INFO; +interface IWiaPropertyStorage; interface IWiaItem; interface IWiaEventCallback; @@ -98,7 +99,34 @@ interface IWiaDevMgr : IUnknown ] interface IEnumWIA_DEV_INFO : IUnknown { - /* fill in */ + HRESULT Next( + [in] ULONG celt, + [out, size_is(celt), length_is(*pceltFetched)] IWiaPropertyStorage **rgelt, + [out] ULONG *pceltFetched + ); + + HRESULT Skip( + [in] ULONG celt + ); + + HRESULT Reset(); + + HRESULT Clone( + [out] IEnumWIA_DEV_INFO **ppIEnum + ); + + HRESULT GetCount( + [out] ULONG *celt + ); +} + +[ + object, + uuid(98B5E8A0-29CC-491a-AAC0-E6DB4FDCCEB6) +] +interface IWiaPropertyStorage : IUnknown +{ + /* FIXME: fill in */ } [ diff --git a/include/wia_xp.idl b/include/wia_xp.idl index e13a658..7cadbc6 100644 --- a/include/wia_xp.idl +++ b/include/wia_xp.idl @@ -21,6 +21,7 @@ import "oaidl.idl"; import "propidl.idl"; interface IEnumWIA_DEV_INFO; +interface IWiaPropertyStorage; interface IWiaItem; interface IWiaEventCallback; @@ -98,7 +99,34 @@ interface IWiaDevMgr : IUnknown ] interface IEnumWIA_DEV_INFO : IUnknown { - /* fill in */ + HRESULT Next( + [in] ULONG celt, + [out, size_is(celt), length_is(*pceltFetched)] IWiaPropertyStorage **rgelt, + [out] ULONG *pceltFetched + ); + + HRESULT Skip( + [in] ULONG celt + ); + + HRESULT Reset(); + + HRESULT Clone( + [out] IEnumWIA_DEV_INFO **ppIEnum + ); + + HRESULT GetCount( + [out] ULONG *celt + ); +} + +[ + object, + uuid(98B5E8A0-29CC-491a-AAC0-E6DB4FDCCEB6) +] +interface IWiaPropertyStorage : IUnknown +{ + /* FIXME: fill in */ } [
1
0
0
0
Jacek Caban : mshtml: Added IHTMLElement4:: focusin semi-stub implementation.
by Alexandre Julliard
16 Dec '14
16 Dec '14
Module: wine Branch: master Commit: 347842a6a1f3ad332789b00771d220c9ba475ab6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=347842a6a1f3ad332789b0077…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Dec 16 13:10:29 2014 +0100 mshtml: Added IHTMLElement4::focusin semi-stub implementation. --- dlls/mshtml/htmlelem.c | 12 ++++++++---- dlls/mshtml/htmlevent.c | 5 +++++ dlls/mshtml/htmlevent.h | 1 + 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index f81ccee..d6cb18f 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -3690,15 +3690,19 @@ static HRESULT WINAPI HTMLElement4_get_onbeforeactivate(IHTMLElement4 *iface, VA static HRESULT WINAPI HTMLElement4_put_onfocusin(IHTMLElement4 *iface, VARIANT v) { HTMLElement *This = impl_from_IHTMLElement4(iface); - FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); - return E_NOTIMPL; + + FIXME("(%p)->(%s) semi-stub\n", This, debugstr_variant(&v)); + + return set_node_event(&This->node, EVENTID_FOCUSIN, &v); } static HRESULT WINAPI HTMLElement4_get_onfocusin(IHTMLElement4 *iface, VARIANT *p) { HTMLElement *This = impl_from_IHTMLElement4(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return get_node_event(&This->node, EVENTID_FOCUSIN, p); } static HRESULT WINAPI HTMLElement4_put_onfocusout(IHTMLElement4 *iface, VARIANT v) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 91e48d9..e1ece61 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -81,6 +81,9 @@ static const WCHAR onerrorW[] = {'o','n','e','r','r','o','r',0}; static const WCHAR focusW[] = {'f','o','c','u','s',0}; static const WCHAR onfocusW[] = {'o','n','f','o','c','u','s',0}; +static const WCHAR focusinW[] = {'f','o','c','u','s','i','n',0}; +static const WCHAR onfocusinW[] = {'o','n','f','o','c','u','s','i','n',0}; + static const WCHAR helpW[] = {'h','e','l','p',0}; static const WCHAR onhelpW[] = {'o','n','h','e','l','p',0}; @@ -190,6 +193,8 @@ static const event_info_t event_info[] = { EVENT_BIND_TO_BODY}, {focusW, onfocusW, EVENTT_HTML, DISPID_EVMETH_ONFOCUS, EVENT_DEFAULTLISTENER}, + {focusinW, onfocusinW, EVENTT_HTML, DISPID_EVMETH_ONFOCUSIN, + EVENT_BUBBLE}, {helpW, onhelpW, EVENTT_KEY, DISPID_EVMETH_ONHELP, EVENT_BUBBLE|EVENT_CANCELABLE}, {keydownW, onkeydownW, EVENTT_KEY, DISPID_EVMETH_ONKEYDOWN, diff --git a/dlls/mshtml/htmlevent.h b/dlls/mshtml/htmlevent.h index bc81171..e312a9c 100644 --- a/dlls/mshtml/htmlevent.h +++ b/dlls/mshtml/htmlevent.h @@ -29,6 +29,7 @@ typedef enum { EVENTID_DRAGSTART, EVENTID_ERROR, EVENTID_FOCUS, + EVENTID_FOCUSIN, EVENTID_HELP, EVENTID_KEYDOWN, EVENTID_KEYPRESS,
1
0
0
0
Jacek Caban : mshtml: Handle VT_ERROR in IHTMLSelectElement::add.
by Alexandre Julliard
16 Dec '14
16 Dec '14
Module: wine Branch: master Commit: e41f435c47d35bc5d5f42e66443080f65055c13e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e41f435c47d35bc5d5f42e664…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Dec 16 13:10:36 2014 +0100 mshtml: Handle VT_ERROR in IHTMLSelectElement::add. --- dlls/mshtml/htmlselect.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/mshtml/htmlselect.c b/dlls/mshtml/htmlselect.c index 3cdf496..5d5967e 100644 --- a/dlls/mshtml/htmlselect.c +++ b/dlls/mshtml/htmlselect.c @@ -382,6 +382,7 @@ static HRESULT WINAPI HTMLSelectElement_add(IHTMLSelectElement *iface, IHTMLElem switch(V_VT(&before)) { case VT_EMPTY: + case VT_ERROR: nsres = nsIWritableVariant_SetAsEmpty(nsvariant); break; case VT_I2:
1
0
0
0
Sebastian Lackner : kernel32: Return proper char count in get_registry_locale_info.
by Alexandre Julliard
16 Dec '14
16 Dec '14
Module: wine Branch: master Commit: 8826ba1bc86fefa22c543608585ae8f3b4310a5f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8826ba1bc86fefa22c5436085…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Tue Dec 16 04:10:34 2014 +0100 kernel32: Return proper char count in get_registry_locale_info. --- dlls/kernel32/locale.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c index 5fee723..1460f7a 100644 --- a/dlls/kernel32/locale.c +++ b/dlls/kernel32/locale.c @@ -1206,7 +1206,9 @@ static INT get_registry_locale_info( struct registry_value *registry_value, LPWS { if (status == STATUS_BUFFER_OVERFLOW && !buffer) { - ret = (size - info_size) / sizeof(WCHAR) + 1; + ret = (size - info_size) / sizeof(WCHAR); + if (!ret || ((WCHAR *)&info->Data)[ret-1]) + ret++; } else if (status == STATUS_OBJECT_NAME_NOT_FOUND) {
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
32
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
Results per page:
10
25
50
100
200