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
January 2023
----- 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
467 discussions
Start a n
N
ew thread
Gabriel Ivăncescu : mshtml: Implement location props when there's no URI.
by Alexandre Julliard
27 Jan '23
27 Jan '23
Module: wine Branch: master Commit: 97b509ea8b3e499eb25a2cc90211cba68c16dbae URL:
https://gitlab.winehq.org/wine/wine/-/commit/97b509ea8b3e499eb25a2cc90211cb…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Thu Jan 26 17:58:17 2023 +0200 mshtml: Implement location props when there's no URI. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/htmldoc.c | 3 ++ dlls/mshtml/htmllocation.c | 38 +++++++++----------- dlls/mshtml/tests/htmllocation.c | 75 +++++++++++++++++++++++----------------- 3 files changed, 63 insertions(+), 53 deletions(-) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 414a39ae702..2b885d479ab 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -1159,6 +1159,9 @@ static HRESULT WINAPI HTMLDocument_get_domain(IHTMLDocument2 *iface, BSTR *p) return E_NOTIMPL; } + if(This->outer_window && !This->outer_window->uri) + return E_FAIL; + nsAString_Init(&nsstr, NULL); nsres = nsIDOMHTMLDocument_GetDomain(This->html_document, &nsstr); if(NS_SUCCEEDED(nsres) && This->outer_window && This->outer_window->uri) { diff --git a/dlls/mshtml/htmllocation.c b/dlls/mshtml/htmllocation.c index 5376b3b8329..066ebb4f5e6 100644 --- a/dlls/mshtml/htmllocation.c +++ b/dlls/mshtml/htmllocation.c @@ -38,12 +38,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml); static HRESULT get_url(HTMLLocation *This, const WCHAR **ret) { - if(!This->window || !This->window->base.outer_window || !This->window->base.outer_window->url) { - FIXME("No current URL\n"); - return E_NOTIMPL; - } - - *ret = This->window->base.outer_window->url; + if(!This->window || !This->window->base.outer_window || !This->window->base.outer_window->url) + *ret = L"about:blank"; + else + *ret = This->window->base.outer_window->url; return S_OK; } @@ -295,10 +293,8 @@ static HRESULT WINAPI HTMLLocation_get_protocol(IHTMLLocation *iface, BSTR *p) if(!p) return E_POINTER; - if(!(uri = get_uri(This))) { - FIXME("No current URI\n"); - return E_NOTIMPL; - } + if(!(uri = get_uri(This))) + return (*p = SysAllocString(L"about:")) ? S_OK : E_OUTOFMEMORY; hres = IUri_GetSchemeName(uri, &protocol); if(FAILED(hres)) @@ -388,8 +384,8 @@ static HRESULT WINAPI HTMLLocation_get_hostname(IHTMLLocation *iface, BSTR *p) return E_POINTER; if(!(uri = get_uri(This))) { - FIXME("No current URI\n"); - return E_NOTIMPL; + *p = NULL; + return S_OK; } hres = IUri_GetHost(uri, &hostname); @@ -425,8 +421,8 @@ static HRESULT WINAPI HTMLLocation_get_port(IHTMLLocation *iface, BSTR *p) return E_POINTER; if(!(uri = get_uri(This))) { - FIXME("No current URI\n"); - return E_NOTIMPL; + *p = NULL; + return S_OK; } hres = IUri_GetPort(uri, &port); @@ -466,10 +462,8 @@ static HRESULT WINAPI HTMLLocation_get_pathname(IHTMLLocation *iface, BSTR *p) if(!p) return E_POINTER; - if(!(uri = get_uri(This))) { - FIXME("No current URI\n"); - return E_NOTIMPL; - } + if(!(uri = get_uri(This))) + return (*p = SysAllocString(L"blank")) ? S_OK : E_OUTOFMEMORY; hres = IUri_GetPath(uri, &path); if(FAILED(hres)) @@ -504,8 +498,8 @@ static HRESULT WINAPI HTMLLocation_get_search(IHTMLLocation *iface, BSTR *p) return E_POINTER; if(!(uri = get_uri(This))) { - FIXME("No current URI\n"); - return E_NOTIMPL; + *p = NULL; + return S_OK; } hres = IUri_GetQuery(uri, &query); @@ -562,8 +556,8 @@ static HRESULT WINAPI HTMLLocation_get_hash(IHTMLLocation *iface, BSTR *p) return E_POINTER; if(!(uri = get_uri(This))) { - FIXME("No current URI\n"); - return E_NOTIMPL; + *p = NULL; + return S_OK; } hres = IUri_GetFragment(uri, &hash); diff --git a/dlls/mshtml/tests/htmllocation.c b/dlls/mshtml/tests/htmllocation.c index 0b241085af2..222b9553816 100644 --- a/dlls/mshtml/tests/htmllocation.c +++ b/dlls/mshtml/tests/htmllocation.c @@ -39,6 +39,18 @@ struct location_test { }; static const struct location_test location_tests[] = { + { + "Empty", + NULL, + "about:blank", + "about:", + NULL, + NULL, + NULL, + "blank", + NULL, + NULL + }, { "HTTP", "
http://www.winehq.org?search#hash
", @@ -187,7 +199,7 @@ static void test_hostname(IHTMLLocation *loc, IHTMLDocument2 *doc, const struct SysFreeString(str); hres = IHTMLDocument2_get_domain(doc, &str); - ok(hres == S_OK, "%s: get_domain failed: 0x%08lx\n", test->name, hres); + ok(hres == (test->url ? S_OK : E_FAIL), "%s: get_domain failed: 0x%08lx\n", test->name, hres); if(hres == S_OK) ok(str_eq_wa(str, test->hostname ? test->hostname : ""), "%s: expected retrieved domain to be L\"%s\", was: %s\n", @@ -280,7 +292,7 @@ static void perform_test(const struct location_test* test) WCHAR url[INTERNET_MAX_URL_LENGTH]; HRESULT hres; IBindCtx *bc; - IMoniker *url_mon; + IMoniker *url_mon = NULL; IPersistMoniker *persist_mon; IHTMLDocument2 *doc; IHTMLDocument6 *doc6; @@ -291,12 +303,14 @@ static void perform_test(const struct location_test* test) if(FAILED(hres)) return; - MultiByteToWideChar(CP_ACP, 0, test->url, -1, url, ARRAY_SIZE(url)); - hres = CreateURLMoniker(NULL, url, &url_mon); - ok(hres == S_OK, "%s: CreateURLMoniker failed: 0x%08lx\n", test->name, hres); - if(FAILED(hres)){ - IBindCtx_Release(bc); - return; + if(test->url) { + MultiByteToWideChar(CP_ACP, 0, test->url, -1, url, ARRAY_SIZE(url)); + hres = CreateURLMoniker(NULL, url, &url_mon); + ok(hres == S_OK, "%s: CreateURLMoniker failed: 0x%08lx\n", test->name, hres); + if(FAILED(hres)){ + IBindCtx_Release(bc); + return; + } } hres = CoCreateInstance(&CLSID_HTMLDocument, NULL, @@ -307,7 +321,7 @@ static void perform_test(const struct location_test* test) #endif ok(hres == S_OK, "%s: CoCreateInstance failed: 0x%08lx\n", test->name, hres); if(FAILED(hres)){ - IMoniker_Release(url_mon); + if(url_mon) IMoniker_Release(url_mon); IBindCtx_Release(bc); return; } @@ -317,38 +331,39 @@ static void perform_test(const struct location_test* test) IHTMLDocument6_Release(doc6); }else{ win_skip("%s: Could not get IHTMLDocument6, probably too old IE. Requires IE 8+\n", test->name); - IMoniker_Release(url_mon); + if(url_mon) IMoniker_Release(url_mon); IBindCtx_Release(bc); return; } - hres = IHTMLDocument2_QueryInterface(doc, &IID_IPersistMoniker, - (void**)&persist_mon); - ok(hres == S_OK, "%s: IHTMlDocument2_QueryInterface failed: 0x%08lx\n", test->name, hres); - if(FAILED(hres)){ - IHTMLDocument2_Release(doc); - IMoniker_Release(url_mon); - IBindCtx_Release(bc); - return; - } - - hres = IPersistMoniker_Load(persist_mon, FALSE, url_mon, bc, - STGM_SHARE_EXCLUSIVE | STGM_READWRITE); - ok(hres == S_OK, "%s: IPersistMoniker_Load failed: 0x%08lx\n", test->name, hres); - if(FAILED(hres)){ + if(url_mon) { + hres = IHTMLDocument2_QueryInterface(doc, &IID_IPersistMoniker, + (void**)&persist_mon); + ok(hres == S_OK, "%s: IHTMlDocument2_QueryInterface failed: 0x%08lx\n", test->name, hres); + if(FAILED(hres)){ + IHTMLDocument2_Release(doc); + IMoniker_Release(url_mon); + IBindCtx_Release(bc); + return; + } + + hres = IPersistMoniker_Load(persist_mon, FALSE, url_mon, bc, + STGM_SHARE_EXCLUSIVE | STGM_READWRITE); + ok(hres == S_OK, "%s: IPersistMoniker_Load failed: 0x%08lx\n", test->name, hres); IPersistMoniker_Release(persist_mon); - IHTMLDocument2_Release(doc); IMoniker_Release(url_mon); - IBindCtx_Release(bc); - return; + + if(FAILED(hres)){ + IHTMLDocument2_Release(doc); + IBindCtx_Release(bc); + return; + } } hres = IHTMLDocument2_get_location(doc, &location); ok(hres == S_OK, "%s: IHTMLDocument2_get_location failed: 0x%08lx\n", test->name, hres); if(FAILED(hres)){ - IPersistMoniker_Release(persist_mon); IHTMLDocument2_Release(doc); - IMoniker_Release(url_mon); IBindCtx_Release(bc); return; } @@ -363,9 +378,7 @@ static void perform_test(const struct location_test* test) test_hash(location, test); IHTMLLocation_Release(location); - IPersistMoniker_Release(persist_mon); IHTMLDocument2_Release(doc); - IMoniker_Release(url_mon); IBindCtx_Release(bc); }
1
0
0
0
Francois Gouget : d3d12/tests: Don't check the refcount after releasing the dxgi adapter.
by Alexandre Julliard
27 Jan '23
27 Jan '23
Module: wine Branch: master Commit: 9b38ae997f6a5920694a5c97ff601827336b0575 URL:
https://gitlab.winehq.org/wine/wine/-/commit/9b38ae997f6a5920694a5c97ff6018…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Fri Jan 13 16:07:49 2023 +0100 d3d12/tests: Don't check the refcount after releasing the dxgi adapter. The refcount is >= 1 on Windows 10 1709 and 1809 but 0 on more recent versions. So its value is not really important. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54299
--- dlls/d3d12/tests/d3d12.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/d3d12/tests/d3d12.c b/dlls/d3d12/tests/d3d12.c index 33c8ad8dfff..5d3f8a36a2d 100644 --- a/dlls/d3d12/tests/d3d12.c +++ b/dlls/d3d12/tests/d3d12.c @@ -884,8 +884,7 @@ static void test_create_device(void) ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount); hr = D3D12CreateDevice((IUnknown *)adapter, D3D_FEATURE_LEVEL_11_0, &IID_ID3D12Device, (void **)&device); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - refcount = IDXGIAdapter_Release(adapter); - ok(refcount >= 1, "Got unexpected refcount %lu.\n", refcount); + IDXGIAdapter_Release(adapter); adapter = NULL; luid = ID3D12Device_GetAdapterLuid(device);
1
0
0
0
Hans Leidekker : adsldp/tests: Avoid test failures when the server is down.
by Alexandre Julliard
26 Jan '23
26 Jan '23
Module: wine Branch: master Commit: aabdb15458aaee80b157175bc31cbaf3d57bf5e4 URL:
https://gitlab.winehq.org/wine/wine/-/commit/aabdb15458aaee80b157175bc31cba…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Jan 26 20:40:13 2023 +0100 adsldp/tests: Avoid test failures when the server is down. --- dlls/adsldp/tests/ldap.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/adsldp/tests/ldap.c b/dlls/adsldp/tests/ldap.c index 23cca695c3a..80b41df5ea7 100644 --- a/dlls/adsldp/tests/ldap.c +++ b/dlls/adsldp/tests/ldap.c @@ -190,6 +190,11 @@ static void test_ParseDisplayName(void) count = 0xdeadbeef; hr = MkParseDisplayName(bc, test[i].path, &count, &mk); + if (hr == HRESULT_FROM_WIN32(ERROR_DS_SERVER_DOWN)) + { + skip("server is down\n"); + break; + } todo_wine_if(i == 0 || i == 1 || i == 11 || i == 12) ok(hr == test[i].hr, "%d: got %#lx, expected %#lx\n", i, hr, test[i].hr); if (hr == S_OK)
1
0
0
0
Brendan Shanks : include/msvcrt: Add __WINE_(ALLOC_SIZE|DEALLOC) attributes to _recalloc.
by Alexandre Julliard
26 Jan '23
26 Jan '23
Module: wine Branch: master Commit: 21c4260792e8bbf7629c3269bbbcb30359c7152c URL:
https://gitlab.winehq.org/wine/wine/-/commit/21c4260792e8bbf7629c3269bbbcb3…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Wed Dec 14 10:37:33 2022 -0800 include/msvcrt: Add __WINE_(ALLOC_SIZE|DEALLOC) attributes to _recalloc. --- include/msvcrt/corecrt_malloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/msvcrt/corecrt_malloc.h b/include/msvcrt/corecrt_malloc.h index 4dfb9367a11..ab3f03fcb04 100644 --- a/include/msvcrt/corecrt_malloc.h +++ b/include/msvcrt/corecrt_malloc.h @@ -30,7 +30,7 @@ _ACRTIMP void* __cdecl calloc(size_t,size_t); _ACRTIMP void __cdecl free(void*); _ACRTIMP void* __cdecl malloc(size_t); _ACRTIMP void* __cdecl realloc(void*,size_t); -_ACRTIMP void* __cdecl _recalloc(void*,size_t,size_t); +_ACRTIMP void* __cdecl _recalloc(void*,size_t,size_t) __WINE_ALLOC_SIZE(2,3) __WINE_DEALLOC(free); _ACRTIMP void* __cdecl _expand(void*,size_t); _ACRTIMP size_t __cdecl _msize(void*);
1
0
0
0
Brendan Shanks : include/msvcrt: Add __WINE_(ALLOC_SIZE|DEALLOC|MALLOC) attributes to _aligned_malloc functions.
by Alexandre Julliard
26 Jan '23
26 Jan '23
Module: wine Branch: master Commit: d36cbc4a5741c3e41c9ce91f485c311375e0235a URL:
https://gitlab.winehq.org/wine/wine/-/commit/d36cbc4a5741c3e41c9ce91f485c31…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Mon Dec 5 11:40:00 2022 -0800 include/msvcrt: Add __WINE_(ALLOC_SIZE|DEALLOC|MALLOC) attributes to _aligned_malloc functions. --- include/msvcrt/corecrt.h | 6 ++++++ include/msvcrt/corecrt_malloc.h | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/include/msvcrt/corecrt.h b/include/msvcrt/corecrt.h index 9f403c7d10e..4dc2ca53208 100644 --- a/include/msvcrt/corecrt.h +++ b/include/msvcrt/corecrt.h @@ -342,6 +342,12 @@ typedef struct threadlocaleinfostruct { #define __WINE_CRT_SCANF_ATTR(fmt,args) #endif +#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) +#define __WINE_ALLOC_SIZE(...) __attribute__((__alloc_size__(__VA_ARGS__))) +#else +#define __WINE_ALLOC_SIZE(...) +#endif + #if defined(__GNUC__) && (__GNUC__ > 10) #define __WINE_DEALLOC(...) __attribute__((malloc (__VA_ARGS__))) #else diff --git a/include/msvcrt/corecrt_malloc.h b/include/msvcrt/corecrt_malloc.h index 4c0d35f7e08..4dfb9367a11 100644 --- a/include/msvcrt/corecrt_malloc.h +++ b/include/msvcrt/corecrt_malloc.h @@ -36,10 +36,10 @@ _ACRTIMP void* __cdecl _expand(void*,size_t); _ACRTIMP size_t __cdecl _msize(void*); _ACRTIMP void __cdecl _aligned_free(void*); -_ACRTIMP void* __cdecl _aligned_malloc(size_t,size_t); -_ACRTIMP void* __cdecl _aligned_offset_malloc(size_t,size_t,size_t); -_ACRTIMP void* __cdecl _aligned_realloc(void*,size_t,size_t); -_ACRTIMP void* __cdecl _aligned_offset_realloc(void*,size_t,size_t,size_t); +_ACRTIMP void* __cdecl _aligned_malloc(size_t,size_t) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(_aligned_free) __WINE_MALLOC; +_ACRTIMP void* __cdecl _aligned_offset_malloc(size_t,size_t,size_t) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(_aligned_free) __WINE_MALLOC; +_ACRTIMP void* __cdecl _aligned_realloc(void*,size_t,size_t) __WINE_ALLOC_SIZE(2) __WINE_DEALLOC(_aligned_free); +_ACRTIMP void* __cdecl _aligned_offset_realloc(void*,size_t,size_t,size_t) __WINE_ALLOC_SIZE(2) __WINE_DEALLOC(_aligned_free); #ifdef __cplusplus }
1
0
0
0
Brendan Shanks : include/msvcrt: Add __WINE_(DEALLOC|MALLOC) attributes to _strdup and _wcsdup.
by Alexandre Julliard
26 Jan '23
26 Jan '23
Module: wine Branch: master Commit: 3a688e81a6de77bbed1a21d9649339950847cd0a URL:
https://gitlab.winehq.org/wine/wine/-/commit/3a688e81a6de77bbed1a21d9649339…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Mon Dec 5 11:36:31 2022 -0800 include/msvcrt: Add __WINE_(DEALLOC|MALLOC) attributes to _strdup and _wcsdup. --- include/msvcrt/corecrt.h | 12 ++++++++++++ include/msvcrt/corecrt_wstring.h | 3 ++- include/msvcrt/string.h | 3 ++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/include/msvcrt/corecrt.h b/include/msvcrt/corecrt.h index aba9bc9422e..9f403c7d10e 100644 --- a/include/msvcrt/corecrt.h +++ b/include/msvcrt/corecrt.h @@ -342,4 +342,16 @@ typedef struct threadlocaleinfostruct { #define __WINE_CRT_SCANF_ATTR(fmt,args) #endif +#if defined(__GNUC__) && (__GNUC__ > 10) +#define __WINE_DEALLOC(...) __attribute__((malloc (__VA_ARGS__))) +#else +#define __WINE_DEALLOC(...) +#endif + +#if defined(__GNUC__) && (__GNUC__ > 2) +#define __WINE_MALLOC __attribute__((malloc)) +#else +#define __WINE_MALLOC +#endif + #endif /* __WINE_CORECRT_H */ diff --git a/include/msvcrt/corecrt_wstring.h b/include/msvcrt/corecrt_wstring.h index bcf9f947625..4d012800f65 100644 --- a/include/msvcrt/corecrt_wstring.h +++ b/include/msvcrt/corecrt_wstring.h @@ -7,6 +7,7 @@ #define _WSTRING_DEFINED #include <corecrt.h> +#include <corecrt_malloc.h> #ifdef __cplusplus extern "C" { @@ -29,7 +30,7 @@ static inline void* memccpy(void *s1, const void *s2, int c, size_t n) { return _ACRTIMP void* __cdecl memmove(void*,const void*,size_t); -_ACRTIMP wchar_t* __cdecl _wcsdup(const wchar_t*); +_ACRTIMP wchar_t* __cdecl _wcsdup(const wchar_t*) __WINE_DEALLOC(free) __WINE_MALLOC; _ACRTIMP int __cdecl _wcsicmp(const wchar_t*,const wchar_t*); _ACRTIMP int __cdecl _wcsicoll(const wchar_t*,const wchar_t*); _ACRTIMP int __cdecl _wcsicoll_l(const wchar_t*, const wchar_t*, _locale_t); diff --git a/include/msvcrt/string.h b/include/msvcrt/string.h index 5e3d51076c6..18d424b1e6a 100644 --- a/include/msvcrt/string.h +++ b/include/msvcrt/string.h @@ -8,6 +8,7 @@ #ifndef __WINE_STRING_H #define __WINE_STRING_H +#include <corecrt_malloc.h> #include <corecrt_wstring.h> #ifndef _NLSCMP_DEFINED @@ -22,7 +23,7 @@ extern "C" { _ACRTIMP size_t __cdecl __strncnt(const char*,size_t); _ACRTIMP int __cdecl _strcmpi(const char*,const char*); _ACRTIMP int __cdecl _strcoll_l(const char*, const char*, _locale_t); -_ACRTIMP char* __cdecl _strdup(const char*); +_ACRTIMP char* __cdecl _strdup(const char*) __WINE_DEALLOC(free) __WINE_MALLOC; _ACRTIMP char* __cdecl _strerror(const char*); _ACRTIMP errno_t __cdecl strerror_s(char*,size_t,int); _ACRTIMP int __cdecl _stricmp(const char*,const char*);
1
0
0
0
Hans Leidekker : winhttp/tests: Fix test failures with the UTF-8 code page.
by Alexandre Julliard
26 Jan '23
26 Jan '23
Module: wine Branch: master Commit: 8e942f9e413b1bfbe70a1269e7c02fa534fe61ff URL:
https://gitlab.winehq.org/wine/wine/-/commit/8e942f9e413b1bfbe70a1269e7c02f…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Jan 26 16:45:14 2023 +0100 winhttp/tests: Fix test failures with the UTF-8 code page. Wine-Bug:
https://bugs.winehq.org//show_bug.cgi?id=52936
--- dlls/winhttp/tests/url.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/winhttp/tests/url.c b/dlls/winhttp/tests/url.c index da51117e41e..fadf8b850ca 100644 --- a/dlls/winhttp/tests/url.c +++ b/dlls/winhttp/tests/url.c @@ -304,8 +304,8 @@ static void WinHttpCreateUrl_test( void ) SetLastError( 0xdeadbeef ); ret = WinHttpCreateUrl( &uc, ICU_ESCAPE, url, &len ); err = GetLastError(); - ok( !ret, "expected failure\n" ); - ok( err == ERROR_INVALID_PARAMETER, "got %lu\n", err ); + ok( !ret || GetACP() == CP_UTF8, "expected failure\n" ); + ok( err == ERROR_INVALID_PARAMETER || (!err && GetACP() == CP_UTF8), "got %lu\n", err ); /* extra info with Unicode characters, no ICU_ESCAPE */ memset( &uc, 0, sizeof(uc) ); @@ -344,8 +344,8 @@ static void WinHttpCreateUrl_test( void ) SetLastError( 0xdeadbeef ); ret = WinHttpCreateUrl( &uc, ICU_ESCAPE, url, &len ); err = GetLastError(); - ok( !ret, "expected failure\n" ); - ok( err == ERROR_INVALID_PARAMETER, "got %lu\n", err ); + ok( !ret || GetACP() == CP_UTF8, "expected failure\n" ); + ok( err == ERROR_INVALID_PARAMETER || (!err && GetACP() == CP_UTF8), "got %lu\n", err ); /* path with Unicode characters, no ICU_ESCAPE */ memset( &uc, 0, sizeof(uc) );
1
0
0
0
Santino Mazza : mshtml: Implement HTMLDocument_get_body for document fragments.
by Alexandre Julliard
26 Jan '23
26 Jan '23
Module: wine Branch: master Commit: 84f1b60e331cc77f94301c55c98592eddff5672c URL:
https://gitlab.winehq.org/wine/wine/-/commit/84f1b60e331cc77f94301c55c98592…
Author: Santino Mazza <smazza(a)codeweavers.com> Date: Mon Dec 19 19:54:57 2022 -0300 mshtml: Implement HTMLDocument_get_body for document fragments. --- dlls/mshtml/htmldoc.c | 22 ++++++++++++++++------ dlls/mshtml/tests/dom.c | 4 ++-- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 7b71ec1c1ae..414a39ae702 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -497,20 +497,30 @@ static HRESULT WINAPI HTMLDocument_get_all(IHTMLDocument2 *iface, IHTMLElementCo static HRESULT WINAPI HTMLDocument_get_body(IHTMLDocument2 *iface, IHTMLElement **p) { HTMLDocumentNode *This = impl_from_IHTMLDocument2(iface); - nsIDOMHTMLElement *nsbody = NULL; + nsIDOMElement *nsbody = NULL; HTMLElement *element; + nsresult nsres; HRESULT hres; TRACE("(%p)->(%p)\n", This, p); if(This->html_document) { - nsresult nsres; - - nsres = nsIDOMHTMLDocument_GetBody(This->html_document, &nsbody); + nsres = nsIDOMHTMLDocument_GetBody(This->html_document, (nsIDOMHTMLElement **)&nsbody); if(NS_FAILED(nsres)) { TRACE("Could not get body: %08lx\n", nsres); return E_UNEXPECTED; } + }else { + nsAString nsnode_name; + nsIDOMDocumentFragment *frag; + + nsres = nsIDOMNode_QueryInterface(This->node.nsnode, &IID_nsIDOMDocumentFragment, (void**)&frag); + if(!NS_FAILED(nsres)) { + nsAString_InitDepend(&nsnode_name, L"BODY"); + nsIDOMDocumentFragment_QuerySelector(frag, &nsnode_name, &nsbody); + nsAString_Finish(&nsnode_name); + nsIDOMDocumentFragment_Release(frag); + } } if(!nsbody) { @@ -518,8 +528,8 @@ static HRESULT WINAPI HTMLDocument_get_body(IHTMLDocument2 *iface, IHTMLElement return S_OK; } - hres = get_element((nsIDOMElement*)nsbody, &element); - nsIDOMHTMLElement_Release(nsbody); + hres = get_element(nsbody, &element); + nsIDOMElement_Release(nsbody); if(FAILED(hres)) return hres; diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 4e92c1c1447..dc236a27f1c 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -11081,9 +11081,9 @@ static void test_docfrag(IHTMLDocument2 *doc) hres = IHTMLDocument2_get_body(frag, &frag_body); ok(hres == S_OK, "get_body failed: %08lx\n", hres); - todo_wine ok(frag_body != NULL, "body == NULL\n"); + ok(frag_body != NULL, "body == NULL\n"); if (frag_body) { - todo_wine ok(!iface_cmp((IUnknown *) frag_body, (IUnknown *) main_body), "frag_body == main_body\n"); + ok(!iface_cmp((IUnknown *) frag_body, (IUnknown *) main_body), "frag_body == main_body\n"); IHTMLElement_Release(frag_body); } IHTMLElement_Release(main_body);
1
0
0
0
Santino Mazza : mshtml: Use This->node for HTMLDocument_get_all.
by Alexandre Julliard
26 Jan '23
26 Jan '23
Module: wine Branch: master Commit: 071f38b123c881b9356f1f17350a9be458b76e12 URL:
https://gitlab.winehq.org/wine/wine/-/commit/071f38b123c881b9356f1f17350a9b…
Author: Santino Mazza <smazza(a)codeweavers.com> Date: Mon Dec 19 10:39:07 2022 -0300 mshtml: Use This->node for HTMLDocument_get_all. --- dlls/mshtml/htmldoc.c | 30 ++---------------------------- dlls/mshtml/tests/dom.c | 8 ++++---- 2 files changed, 6 insertions(+), 32 deletions(-) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 90c4706abee..7b71ec1c1ae 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -487,37 +487,11 @@ static HRESULT WINAPI HTMLDocument_get_Script(IHTMLDocument2 *iface, IDispatch * static HRESULT WINAPI HTMLDocument_get_all(IHTMLDocument2 *iface, IHTMLElementCollection **p) { HTMLDocumentNode *This = impl_from_IHTMLDocument2(iface); - nsIDOMElement *nselem = NULL; - HTMLDOMNode *node; - nsresult nsres; - HRESULT hres; TRACE("(%p)->(%p)\n", This, p); + *p = create_all_collection(&This->node, FALSE); - if(!This->dom_document) { - WARN("NULL dom_document\n"); - return E_UNEXPECTED; - } - - nsres = nsIDOMDocument_GetDocumentElement(This->dom_document, &nselem); - if(NS_FAILED(nsres)) { - ERR("GetDocumentElement failed: %08lx\n", nsres); - return E_FAIL; - } - - if(!nselem) { - *p = NULL; - return S_OK; - } - - hres = get_node((nsIDOMNode*)nselem, TRUE, &node); - nsIDOMElement_Release(nselem); - if(FAILED(hres)) - return hres; - - *p = create_all_collection(node, TRUE); - node_release(node); - return hres; + return S_OK; } static HRESULT WINAPI HTMLDocument_get_body(IHTMLDocument2 *iface, IHTMLElement **p) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index e817438fa48..4e92c1c1447 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -11026,8 +11026,8 @@ static void test_docfrag(IHTMLDocument2 *doc) col = NULL; hres = IHTMLDocument2_get_all(frag, &col); - todo_wine ok(hres == S_OK, "get_all failed: %08lx\n", hres); - todo_wine ok(col != NULL, "got null elements collection\n"); + ok(hres == S_OK, "get_all failed: %08lx\n", hres); + ok(col != NULL, "got null elements collection\n"); if (col) { test_elem_collection((IUnknown *) col, empty_types, ARRAY_SIZE(empty_types)); IHTMLElementCollection_Release(col); @@ -11090,8 +11090,8 @@ static void test_docfrag(IHTMLDocument2 *doc) col = NULL; hres = IHTMLDocument2_get_all(frag, &col); - todo_wine ok(hres == S_OK, "get_all failed: %08lx\n", hres); - todo_wine ok(col != NULL, "got null elements collection\n"); + ok(hres == S_OK, "get_all failed: %08lx\n", hres); + ok(col != NULL, "got null elements collection\n"); if (col) { test_elem_collection((IUnknown *) col, frag_types, ARRAY_SIZE(frag_types)); IHTMLElementCollection_Release(col);
1
0
0
0
Santino Mazza : mshtml/tests: Test for get_all and get_body in document fragments.
by Alexandre Julliard
26 Jan '23
26 Jan '23
Module: wine Branch: master Commit: d8030d1543f4e3d43de6fc17052f7896b7e609f9 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d8030d1543f4e3d43de6fc17052f78…
Author: Santino Mazza <smazza(a)codeweavers.com> Date: Fri Dec 16 11:20:25 2022 -0300 mshtml/tests: Test for get_all and get_body in document fragments. --- dlls/mshtml/tests/dom.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 68 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index c9c52776fa9..e817438fa48 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -10987,7 +10987,7 @@ static IHTMLDocument2 *create_docfrag(IHTMLDocument2 *doc) static void test_docfrag(IHTMLDocument2 *doc) { IHTMLDocument2 *frag, *owner_doc, *doc_node; - IHTMLElement *div, *body, *br; + IHTMLElement *div, *main_body, *frag_body, *br,*html; IHTMLElementCollection *col; IHTMLLocation *location; HRESULT hres; @@ -11001,20 +11001,38 @@ static void test_docfrag(IHTMLDocument2 *doc) ET_BR }; + static const elem_type_t empty_types[] = {}; + + static const elem_type_t frag_types[] = { + ET_HTML, + ET_DIV, + ET_DIV, + ET_BODY + }; + frag = create_docfrag(doc); test_disp((IUnknown*)frag, &DIID_DispHTMLDocument, &CLSID_HTMLDocument, L"[object]"); - body = (void*)0xdeadbeef; - hres = IHTMLDocument2_get_body(frag, &body); + frag_body = (void*)0xdeadbeef; + hres = IHTMLDocument2_get_body(frag, &frag_body); ok(hres == S_OK, "get_body failed: %08lx\n", hres); - ok(!body, "body != NULL\n"); + ok(!frag_body, "body != NULL\n"); location = (void*)0xdeadbeef; hres = IHTMLDocument2_get_location(frag, &location); ok(hres == E_UNEXPECTED, "get_location failed: %08lx\n", hres); ok(location == (void*)0xdeadbeef, "location changed\n"); + col = NULL; + hres = IHTMLDocument2_get_all(frag, &col); + todo_wine ok(hres == S_OK, "get_all failed: %08lx\n", hres); + todo_wine ok(col != NULL, "got null elements collection\n"); + if (col) { + test_elem_collection((IUnknown *) col, empty_types, ARRAY_SIZE(empty_types)); + IHTMLElementCollection_Release(col); + } + br = test_create_elem(doc, L"BR"); test_elem_source_index(br, -1); test_node_append_child((IUnknown*)frag, (IUnknown*)br); @@ -11033,6 +11051,52 @@ static void test_docfrag(IHTMLDocument2 *doc) test_elem_collection((IUnknown*)col, all_types, ARRAY_SIZE(all_types)); IHTMLElementCollection_Release(col); + html = test_create_elem(doc, L"HTML"); + test_elem_source_index(html, -1); + test_node_append_child((IUnknown*)frag, (IUnknown*)html); + test_elem_source_index(html, 0); + + div = test_create_elem(doc, L"DIV"); + test_elem_source_index(div, -1); + test_node_append_child((IUnknown*)html, (IUnknown*)div); + test_elem_source_index(div, 1); + IHTMLElement_Release(div); + + div = test_create_elem(doc, L"DIV"); + test_elem_source_index(div, -1); + test_node_append_child((IUnknown*)html, (IUnknown*)div); + test_elem_source_index(div, 2); + + frag_body = test_create_elem(doc, L"BODY"); + test_elem_source_index(frag_body, -1); + test_node_append_child((IUnknown*)div, (IUnknown*)frag_body); + test_elem_source_index(frag_body, 3); + IHTMLElement_Release(frag_body); + IHTMLElement_Release(div); + IHTMLElement_Release(html); + + hres = IHTMLDocument2_get_body(doc, &main_body); + ok(hres == S_OK, "get_body failed: %08lx\n", hres); + ok(main_body != NULL, "body == NULL\n"); + + hres = IHTMLDocument2_get_body(frag, &frag_body); + ok(hres == S_OK, "get_body failed: %08lx\n", hres); + todo_wine ok(frag_body != NULL, "body == NULL\n"); + if (frag_body) { + todo_wine ok(!iface_cmp((IUnknown *) frag_body, (IUnknown *) main_body), "frag_body == main_body\n"); + IHTMLElement_Release(frag_body); + } + IHTMLElement_Release(main_body); + + col = NULL; + hres = IHTMLDocument2_get_all(frag, &col); + todo_wine ok(hres == S_OK, "get_all failed: %08lx\n", hres); + todo_wine ok(col != NULL, "got null elements collection\n"); + if (col) { + test_elem_collection((IUnknown *) col, frag_types, ARRAY_SIZE(frag_types)); + IHTMLElementCollection_Release(col); + } + div = test_create_elem(frag, L"div"); owner_doc = get_owner_doc((IUnknown*)div); doc_node = get_doc_node(doc);
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
47
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
Results per page:
10
25
50
100
200