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
July 2022
----- 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
1 participants
639 discussions
Start a n
N
ew thread
Alexandre Julliard : makefiles: Avoid adding the same source multiple times.
by Alexandre Julliard
28 Jul '22
28 Jul '22
Module: wine Branch: master Commit: 6f4d1766a7781dd8dd68b8784b01aedbf497138e URL:
https://gitlab.winehq.org/wine/wine/-/commit/6f4d1766a7781dd8dd68b8784b01ae…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jul 28 15:30:31 2022 +0200 makefiles: Avoid adding the same source multiple times. --- dlls/setupapi/tests/Makefile.in | 2 -- tools/make_makefiles | 6 ++++++ tools/makedep.c | 21 ++++++++++----------- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/dlls/setupapi/tests/Makefile.in b/dlls/setupapi/tests/Makefile.in index df7c6687875..85be56de556 100644 --- a/dlls/setupapi/tests/Makefile.in +++ b/dlls/setupapi/tests/Makefile.in @@ -18,5 +18,3 @@ SOURCES = \ setupapi.rc \ setupcab.c \ stringtable.c - -RC_SRCS = setupapi.rc diff --git a/tools/make_makefiles b/tools/make_makefiles index d61e3865e13..c7afd4080ac 100755 --- a/tools/make_makefiles +++ b/tools/make_makefiles @@ -128,6 +128,7 @@ sub replace_makefile_variables($) my $make = $makefiles{$file}; my $source_vars_regexp = join "|", @source_vars; my %replaced; + my %files; my $old; my $new; @@ -177,6 +178,11 @@ sub replace_makefile_variables($) $new .= $new_str; } $replaced{$var} = 1; + foreach my $val (@values) + { + die "$file.in: duplicate file $val" if defined $files{$val}; + $files{$val} = 1; + } next; } $new .= $_; diff --git a/tools/makedep.c b/tools/makedep.c index 17227120a0e..0e8daf3a960 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -817,10 +817,8 @@ found: static struct incl_file *add_generated_source( struct makefile *make, const char *name, const char *filename ) { - struct incl_file *file; + struct incl_file *file = xmalloc( sizeof(*file) ); - if ((file = find_src_file( make, name ))) return file; /* we already have it */ - file = xmalloc( sizeof(*file) ); memset( file, 0, sizeof(*file) ); file->file = add_file( name ); file->name = xstrdup( name ); @@ -1564,10 +1562,8 @@ static void parse_file( struct makefile *make, struct incl_file *source, int src */ static struct incl_file *add_src_file( struct makefile *make, const char *name ) { - struct incl_file *file; + struct incl_file *file = xmalloc( sizeof(*file) ); - if ((file = find_src_file( make, name ))) return file; /* we already have it */ - file = xmalloc( sizeof(*file) ); memset( file, 0, sizeof(*file) ); file->name = xstrdup(name); file->use_msvcrt = make->use_msvcrt; @@ -1744,7 +1740,7 @@ static struct makefile *parse_makefile( const char *path ) static void add_generated_sources( struct makefile *make ) { unsigned int i; - struct incl_file *source, *next, *file; + struct incl_file *source, *next, *file, *dlldata = NULL; struct strarray objs = get_expanded_make_var_array( make, "EXTRA_OBJS" ); LIST_FOR_EACH_ENTRY_SAFE( source, next, &make->sources, struct incl_file, entry ) @@ -1772,10 +1768,13 @@ static void add_generated_sources( struct makefile *make ) } if (source->file->flags & FLAG_IDL_PROXY) { - file = add_generated_source( make, "dlldata.o", "dlldata.c" ); - add_dependency( file->file, "objbase.h", INCL_NORMAL ); - add_dependency( file->file, "rpcproxy.h", INCL_NORMAL ); - add_all_includes( make, file, file->file ); + if (!dlldata) + { + dlldata = add_generated_source( make, "dlldata.o", "dlldata.c" ); + add_dependency( dlldata->file, "objbase.h", INCL_NORMAL ); + add_dependency( dlldata->file, "rpcproxy.h", INCL_NORMAL ); + add_all_includes( make, dlldata, dlldata->file ); + } file = add_generated_source( make, replace_extension( source->name, ".idl", "_p.c" ), NULL ); add_dependency( file->file, "objbase.h", INCL_NORMAL ); add_dependency( file->file, "rpcproxy.h", INCL_NORMAL );
1
0
0
0
Alexandre Julliard : makefiles: List all headers in the makefile.
by Alexandre Julliard
28 Jul '22
28 Jul '22
Module: wine Branch: master Commit: 872dc83e81c942d17a39700c4b520a6e92ddbdf2 URL:
https://gitlab.winehq.org/wine/wine/-/commit/872dc83e81c942d17a39700c4b520a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jul 28 08:53:19 2022 +0200 makefiles: List all headers in the makefile. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/Makefile.in | 40 ++++++++++++++++++++++++++++++++++++++++ include/wine/debug.h | 4 ++++ include/wine/exception.h | 4 ++++ include/wine/iaccessible2.idl | 4 ++++ include/wine/itss.idl | 4 ++++ include/wine/svcctl.idl | 4 ++++ include/wine/wine_common_ver.rc | 4 ++++ po/ar.po | 4 ++-- po/ast.po | 4 ++-- po/bg.po | 4 ++-- po/ca.po | 4 ++-- po/cs.po | 4 ++-- po/da.po | 4 ++-- po/de.po | 4 ++-- po/el.po | 4 ++-- po/en.po | 4 ++-- po/en_US.po | 4 ++-- po/eo.po | 4 ++-- po/es.po | 4 ++-- po/fa.po | 4 ++-- po/fi.po | 4 ++-- po/fr.po | 4 ++-- po/he.po | 4 ++-- po/hi.po | 4 ++-- po/hr.po | 4 ++-- po/hu.po | 4 ++-- po/it.po | 4 ++-- po/ja.po | 4 ++-- po/ko.po | 4 ++-- po/lt.po | 4 ++-- po/ml.po | 4 ++-- po/nb_NO.po | 4 ++-- po/nl.po | 4 ++-- po/or.po | 4 ++-- po/pa.po | 4 ++-- po/pl.po | 4 ++-- po/pt_BR.po | 4 ++-- po/pt_PT.po | 4 ++-- po/rm.po | 4 ++-- po/ro.po | 4 ++-- po/ru.po | 4 ++-- po/si.po | 4 ++-- po/sk.po | 4 ++-- po/sl.po | 4 ++-- po/sr_RS(a)cyrillic.po | 4 ++-- po/sr_RS(a)latin.po | 4 ++-- po/sv.po | 4 ++-- po/ta.po | 4 ++-- po/te.po | 4 ++-- po/th.po | 4 ++-- po/tr.po | 4 ++-- po/uk.po | 4 ++-- po/wa.po | 4 ++-- po/wine.pot | 4 ++-- po/zh_CN.po | 4 ++-- po/zh_TW.po | 4 ++-- tools/make_makefiles | 13 ------------- tools/makedep.c | 20 ++++++++++++++------ 58 files changed, 176 insertions(+), 117 deletions(-)
1
0
0
0
Gabriel Ivăncescu : mshtml: Implement "text" type response for XMLHttpRequest.
by Alexandre Julliard
28 Jul '22
28 Jul '22
Module: wine Branch: master Commit: c82900e207cd92fdfa3e75eca193ff3070e154dd URL:
https://gitlab.winehq.org/wine/wine/-/commit/c82900e207cd92fdfa3e75eca193ff…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Thu Jul 28 16:05:35 2022 +0300 mshtml: Implement "text" type response for XMLHttpRequest. Also basic implementation of arraybuffer/blob with invalid state, mostly to show how the tests will look. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/tests/xhr.js | 47 +++++++++++++++++++++++++++++++++++++++++++- dlls/mshtml/xmlhttprequest.c | 41 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 85 insertions(+), 3 deletions(-) diff --git a/dlls/mshtml/tests/xhr.js b/dlls/mshtml/tests/xhr.js index 68f3a68caee..d60a449678b 100644 --- a/dlls/mshtml/tests/xhr.js +++ b/dlls/mshtml/tests/xhr.js @@ -245,10 +245,55 @@ function test_responseType() { xhr.send("responseType test"); } +function test_response() { + var xhr = new XMLHttpRequest(), i = 0; + if(!("response" in xhr)) { next_test(); return; } + + var types = [ + [ "text", "application/octet-stream", function() { + if(xhr.readyState < 3) + ok(xhr.response === "", "response for text with state " + state + " = " + xhr.response); + else if(xhr.readyState === 4) + ok(xhr.response === xml, "response for text = " + xhr.response); + }], + [ "arraybuffer", "image/png", function() { + if(xhr.readyState < 4) + ok(xhr.response === undefined, "response for arraybuffer with state " + state + " = " + xhr.response); + }], + [ "blob", "wine/test", function() { + if(xhr.readyState < 4) + ok(xhr.response === undefined, "response for blob with state " + state + " = " + xhr.response); + }] + ]; + + function onreadystatechange() { + types[i][2](); + if(xhr.readyState < 4) + return; + if(++i >= types.length) { + next_test(); + return; + } + xhr = new XMLHttpRequest(); + xhr.open("POST", "echo.php?content-type=" + types[i][1], true); + xhr.onreadystatechange = onreadystatechange; + xhr.setRequestHeader("X-Test", "True"); + xhr.responseType = types[i][0]; + xhr.send(xml); + } + + xhr.open("POST", "echo.php?content-type=" + types[i][1], true); + xhr.onreadystatechange = onreadystatechange; + xhr.setRequestHeader("X-Test", "True"); + xhr.responseType = types[i][0]; + xhr.send(xml); +} + var tests = [ test_xhr, test_content_types, test_abort, test_timeout, - test_responseType + test_responseType, + test_response ]; diff --git a/dlls/mshtml/xmlhttprequest.c b/dlls/mshtml/xmlhttprequest.c index 6f639d3b821..e01c9791f6f 100644 --- a/dlls/mshtml/xmlhttprequest.c +++ b/dlls/mshtml/xmlhttprequest.c @@ -938,10 +938,47 @@ static HRESULT WINAPI HTMLXMLHttpRequest_private_Invoke(IWineXMLHttpRequestPriva static HRESULT WINAPI HTMLXMLHttpRequest_private_get_response(IWineXMLHttpRequestPrivate *iface, VARIANT *p) { HTMLXMLHttpRequest *This = impl_from_IWineXMLHttpRequestPrivate(iface); + HRESULT hres = S_OK; + nsresult nsres; + UINT16 state; - FIXME("(%p)->(%p)\n", This, p); + TRACE("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + switch(This->response_type) { + case response_type_empty: + case response_type_text: + hres = IHTMLXMLHttpRequest_get_responseText(&This->IHTMLXMLHttpRequest_iface, &V_BSTR(p)); + if(SUCCEEDED(hres)) + V_VT(p) = VT_BSTR; + break; + + case response_type_doc: + FIXME("response_type_doc\n"); + return E_NOTIMPL; + + case response_type_arraybuf: + case response_type_blob: + nsres = nsIXMLHttpRequest_GetReadyState(This->nsxhr, &state); + if(NS_FAILED(nsres) || state < 4) { + V_VT(p) = VT_EMPTY; + break; + } + if(This->response_type == response_type_arraybuf) { + FIXME("response_type_arraybuf\n"); + return E_NOTIMPL; + } + FIXME("response_type_blob\n"); + return E_NOTIMPL; + + case response_type_stream: + FIXME("response_type_stream\n"); + return E_NOTIMPL; + + default: + assert(0); + } + + return hres; } static HRESULT WINAPI HTMLXMLHttpRequest_private_put_responseType(IWineXMLHttpRequestPrivate *iface, BSTR v)
1
0
0
0
Gabriel Ivăncescu : mshtml: Implement responseType prop for XMLHttpRequest.
by Alexandre Julliard
28 Jul '22
28 Jul '22
Module: wine Branch: master Commit: 6537c36df492cbca018ab7defd83980920044c79 URL:
https://gitlab.winehq.org/wine/wine/-/commit/6537c36df492cbca018ab7defd8398…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Thu Jul 28 16:05:35 2022 +0300 mshtml: Implement responseType prop for XMLHttpRequest. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/tests/xhr.js | 57 ++++++++++++++++++++++++++++++++++++++++++- dlls/mshtml/xmlhttprequest.c | 58 +++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 110 insertions(+), 5 deletions(-) diff --git a/dlls/mshtml/tests/xhr.js b/dlls/mshtml/tests/xhr.js index dd3750632c7..68f3a68caee 100644 --- a/dlls/mshtml/tests/xhr.js +++ b/dlls/mshtml/tests/xhr.js @@ -191,9 +191,64 @@ function test_timeout() { xhr.send("Timeout Test"); } +function test_responseType() { + var i, xhr = new XMLHttpRequest(); + if(!("responseType" in xhr)) { next_test(); return; } + + ok(xhr.responseType === "", "default responseType = " + xhr.responseType); + try { + xhr.responseType = ""; + ok(false, "setting responseType before open() did not throw exception"); + }catch(ex) { + todo_wine. + ok(ex.name === "InvalidStateError", "setting responseType before open() threw " + ex.name); + } + try { + xhr.responseType = "invalid response type"; + ok(false, "setting invalid responseType before open() did not throw exception"); + }catch(ex) { + todo_wine. + ok(ex.name === "InvalidStateError", "setting invalid responseType before open() threw " + ex.name); + } + + xhr.open("POST", "echo.php", true); + xhr.setRequestHeader("X-Test", "True"); + ok(xhr.responseType === "", "default responseType after open() = " + xhr.responseType); + + var types = [ "text", "", "document", "arraybuffer", "blob", "ms-stream" ]; + for(i = 0; i < types.length; i++) { + xhr.responseType = types[i]; + ok(xhr.responseType === types[i], "responseType = " + xhr.responseType + ", expected " + types[i]); + } + + types = [ "json", "teXt", "Document", "moz-chunked-text", "moz-blob", null ]; + for(i = 0; i < types.length; i++) { + xhr.responseType = types[i]; + ok(xhr.responseType === "ms-stream", "responseType (after set to " + types[i] + ") = " + xhr.responseType); + } + + xhr.responseType = ""; + xhr.onreadystatechange = function() { + if(xhr.readyState < 3) { + xhr.responseType = ""; + return; + } + try { + xhr.responseType = ""; + ok(false, "setting responseType with state " + xhr.readyState + " did not throw exception"); + }catch(ex) { + todo_wine. + ok(ex.name === "InvalidStateError", "setting responseType with state " + xhr.readyState + " threw " + ex.name); + } + } + xhr.onloadend = function() { next_test(); } + xhr.send("responseType test"); +} + var tests = [ test_xhr, test_content_types, test_abort, - test_timeout + test_timeout, + test_responseType ]; diff --git a/dlls/mshtml/xmlhttprequest.c b/dlls/mshtml/xmlhttprequest.c index b17fa418c6c..6f639d3b821 100644 --- a/dlls/mshtml/xmlhttprequest.c +++ b/dlls/mshtml/xmlhttprequest.c @@ -103,6 +103,27 @@ static const eventid_t events[] = { EVENTID_TIMEOUT, }; +typedef enum { + response_type_empty, + response_type_text, + response_type_doc, + response_type_arraybuf, + response_type_blob, + response_type_stream +} response_type_t; + +static const struct { + const WCHAR *str; + const WCHAR *nsxhr_str; +} response_type_desc[] = { + [response_type_empty] = { L"", L"" }, + [response_type_text] = { L"text", L"" }, + [response_type_doc] = { L"document", L"" }, /* FIXME */ + [response_type_arraybuf] = { L"arraybuffer", L"arraybuffer" }, + [response_type_blob] = { L"blob", L"arraybuffer" }, + [response_type_stream] = { L"ms-stream", L"arraybuffer" } /* FIXME */ +}; + typedef struct { nsIDOMEventListener nsIDOMEventListener_iface; LONG ref; @@ -117,6 +138,7 @@ struct HTMLXMLHttpRequest { IWineXMLHttpRequestPrivate IWineXMLHttpRequestPrivate_iface; IProvideClassInfo2 IProvideClassInfo2_iface; LONG ref; + response_type_t response_type; nsIXMLHttpRequest *nsxhr; XMLHttpReqEventListener *event_listener; }; @@ -925,19 +947,47 @@ static HRESULT WINAPI HTMLXMLHttpRequest_private_get_response(IWineXMLHttpReques static HRESULT WINAPI HTMLXMLHttpRequest_private_put_responseType(IWineXMLHttpRequestPrivate *iface, BSTR v) { HTMLXMLHttpRequest *This = impl_from_IWineXMLHttpRequestPrivate(iface); + nsAString nsstr; + nsresult nsres; + HRESULT hres; + unsigned i; + LONG state; - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + hres = IHTMLXMLHttpRequest_get_readyState(&This->IHTMLXMLHttpRequest_iface, &state); + if(FAILED(hres)) + return hres; + + if(state < 1 || state > 2) { + /* FIXME: Return InvalidStateError */ + return E_FAIL; + } + + for(i = 0; i < ARRAY_SIZE(response_type_desc); i++) + if(!wcscmp(v, response_type_desc[i].str)) + break; + if(i >= ARRAY_SIZE(response_type_desc)) + return S_OK; + + nsAString_InitDepend(&nsstr, response_type_desc[i].nsxhr_str); + nsres = nsIXMLHttpRequest_SetResponseType(This->nsxhr, &nsstr); + nsAString_Finish(&nsstr); + if(NS_FAILED(nsres)) + return map_nsresult(nsres); + + This->response_type = i; + return S_OK; } static HRESULT WINAPI HTMLXMLHttpRequest_private_get_responseType(IWineXMLHttpRequestPrivate *iface, BSTR *p) { HTMLXMLHttpRequest *This = impl_from_IWineXMLHttpRequestPrivate(iface); - FIXME("(%p)->(%p)\n", This, p); + TRACE("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + *p = SysAllocString(response_type_desc[This->response_type].str); + return *p ? S_OK : E_OUTOFMEMORY; } static HRESULT WINAPI HTMLXMLHttpRequest_private_get_upload(IWineXMLHttpRequestPrivate *iface, IDispatch **p)
1
0
0
0
Gabriel Ivăncescu : mshtml: Fix string leak on NamespaceError.
by Alexandre Julliard
28 Jul '22
28 Jul '22
Module: wine Branch: master Commit: fab55e22b725798e4d6da4736d178ce0d2f63c1b URL:
https://gitlab.winehq.org/wine/wine/-/commit/fab55e22b725798e4d6da4736d178c…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Thu Jul 28 16:05:35 2022 +0300 mshtml: Fix string leak on NamespaceError. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/htmlelem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 826d131df77..f8fa285999e 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -4857,6 +4857,7 @@ static HRESULT WINAPI HTMLElement6_setAttributeNS(IHTMLElement6 *iface, VARIANT return hres; nsAString_GetData(&ns_str, &ns); if((!ns || !ns[0]) && wcschr(strAttributeName, ':')) { + nsAString_Finish(&ns_str); /* FIXME: Return NamespaceError */ return E_FAIL; }
1
0
0
0
Hugh McMaster : regedit: Limit REG_DWORD/REG_QWORD input length by value type and format.
by Alexandre Julliard
28 Jul '22
28 Jul '22
Module: wine Branch: master Commit: b8b87e55a6afbe23597d51308e89d3bd9f9f4c9a URL:
https://gitlab.winehq.org/wine/wine/-/commit/b8b87e55a6afbe23597d51308e89d3…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Jul 28 22:19:14 2022 +1000 regedit: Limit REG_DWORD/REG_QWORD input length by value type and format. --- programs/regedit/edit.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/programs/regedit/edit.c b/programs/regedit/edit.c index 181672b4da6..66d3a27dc68 100644 --- a/programs/regedit/edit.c +++ b/programs/regedit/edit.c @@ -184,7 +184,15 @@ static INT_PTR CALLBACK modify_string_dlgproc(HWND hwndDlg, UINT msg, WPARAM wpa return FALSE; } -static void change_dword_base(HWND hwndDlg, BOOL toHex) +static void set_dword_edit_limit(HWND hwndDlg, DWORD type) +{ + if (isDecimal) + SendDlgItemMessageW(hwndDlg, IDC_VALUE_DATA, EM_SETLIMITTEXT, type == REG_DWORD ? 10 : 20, 0); + else + SendDlgItemMessageW(hwndDlg, IDC_VALUE_DATA, EM_SETLIMITTEXT, type == REG_DWORD ? 8 : 16, 0); +} + +static void change_dword_base(HWND hwndDlg, BOOL toHex, DWORD type) { WCHAR buf[64]; unsigned int len; @@ -204,11 +212,13 @@ static void change_dword_base(HWND hwndDlg, BOOL toHex) } isDecimal = !toHex; + + set_dword_edit_limit(hwndDlg, type); } static INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT msg, WPARAM wparam, LPARAM lparam) { - struct edit_params *params; + static struct edit_params *params; WCHAR buf[64]; int ret = 0; @@ -223,15 +233,16 @@ static INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT msg, WPARAM wpar isDecimal = FALSE; if (params->type == REG_QWORD && LoadStringW(GetModuleHandleW(0), IDS_EDIT_QWORD, buf, ARRAY_SIZE(buf))) SetWindowTextW(hwndDlg, buf); + set_dword_edit_limit(hwndDlg, params->type); return TRUE; case WM_COMMAND: switch (LOWORD(wparam)) { case IDC_DWORD_HEX: - change_dword_base(hwndDlg, TRUE); + change_dword_base(hwndDlg, TRUE, params->type); break; case IDC_DWORD_DEC: - change_dword_base(hwndDlg, FALSE); + change_dword_base(hwndDlg, FALSE, params->type); break; case IDOK: params = (struct edit_params *)GetWindowLongPtrW(hwndDlg, DWLP_USER);
1
0
0
0
Hugh McMaster : regedit: Use zero as a REG_DWORD/REG_QWORD default if edit control is empty.
by Alexandre Julliard
28 Jul '22
28 Jul '22
Module: wine Branch: master Commit: e604f3e2ef7d202ecfa9927d1e39706956c9d6aa URL:
https://gitlab.winehq.org/wine/wine/-/commit/e604f3e2ef7d202ecfa9927d1e3970…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Jul 28 14:53:49 2022 +1000 regedit: Use zero as a REG_DWORD/REG_QWORD default if edit control is empty. --- programs/regedit/edit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/programs/regedit/edit.c b/programs/regedit/edit.c index 79151ee1af6..181672b4da6 100644 --- a/programs/regedit/edit.c +++ b/programs/regedit/edit.c @@ -235,6 +235,8 @@ static INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT msg, WPARAM wpar break; case IDOK: params = (struct edit_params *)GetWindowLongPtrW(hwndDlg, DWLP_USER); + if (!SendDlgItemMessageW(hwndDlg, IDC_VALUE_DATA, EM_LINELENGTH, 0, 0)) + SetDlgItemTextW(hwndDlg, IDC_VALUE_DATA, L"0"); ret = update_registry_value(hwndDlg, params); /* fall through */ case IDCANCEL:
1
0
0
0
Jacek Caban : user32: Inline DEFWND_ControlColor implementation.
by Alexandre Julliard
28 Jul '22
28 Jul '22
Module: wine Branch: master Commit: cf9e6b3b2281eba68a76e8677d9a36f866178e63 URL:
https://gitlab.winehq.org/wine/wine/-/commit/cf9e6b3b2281eba68a76e8677d9a36…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jul 28 13:18:16 2022 +0200 user32: Inline DEFWND_ControlColor implementation. --- dlls/user32/controls.h | 3 --- dlls/user32/defwnd.c | 36 ------------------------------------ dlls/user32/scroll.c | 30 +++++++++++++++++++++--------- 3 files changed, 21 insertions(+), 48 deletions(-) diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index 955c9092a54..036d872c43c 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -106,9 +106,6 @@ struct tagWND; extern ATOM get_int_atom_value( UNICODE_STRING *name ) DECLSPEC_HIDDEN; extern void register_desktop_class(void) DECLSPEC_HIDDEN; -/* defwnd proc */ -extern HBRUSH DEFWND_ControlColor( HDC hDC, UINT ctlType ) DECLSPEC_HIDDEN; - /* desktop */ extern BOOL update_wallpaper( const WCHAR *wallpaper, const WCHAR *pattern ) DECLSPEC_HIDDEN; diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c index 9e258e5d3c0..34a4f294429 100644 --- a/dlls/user32/defwnd.c +++ b/dlls/user32/defwnd.c @@ -34,42 +34,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(win); -/*********************************************************************** - * DEFWND_ControlColor - * - * Default colors for control painting. - */ -HBRUSH DEFWND_ControlColor( HDC hDC, UINT ctlType ) -{ - if( ctlType == CTLCOLOR_SCROLLBAR) - { - HBRUSH hb = GetSysColorBrush(COLOR_SCROLLBAR); - COLORREF bk = GetSysColor(COLOR_3DHILIGHT); - SetTextColor( hDC, GetSysColor(COLOR_3DFACE)); - SetBkColor( hDC, bk); - - /* if COLOR_WINDOW happens to be the same as COLOR_3DHILIGHT - * we better use 0x55aa bitmap brush to make scrollbar's background - * look different from the window background. - */ - if (bk == GetSysColor(COLOR_WINDOW)) - return SYSCOLOR_Get55AABrush(); - - UnrealizeObject( hb ); - return hb; - } - - SetTextColor( hDC, GetSysColor(COLOR_WINDOWTEXT)); - - if ((ctlType == CTLCOLOR_EDIT) || (ctlType == CTLCOLOR_LISTBOX)) - SetBkColor( hDC, GetSysColor(COLOR_WINDOW) ); - else { - SetBkColor( hDC, GetSysColor(COLOR_3DFACE) ); - return GetSysColorBrush(COLOR_3DFACE); - } - return GetSysColorBrush(COLOR_WINDOW); -} - /*********************************************************************** * DefWindowProcA (USER32.@) diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c index 9453df9dedd..9e17424a8de 100644 --- a/dlls/user32/scroll.c +++ b/dlls/user32/scroll.c @@ -97,18 +97,30 @@ static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, INT nBar, HPEN hSavePen; HBRUSH hSaveBrush,hBrush; - /* Select the correct brush and pen */ - - /* Only scrollbar controls send WM_CTLCOLORSCROLLBAR. - * The window-owned scrollbars need to call DEFWND_ControlColor - * to correctly setup default scrollbar colors - */ - if (nBar == SB_CTL) { + if (nBar == SB_CTL) + { hBrush = (HBRUSH)SendMessageW( GetParent(hwnd), WM_CTLCOLORSCROLLBAR, (WPARAM)hdc,(LPARAM)hwnd); - } else { - hBrush = DEFWND_ControlColor( hdc, CTLCOLOR_SCROLLBAR ); } + else + { + COLORREF bk = GetSysColor( COLOR_3DHILIGHT ); + SetTextColor( hdc, GetSysColor( COLOR_3DFACE )); + SetBkColor( hdc, bk ); + + /* if COLOR_WINDOW happens to be the same as COLOR_3DHILIGHT + * we better use 0x55aa bitmap brush to make scrollbar's background + * look different from the window background. + */ + if (bk == GetSysColor( COLOR_WINDOW )) + hBrush = SYSCOLOR_Get55AABrush(); + else + { + hBrush = GetSysColorBrush( COLOR_SCROLLBAR ); + UnrealizeObject( hBrush ); + } + } + hSavePen = SelectObject( hdc, SYSCOLOR_GetPen(COLOR_WINDOWFRAME) ); hSaveBrush = SelectObject( hdc, hBrush );
1
0
0
0
Jacek Caban : win32u: Remove no longer needed exports.
by Alexandre Julliard
28 Jul '22
28 Jul '22
Module: wine Branch: master Commit: fa7aaca9f1e057cc8a411edb77f5728510bb9c88 URL:
https://gitlab.winehq.org/wine/wine/-/commit/fa7aaca9f1e057cc8a411edb77f572…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jul 26 20:39:19 2022 +0200 win32u: Remove no longer needed exports. --- dlls/user32/user_main.c | 19 ------------------- dlls/user32/user_private.h | 3 --- dlls/user32/winproc.c | 26 -------------------------- dlls/win32u/class.c | 6 ++++++ dlls/win32u/ntuser_private.h | 12 ++---------- dlls/win32u/sysparams.c | 6 ------ include/ntuser.h | 2 -- 7 files changed, 8 insertions(+), 66 deletions(-) diff --git a/dlls/user32/user_main.c b/dlls/user32/user_main.c index d3940d4a95c..91f2891f198 100644 --- a/dlls/user32/user_main.c +++ b/dlls/user32/user_main.c @@ -39,8 +39,6 @@ WINE_DECLARE_DEBUG_CHANNEL(message); HMODULE user32_module = 0; -static DWORD exiting_thread_id; - extern void WDML_NotifyThreadDetach(void); /*********************************************************************** @@ -241,15 +239,6 @@ static BOOL process_attach(void) } -/********************************************************************** - * USER_IsExitingThread - */ -BOOL USER_IsExitingThread( DWORD tid ) -{ - return (tid == exiting_thread_id); -} - - /********************************************************************** * thread_detach */ @@ -257,15 +246,12 @@ static void thread_detach(void) { struct user_thread_info *thread_info = get_user_thread_info(); - exiting_thread_id = GetCurrentThreadId(); NtUserCallNoParam( NtUserExitingThread ); WDML_NotifyThreadDetach(); NtUserCallNoParam( NtUserThreadDetach ); HeapFree( GetProcessHeap(), 0, thread_info->wmchar_data ); - - exiting_thread_id = 0; } @@ -380,11 +366,6 @@ const char *SPY_GetMsgName( UINT msg, HWND hwnd ) return (const char *)NtUserCallHwndParam( hwnd, msg, NtUserSpyGetMsgName ); } -const char *SPY_GetVKeyName( WPARAM wparam ) -{ - return (const char *)NtUserCallOneParam( wparam, NtUserSpyGetVKeyName ); -} - void SPY_EnterMessage( INT flag, HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ) { if (TRACE_ON(message)) NtUserMessageCall( hwnd, msg, wparam, lparam, 0, NtUserSpyEnter, flag ); diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index 3e2cebd99ae..d4a296f4bb7 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -77,7 +77,6 @@ extern HPEN SYSCOLOR_GetPen( INT index ) DECLSPEC_HIDDEN; extern HBRUSH SYSCOLOR_Get55AABrush(void) DECLSPEC_HIDDEN; extern void SYSPARAMS_Init(void) DECLSPEC_HIDDEN; extern void USER_CheckNotLock(void) DECLSPEC_HIDDEN; -extern BOOL USER_IsExitingThread( DWORD tid ) DECLSPEC_HIDDEN; typedef LRESULT (*winproc_callback_t)( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result, void *arg ); @@ -90,7 +89,6 @@ extern INT_PTR WINPROC_CallDlgProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM extern INT_PTR WINPROC_CallDlgProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN; extern void winproc_init(void) DECLSPEC_HIDDEN; extern void dispatch_win_proc_params( struct win_proc_params *params ) DECLSPEC_HIDDEN; -extern void get_winproc_params( struct win_proc_params *params ) DECLSPEC_HIDDEN; extern ATOM get_class_info( HINSTANCE instance, const WCHAR *name, WNDCLASSEXW *info, UNICODE_STRING *name_str, BOOL ansi ) DECLSPEC_HIDDEN; @@ -107,7 +105,6 @@ BOOL WINAPI User32RegisterBuiltinClasses( const struct win_hook_params *params, /* message spy definitions */ extern const char *SPY_GetMsgName( UINT msg, HWND hWnd ) DECLSPEC_HIDDEN; -extern const char *SPY_GetVKeyName(WPARAM wParam) DECLSPEC_HIDDEN; extern void SPY_EnterMessage( INT iFlag, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN; extern void SPY_ExitMessage( INT iFlag, HWND hwnd, UINT msg, LRESULT lReturn, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN; diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index e71b222ce79..3b7927891b5 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -66,13 +66,6 @@ static inline void free_buffer( void *static_buffer, void *buffer ) if (buffer != static_buffer) HeapFree( GetProcessHeap(), 0, buffer ); } -/* return the window proc for a given handle, or NULL for an invalid handle, - * or WINPROC_PROC16 for a handle to a 16-bit proc. */ -static inline WINDOWPROC *handle_to_proc( WNDPROC handle ) -{ - return (WINDOWPROC *)NtUserCallOneParam( HandleToUlong(handle), NtUserGetWinProcPtr ); -} - #ifdef __i386__ /* Some window procedures modify registers they shouldn't, or are not * properly declared stdcall; so we need a small assembly wrapper to @@ -1276,25 +1269,6 @@ BOOL WINAPI User32CallWindowProc( struct win_proc_params *params, ULONG size ) return TRUE; } -void get_winproc_params( struct win_proc_params *params ) -{ - WINDOWPROC *proc = handle_to_proc( params->func ); - - if (!proc) - { - params->procW = params->procA = NULL; - } - else if (proc == WINPROC_PROC16) - { - params->procW = params->procA = WINPROC_PROC16; - } - else - { - params->procA = proc->procA; - params->procW = proc->procW; - } -} - BOOL WINAPI User32CallSendAsyncCallback( const struct send_async_params *params, ULONG size ) { params->callback( params->hwnd, params->msg, params->data, params->result ); diff --git a/dlls/win32u/class.c b/dlls/win32u/class.c index 5fa5436436b..eab65b72ef6 100644 --- a/dlls/win32u/class.c +++ b/dlls/win32u/class.c @@ -60,6 +60,12 @@ typedef struct tagCLASS struct client_menu_name menu_name; /* Default menu name */ } CLASS; +typedef struct tagWINDOWPROC +{ + WNDPROC procA; /* ANSI window proc */ + WNDPROC procW; /* Unicode window proc */ +} WINDOWPROC; + static WINDOWPROC winproc_array[MAX_WINPROCS]; static UINT winproc_used = NB_BUILTIN_WINPROCS; static pthread_mutex_t winproc_lock = PTHREAD_MUTEX_INITIALIZER; diff --git a/dlls/win32u/ntuser_private.h b/dlls/win32u/ntuser_private.h index ecb5ab82164..3ecd7424f77 100644 --- a/dlls/win32u/ntuser_private.h +++ b/dlls/win32u/ntuser_private.h @@ -106,8 +106,8 @@ typedef struct tagWND #define WIN_CHILDREN_MOVED 0x0040 /* children may have moved, ignore stored positions */ #define WIN_HAS_IME_WIN 0x0080 /* the window has been registered with imm32 */ -#define WND_OTHER_PROCESS ((WND *)1) /* returned by WIN_GetPtr on unknown window handles */ -#define WND_DESKTOP ((WND *)2) /* returned by WIN_GetPtr on the desktop window */ +#define WND_OTHER_PROCESS ((WND *)1) /* returned by get_win_ptr on unknown window handles */ +#define WND_DESKTOP ((WND *)2) /* returned by get_win_ptr on the desktop window */ /* check if hwnd is a broadcast magic handle */ static inline BOOL is_broadcast( HWND hwnd ) @@ -197,13 +197,6 @@ struct scroll_bar_win_data struct scroll_info info; }; -/* FIXME: make it private to class.c */ -typedef struct tagWINDOWPROC -{ - WNDPROC procA; /* ANSI window proc */ - WNDPROC procW; /* Unicode window proc */ -} WINDOWPROC; - #define WINPROC_HANDLE (~0u >> 16) #define BUILTIN_WINPROC(index) ((WNDPROC)(ULONG_PTR)((index) | (WINPROC_HANDLE << 16))) @@ -243,7 +236,6 @@ extern void spy_exit_message( INT flag, HWND hwnd, UINT msg, /* class.c */ extern HINSTANCE user32_module DECLSPEC_HIDDEN; WNDPROC alloc_winproc( WNDPROC func, BOOL ansi ) DECLSPEC_HIDDEN; -WINDOWPROC *get_winproc_ptr( WNDPROC handle ) DECLSPEC_HIDDEN; BOOL is_winproc_unicode( WNDPROC proc, BOOL def_val ) DECLSPEC_HIDDEN; DWORD get_class_long( HWND hwnd, INT offset, BOOL ansi ) DECLSPEC_HIDDEN; WNDPROC get_class_winproc( struct tagCLASS *class ) DECLSPEC_HIDDEN; diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 3c1051b2d80..0a453f937c3 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -5031,9 +5031,6 @@ ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code ) case NtUserGetDeskPattern: return get_entry( &entry_DESKPATTERN, 256, (WCHAR *)arg ); - case NtUserGetWinProcPtr: - return (UINT_PTR)get_winproc_ptr( UlongToHandle(arg) ); - case NtUserLock: switch( arg ) { @@ -5042,9 +5039,6 @@ ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code ) default: user_check_not_lock(); return 0; } - case NtUserSpyGetVKeyName: - return (UINT_PTR)debugstr_vkey_name( arg ); - default: FIXME( "invalid code %u\n", code ); return 0; diff --git a/include/ntuser.h b/include/ntuser.h index c223d1f2704..86e2d329eb9 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -922,9 +922,7 @@ enum NtUserCallOneParam_SetProcessDefaultLayout, /* temporary exports */ NtUserGetDeskPattern, - NtUserGetWinProcPtr, NtUserLock, - NtUserSpyGetVKeyName, }; static inline HDWP NtUserBeginDeferWindowPos( INT count )
1
0
0
0
Jacek Caban : win32u: Introduce NtUserGetDialogProc.
by Alexandre Julliard
28 Jul '22
28 Jul '22
Module: wine Branch: master Commit: 3dc3709f4cf49456b02720ff1a12412bc07e0dee URL:
https://gitlab.winehq.org/wine/wine/-/commit/3dc3709f4cf49456b02720ff1a1241…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jul 26 20:33:40 2022 +0200 win32u: Introduce NtUserGetDialogProc. And use it in user32 instead of DEFDLG_GetDlgProc. --- dlls/user32/defdlg.c | 34 ++++------------------------------ dlls/user32/dialog.c | 23 ++++------------------- dlls/user32/user_private.h | 4 ++-- dlls/user32/winproc.c | 36 ++++++++++++++++-------------------- dlls/win32u/class.c | 25 +++++++++++++++++++++++++ dlls/win32u/ntuser_private.h | 1 + dlls/win32u/window.c | 3 +++ include/ntuser.h | 13 +++++++++++++ 8 files changed, 68 insertions(+), 71 deletions(-)
1
0
0
0
← Newer
1
2
3
4
5
6
...
64
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
Results per page:
10
25
50
100
200