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
November 2020
----- 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
851 discussions
Start a n
N
ew thread
Dmitry Kislyuk : vbscript: Parse empty CASE ELSE clause.
by Alexandre Julliard
10 Nov '20
10 Nov '20
Module: wine Branch: stable Commit: 70299c76d16da9dec74a1bbfb305e737344b5bea URL:
https://source.winehq.org/git/wine.git/?a=commit;h=70299c76d16da9dec74a1bbf…
Author: Dmitry Kislyuk <dimaki(a)rocketmail.com> Date: Thu Jun 25 00:50:46 2020 -0500 vbscript: Parse empty CASE ELSE clause. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=49439
Signed-off-by: Dmitry Kislyuk <dimaki(a)rocketmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 18e7e07a77a754c4b48c6c9bde225ad5c7295944) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/vbscript/parser.y | 2 +- dlls/vbscript/tests/lang.vbs | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y index df2c72da959..e5f436bf6db 100644 --- a/dlls/vbscript/parser.y +++ b/dlls/vbscript/parser.y @@ -300,7 +300,7 @@ Else_opt CaseClausules : /* empty */ { $$ = NULL; } - | tCASE tELSE StSep StatementsNl { $$ = new_case_clausule(ctx, NULL, $4, NULL); } + | tCASE tELSE StSep StatementsNl_opt { $$ = new_case_clausule(ctx, NULL, $4, NULL); } | tCASE ExpressionList StSep StatementsNl_opt CaseClausules { $$ = new_case_clausule(ctx, $2, $4, $5); } diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index fb9f96e4277..eeab0bc5787 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -673,6 +673,14 @@ select case 1 : end select Call ok(x, "wrong case") +select case 0 + case 1 + case else + 'empty else with comment test +end select + +select case 0 : case 1 : case else : end select + if false then Sub testsub x = true
1
0
0
0
Paul Gofman : winebuild: Correct hotpatching prologue in import thunks for x86_64.
by Alexandre Julliard
10 Nov '20
10 Nov '20
Module: wine Branch: stable Commit: 302350d888607d17f320cccd25f79cd8b6aa48e3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=302350d888607d17f320cccd…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri Jun 26 12:42:39 2020 +0300 winebuild: Correct hotpatching prologue in import thunks for x86_64. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48938
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 19aa67d1704a7060c81f345524660ae76f5a7696) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- tools/winebuild/spec32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index ecfe4c50113..7abeb08140a 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -576,7 +576,7 @@ void output_exports( DLLSPEC *spec ) else output( "\tjmp *__imp_%s\n", asm_name( get_link_name( odp ))); break; case CPU_x86_64: - output( "\t.byte 0x48\n" ); /* hotpatch prolog */ + output( "\t.byte 0x48,0x8d,0xa4,0x24,0x00,0x00,0x00,0x00\n" ); /* hotpatch prolog */ output( "\tjmp *__imp_%s(%%rip)\n", asm_name( get_link_name( odp ))); break; default:
1
0
0
0
Paul Gofman : ws2_32: Optimize interface_bind_check() by caching adapter addresses.
by Alexandre Julliard
10 Nov '20
10 Nov '20
Module: wine Branch: stable Commit: 897707777f5a13668928a98e10ccba42ec580c83 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=897707777f5a13668928a98e…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Wed Jun 10 21:22:51 2020 +0300 ws2_32: Optimize interface_bind_check() by caching adapter addresses. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48668
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 60c8c78015b12493eb3984feef29103724a758af) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/ws2_32/socket.c | 65 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 44 insertions(+), 21 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index fbfef0aad52..1ca750764a9 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -276,6 +276,17 @@ static CRITICAL_SECTION_DEBUG critsect_debug = }; static CRITICAL_SECTION csWSgetXXXbyYYY = { &critsect_debug, -1, 0, 0, 0, 0 }; +static in_addr_t *if_addr_cache; +static unsigned int if_addr_cache_size; +static CRITICAL_SECTION cs_if_addr_cache; +static CRITICAL_SECTION_DEBUG cs_if_addr_cache_debug = +{ + 0, 0, &cs_if_addr_cache, + { &cs_if_addr_cache_debug.ProcessLocksList, &cs_if_addr_cache_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": cs_if_addr_cache") } +}; +static CRITICAL_SECTION cs_if_addr_cache = { &cs_if_addr_cache_debug, -1, 0, 0, 0, 0 }; + union generic_unix_sockaddr { struct sockaddr addr; @@ -3346,6 +3357,33 @@ static BOOL interface_bind( SOCKET s, int fd, struct sockaddr *addr ) FIXME("Broadcast packets on interface-bound sockets are not currently supported on this platform, " "receiving broadcast packets will not work on socket %04lx.\n", s); #endif + if (ret) + { + EnterCriticalSection(&cs_if_addr_cache); + if (if_addr_cache_size <= adapter->Index) + { + unsigned int new_size; + in_addr_t *new; + + new_size = max(if_addr_cache_size * 2, adapter->Index + 1); + if (!(new = heap_realloc(if_addr_cache, sizeof(*if_addr_cache) * new_size))) + { + ERR("No memory.\n"); + ret = FALSE; + LeaveCriticalSection(&cs_if_addr_cache); + break; + } + memset(new + if_addr_cache_size, 0, sizeof(*if_addr_cache) + * (new_size - if_addr_cache_size)); + if_addr_cache = new; + if_addr_cache_size = new_size; + } + if (if_addr_cache[adapter->Index] && if_addr_cache[adapter->Index] != adapter_addr) + WARN("Adapter addr for iface index %u has changed.\n", adapter->Index); + + if_addr_cache[adapter->Index] = adapter_addr; + LeaveCriticalSection(&cs_if_addr_cache); + } break; } } @@ -3750,27 +3788,12 @@ static void interface_bind_check(int fd, struct sockaddr_in *addr) #endif if (!ret) { - PIP_ADAPTER_INFO adapters, adapter; - DWORD adap_size; - - if (GetAdaptersInfo(NULL, &adap_size) != ERROR_BUFFER_OVERFLOW) - return; - adapters = HeapAlloc(GetProcessHeap(), 0, adap_size); - if (adapters && GetAdaptersInfo(adapters, &adap_size) == NO_ERROR) - { - /* Search the IPv4 adapter list for the appropriate bound interface */ - for (adapter = adapters; adapter != NULL; adapter = adapter->Next) - { - in_addr_t adapter_addr; - if (adapter->Index != ifindex) continue; - - adapter_addr = inet_addr(adapter->IpAddressList.IpAddress.String); - addr->sin_addr.s_addr = adapter_addr; - TRACE("reporting interface address from adapter %d\n", ifindex); - break; - } - } - HeapFree(GetProcessHeap(), 0, adapters); + EnterCriticalSection(&cs_if_addr_cache); + if (ifindex < if_addr_cache_size) + addr->sin_addr.s_addr = if_addr_cache[ifindex]; + else + ERR("No cache entry for ifindex %u.\n", ifindex); + LeaveCriticalSection(&cs_if_addr_cache); } #endif }
1
0
0
0
Zebediah Figura : winecfg: Set the Current{Major, Minor}VersionNumber registry values.
by Alexandre Julliard
10 Nov '20
10 Nov '20
Module: wine Branch: stable Commit: cec56576f8b7d1aa11be5aef5647b9615a4ca7bc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cec56576f8b7d1aa11be5aef…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat Apr 18 12:50:29 2020 -0500 winecfg: Set the Current{Major, Minor}VersionNumber registry values. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48959
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 7458092ec329fede4f64835769e214f72ffb3efc) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- programs/winecfg/appdefaults.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/programs/winecfg/appdefaults.c b/programs/winecfg/appdefaults.c index 050b0e029d3..21b56efa441 100644 --- a/programs/winecfg/appdefaults.c +++ b/programs/winecfg/appdefaults.c @@ -416,6 +416,8 @@ static void set_winver(const struct win_version *version) set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CSDVersion", NULL); set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentVersion", NULL); + set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentMajorVersionNumber", NULL); + set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentMinorVersionNumber", NULL); set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentBuild", NULL); set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentBuildNumber", NULL); set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "ProductName", NULL); @@ -429,6 +431,8 @@ static void set_winver(const struct win_version *version) snprintf(Buffer, sizeof(Buffer), "%d.%d", version->dwMajorVersion, version->dwMinorVersion); set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentVersion", Buffer); + set_reg_key_dword(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentMajorVersionNumber", version->dwMajorVersion); + set_reg_key_dword(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentMinorVersionNumber", version->dwMinorVersion); set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CSDVersion", version->szCSDVersion); snprintf(Buffer, sizeof(Buffer), "%d", version->dwBuildNumber); set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentBuild", Buffer);
1
0
0
0
Nikolay Sivov : dwrite: Add partial implementation for IDWriteFontFace5::Equals().
by Alexandre Julliard
10 Nov '20
10 Nov '20
Module: wine Branch: stable Commit: 4b439db446be1ac03a46a0f4ec8d4be705ce1420 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4b439db446be1ac03a46a0f4…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Aug 21 15:39:27 2020 +0300 dwrite: Add partial implementation for IDWriteFontFace5::Equals(). Issue with missing method spotted by Brendan Shanks. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit ab94abb14f74fe863ae40dafc7a8301db22792fc) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/dwrite/font.c | 17 +++++++++++++++++ dlls/dwrite/tests/font.c | 11 ++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 9f3e005236e..9099ed42a5c 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -1471,6 +1471,22 @@ static HRESULT WINAPI dwritefontface5_GetFontResource(IDWriteFontFace5 *iface, I return IDWriteFactory7_CreateFontResource(fontface->factory, fontface->files[0], fontface->index, resource); } +static BOOL WINAPI dwritefontface5_Equals(IDWriteFontFace5 *iface, IDWriteFontFace *other) +{ + struct dwrite_fontface *fontface = impl_from_IDWriteFontFace5(iface), *other_face; + + TRACE("%p, %p.\n", iface, other); + + if (!(other_face = unsafe_impl_from_IDWriteFontFace(other))) + return FALSE; + + /* TODO: add variations support */ + + return fontface->index == other_face->index && + fontface->simulations == other_face->simulations && + is_same_fontfile(fontface->files[0], other_face->files[0]); +} + static const IDWriteFontFace5Vtbl dwritefontfacevtbl = { dwritefontface_QueryInterface, @@ -1530,6 +1546,7 @@ static const IDWriteFontFace5Vtbl dwritefontfacevtbl = dwritefontface5_GetFontAxisValues, dwritefontface5_HasVariations, dwritefontface5_GetFontResource, + dwritefontface5_Equals, }; static HRESULT get_fontface_from_font(struct dwrite_font *font, IDWriteFontFace5 **fontface) diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index b2892b8e854..23630a73bf6 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -1779,13 +1779,14 @@ static void test_CreateFontFace(void) IDWriteFontCollection *collection; DWRITE_FONT_FILE_TYPE file_type; DWRITE_FONT_FACE_TYPE face_type; + IDWriteFontFace5 *fontface5; IDWriteGdiInterop *interop; IDWriteFont *font, *font2; IDWriteFontFamily *family; IDWriteFactory *factory; IDWriteFontFile *file; + BOOL supported, ret; LOGFONTW logfont; - BOOL supported; UINT32 count; WCHAR *path; HRESULT hr; @@ -1870,6 +1871,14 @@ static void test_CreateFontFace(void) ok(hr == S_OK, "got 0x%08x\n", hr); ok(fontface == fontface2, "got %p, was %p\n", fontface2, fontface); + /* Trivial equality test */ + if (SUCCEEDED(IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace5, (void **)&fontface5))) + { + ret = IDWriteFontFace5_Equals(fontface5, fontface2); + ok(ret, "Unexpected result %d.\n", ret); + IDWriteFontFace5_Release(fontface5); + } + IDWriteFontFace_Release(fontface); IDWriteFontFace_Release(fontface2); IDWriteFont_Release(font2);
1
0
0
0
Nikolay Sivov : dwrite: Implement IDWriteFont::Equals().
by Alexandre Julliard
10 Nov '20
10 Nov '20
Module: wine Branch: stable Commit: 7e7fa4cae694ca3cad1206db6ac4c339adc4b0da URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7e7fa4cae694ca3cad1206db…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Jan 27 08:52:49 2020 +0300 dwrite: Implement IDWriteFont::Equals(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 4d3e0ba0a5ca7c3d59a5941965d19cbcecfeef89) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/dwrite/font.c | 63 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 99894276253..9f3e005236e 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -299,6 +299,8 @@ static inline struct dwrite_font *impl_from_IDWriteFont3(IDWriteFont3 *iface) return CONTAINING_RECORD(iface, struct dwrite_font, IDWriteFont3_iface); } +static struct dwrite_font *unsafe_impl_from_IDWriteFont(IDWriteFont *iface); + static inline struct dwrite_fontfile *impl_from_IDWriteFontFile(IDWriteFontFile *iface) { return CONTAINING_RECORD(iface, struct dwrite_fontfile, IDWriteFontFile_iface); @@ -472,6 +474,29 @@ void fontface_detach_from_cache(IDWriteFontFace5 *iface) fontface->cached = NULL; } +static BOOL is_same_fontfile(IDWriteFontFile *left, IDWriteFontFile *right) +{ + UINT32 left_key_size, right_key_size; + const void *left_key, *right_key; + HRESULT hr; + + if (left == right) + return TRUE; + + hr = IDWriteFontFile_GetReferenceKey(left, &left_key, &left_key_size); + if (FAILED(hr)) + return FALSE; + + hr = IDWriteFontFile_GetReferenceKey(right, &right_key, &right_key_size); + if (FAILED(hr)) + return FALSE; + + if (left_key_size != right_key_size) + return FALSE; + + return !memcmp(left_key, right_key, left_key_size); +} + static HRESULT WINAPI dwritefontface_QueryInterface(IDWriteFontFace5 *iface, REFIID riid, void **obj) { struct dwrite_fontface *fontface = impl_from_IDWriteFontFace5(iface); @@ -1821,11 +1846,18 @@ static HRESULT WINAPI dwritefont3_CreateFontFace(IDWriteFont3 *iface, IDWriteFon return get_fontface_from_font(font, (IDWriteFontFace5 **)fontface); } -static BOOL WINAPI dwritefont3_Equals(IDWriteFont3 *iface, IDWriteFont *font) +static BOOL WINAPI dwritefont3_Equals(IDWriteFont3 *iface, IDWriteFont *other) { - struct dwrite_font *This = impl_from_IDWriteFont3(iface); - FIXME("(%p)->(%p): stub\n", This, font); - return FALSE; + struct dwrite_font *font = impl_from_IDWriteFont3(iface), *other_font; + + TRACE("%p, %p.\n", iface, other); + + if (!(other_font = unsafe_impl_from_IDWriteFont(other))) + return FALSE; + + return font->data->face_index == other_font->data->face_index + && font->data->simulations == other_font->data->simulations + && is_same_fontfile(font->data->file, other_font->data->file); } static HRESULT WINAPI dwritefont3_GetFontFaceReference(IDWriteFont3 *iface, IDWriteFontFaceReference **reference) @@ -2691,29 +2723,6 @@ static HRESULT WINAPI dwritefontcollection_FindFamilyName(IDWriteFontCollection3 return S_OK; } -static BOOL is_same_fontfile(IDWriteFontFile *left, IDWriteFontFile *right) -{ - UINT32 left_key_size, right_key_size; - const void *left_key, *right_key; - HRESULT hr; - - if (left == right) - return TRUE; - - hr = IDWriteFontFile_GetReferenceKey(left, &left_key, &left_key_size); - if (FAILED(hr)) - return FALSE; - - hr = IDWriteFontFile_GetReferenceKey(right, &right_key, &right_key_size); - if (FAILED(hr)) - return FALSE; - - if (left_key_size != right_key_size) - return FALSE; - - return !memcmp(left_key, right_key, left_key_size); -} - static HRESULT WINAPI dwritefontcollection_GetFontFromFontFace(IDWriteFontCollection3 *iface, IDWriteFontFace *face, IDWriteFont **font) {
1
0
0
0
Jacek Caban : mshtml: Return NULL in IHTMLDocument2::get_cookie if InternetGetCookieExW failes.
by Alexandre Julliard
10 Nov '20
10 Nov '20
Module: wine Branch: stable Commit: c1c4ea12313da02f9a9b7b7f46817cdd97185a0d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c1c4ea12313da02f9a9b7b7f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jun 29 16:49:40 2020 +0200 mshtml: Return NULL in IHTMLDocument2::get_cookie if InternetGetCookieExW failes. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit cbb70ff04199fc125dc2d9af9e2ff866f9a07314) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/mshtml/htmldoc.c | 15 ++++----------- dlls/mshtml/tests/dom.c | 5 +++++ 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index a000884dc86..a121023ae3e 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -912,17 +912,10 @@ static HRESULT WINAPI HTMLDocument_get_cookie(IHTMLDocument2 *iface, BSTR *p) size = 0; bret = InternetGetCookieExW(This->window->url, NULL, NULL, &size, 0, NULL); - if(!bret) { - switch(GetLastError()) { - case ERROR_INSUFFICIENT_BUFFER: - break; - case ERROR_NO_MORE_ITEMS: - *p = NULL; - return S_OK; - default: - FIXME("InternetGetCookieExW failed: %u\n", GetLastError()); - return HRESULT_FROM_WIN32(GetLastError()); - } + if(!bret && GetLastError() != ERROR_INSUFFICIENT_BUFFER) { + WARN("InternetGetCookieExW failed: %u\n", GetLastError()); + *p = NULL; + return S_OK; } if(!size) { diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 13de60ff4d6..0819379299f 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -7297,6 +7297,11 @@ static void test_defaults(IHTMLDocument2 *doc) test_default_selection(doc); test_doc_title(doc, ""); test_dom_implementation(doc); + + str = (BSTR)0xdeadbeef; + hres = IHTMLDocument2_get_cookie(doc, &str); + ok(hres == S_OK, "get_cookie failed: %08x\n", hres); + ok(!str, "cookie = %s\n", wine_dbgstr_w(str)); } #define test_button_name(a,b) _test_button_name(__LINE__,a,b)
1
0
0
0
Brendan Shanks : winhttp: Treat a partial certificate chain as having an unknown/invalid CA.
by Alexandre Julliard
10 Nov '20
10 Nov '20
Module: wine Branch: stable Commit: f01f67c9bd2b7a04c63120ee35599ee1f29094d3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f01f67c9bd2b7a04c63120ee…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Tue Jun 16 13:48:22 2020 -0700 winhttp: Treat a partial certificate chain as having an unknown/invalid CA. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46726
Signed-off-by: Brendan Shanks <bshanks(a)codeweavers.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit aa80ef20504660fa55914d40fb4bb296eef94c59) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/winhttp/net.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c index c9da098f52d..f10aa255e2f 100644 --- a/dlls/winhttp/net.c +++ b/dlls/winhttp/net.c @@ -84,8 +84,10 @@ static DWORD netconn_verify_cert( PCCERT_CONTEXT cert, WCHAR *server, DWORD secu if (!(security_flags & SECURITY_FLAG_IGNORE_CERT_DATE_INVALID)) err = ERROR_WINHTTP_SECURE_CERT_DATE_INVALID; } - else if (chain->TrustStatus.dwErrorStatus & - CERT_TRUST_IS_UNTRUSTED_ROOT) + else if ((chain->TrustStatus.dwErrorStatus & + CERT_TRUST_IS_UNTRUSTED_ROOT) || + (chain->TrustStatus.dwErrorStatus & + CERT_TRUST_IS_PARTIAL_CHAIN)) { if (!(security_flags & SECURITY_FLAG_IGNORE_UNKNOWN_CA)) err = ERROR_WINHTTP_SECURE_INVALID_CA;
1
0
0
0
Aaro Altonen : msado15: Implement IConnectionPoint::Advise/Unadvise.
by Alexandre Julliard
10 Nov '20
10 Nov '20
Module: wine Branch: stable Commit: e6c8bd73b4a60b7eb61c9b6acd85a4b46f0135b4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e6c8bd73b4a60b7eb61c9b6a…
Author: Aaro Altonen <a.altonen(a)hotmail.com> Date: Wed Jun 17 15:36:15 2020 +0300 msado15: Implement IConnectionPoint::Advise/Unadvise. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=49388
Signed-off-by: Aaro Altonen <a.altonen(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit b852f777d979f83e9f94fba6484762245bfffbc1) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msado15/connection.c | 65 +++++++++++++++++++++++++++++++++++++++++--- dlls/msado15/tests/msado15.c | 5 +--- 2 files changed, 62 insertions(+), 8 deletions(-) diff --git a/dlls/msado15/connection.c b/dlls/msado15/connection.c index 9e8c05522ef..b90486b7cd9 100644 --- a/dlls/msado15/connection.c +++ b/dlls/msado15/connection.c @@ -40,6 +40,8 @@ struct connection_point IConnectionPoint IConnectionPoint_iface; struct connection *conn; const IID *riid; + IUnknown **sinks; + ULONG sinks_size; }; struct connection @@ -84,9 +86,16 @@ static ULONG WINAPI connection_Release( _Connection *iface ) { struct connection *connection = impl_from_Connection( iface ); LONG refs = InterlockedDecrement( &connection->refs ); + ULONG i; if (!refs) { TRACE( "destroying %p\n", connection ); + for (i = 0; i < connection->cp_connev.sinks_size; ++i) + { + if (connection->cp_connev.sinks[i]) + IUnknown_Release( connection->cp_connev.sinks[i] ); + } + heap_free( connection->cp_connev.sinks ); heap_free( connection->datasource ); heap_free( connection ); } @@ -530,15 +539,61 @@ static HRESULT WINAPI connpoint_Advise( IConnectionPoint *iface, IUnknown *unk_s DWORD *cookie ) { struct connection_point *connpoint = impl_from_IConnectionPoint( iface ); - FIXME( "%p, %p, %p\n", connpoint, unk_sink, cookie ); - return E_NOTIMPL; + IUnknown *sink, **tmp; + ULONG new_size; + HRESULT hr; + DWORD i; + + TRACE( "%p, %p, %p\n", iface, unk_sink, cookie ); + + if (!unk_sink || !cookie) return E_FAIL; + + if (FAILED(hr = IUnknown_QueryInterface( unk_sink, &IID_ConnectionEventsVt, (void**)&sink ))) + { + *cookie = 0; + return E_FAIL; + } + + if (connpoint->sinks) + { + for (i = 0; i < connpoint->sinks_size; ++i) + { + if (!connpoint->sinks[i]) + break; + } + + if (i == connpoint->sinks_size) + { + new_size = connpoint->sinks_size * 2; + if (!(tmp = heap_realloc_zero( connpoint->sinks, new_size * sizeof(*connpoint->sinks) ))) + return E_OUTOFMEMORY; + connpoint->sinks = tmp; + connpoint->sinks_size = new_size; + } + } + else + { + if (!(connpoint->sinks = heap_alloc_zero( sizeof(*connpoint->sinks) ))) return E_OUTOFMEMORY; + connpoint->sinks_size = 1; + i = 0; + } + + connpoint->sinks[i] = sink; + *cookie = i + 1; + return S_OK; } static HRESULT WINAPI connpoint_Unadvise( IConnectionPoint *iface, DWORD cookie ) { struct connection_point *connpoint = impl_from_IConnectionPoint( iface ); - FIXME( "%p, %d\n", connpoint, cookie ); - return E_NOTIMPL; + TRACE( "%p, %u\n", connpoint, cookie ); + + if (!cookie || cookie > connpoint->sinks_size || !connpoint->sinks || !connpoint->sinks[cookie - 1]) + return E_FAIL; + + IUnknown_Release( connpoint->sinks[cookie - 1] ); + connpoint->sinks[cookie - 1] = NULL; + return S_OK; } static HRESULT WINAPI connpoint_EnumConnections( IConnectionPoint *iface, @@ -577,6 +632,8 @@ HRESULT Connection_create( void **obj ) connection->cp_connev.conn = connection; connection->cp_connev.riid = &DIID_ConnectionEvents; connection->cp_connev.IConnectionPoint_iface.lpVtbl = &connpoint_vtbl; + connection->cp_connev.sinks = NULL; + connection->cp_connev.sinks_size = 0; *obj = &connection->Connection_iface; TRACE( "returning iface %p\n", *obj ); diff --git a/dlls/msado15/tests/msado15.c b/dlls/msado15/tests/msado15.c index 4f4ebde9d2f..27e917ce626 100644 --- a/dlls/msado15/tests/msado15.c +++ b/dlls/msado15/tests/msado15.c @@ -959,7 +959,6 @@ static void test_ConnectionPoint(void) hr = IConnectionPointContainer_FindConnectionPoint( pointcontainer, &DIID_ConnectionEvents, &point ); ok( hr == S_OK, "got %08x\n", hr ); -todo_wine { /* nothing advised yet */ hr = IConnectionPoint_Unadvise( point, 3 ); ok( hr == E_FAIL, "got %08x\n", hr ); @@ -973,10 +972,8 @@ todo_wine { cookie = 0xdeadbeef; hr = IConnectionPoint_Advise( point, NULL, &cookie ); ok( hr == E_FAIL, "got %08x\n", hr ); -} ok( cookie == 0xdeadbeef, "got %08x\n", cookie ); -todo_wine { /* unsupported sink */ cookie = 0xdeadbeef; hr = IConnectionPoint_Advise( point, (void*)&support_err_sink, &cookie ); @@ -1005,7 +1002,7 @@ todo_wine { ok( hr == S_OK, "got %08x\n", hr ); ok( cookie, "got %08x\n", cookie ); ok( conn_event.refs == 1, "got %d\n", conn_event.refs ); -} + refs = IConnectionPoint_Release( point ); ok( refs == 1, "got %u", refs );
1
0
0
0
Aaro Altonen : msado15/tests: Add tests for IConnectionPoint::Advise/Unadvise.
by Alexandre Julliard
10 Nov '20
10 Nov '20
Module: wine Branch: stable Commit: 22699257069c0bba95438ebb4a821686becef2a0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=22699257069c0bba95438ebb…
Author: Aaro Altonen <a.altonen(a)hotmail.com> Date: Wed Jun 17 15:36:14 2020 +0300 msado15/tests: Add tests for IConnectionPoint::Advise/Unadvise. Signed-off-by: Aaro Altonen <a.altonen(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit a0aa5b0f46a83e6582e574fcec0233fdd182dd87) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msado15/tests/msado15.c | 189 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) diff --git a/dlls/msado15/tests/msado15.c b/dlls/msado15/tests/msado15.c index 9cde03dd07a..4f4ebde9d2f 100644 --- a/dlls/msado15/tests/msado15.c +++ b/dlls/msado15/tests/msado15.c @@ -800,12 +800,152 @@ static void test_Command(void) _Command_Release( command ); } +struct conn_event { + ConnectionEventsVt conn_event_sink; + LONG refs; +}; + +static HRESULT WINAPI conneventvt_QueryInterface( ConnectionEventsVt *iface, REFIID riid, void **obj ) +{ + struct conn_event *conn_event = CONTAINING_RECORD( iface, struct conn_event, conn_event_sink ); + + if (IsEqualGUID( &IID_ConnectionEventsVt, riid )) + { + InterlockedIncrement( &conn_event->refs ); + *obj = iface; + return S_OK; + } + + ok( 0, "unexpected call\n" ); + return E_NOINTERFACE; +} + +static ULONG WINAPI conneventvt_AddRef( ConnectionEventsVt *iface ) +{ + struct conn_event *conn_event = CONTAINING_RECORD( iface, struct conn_event, conn_event_sink ); + return InterlockedIncrement( &conn_event->refs ); +} + +static ULONG WINAPI conneventvt_Release( ConnectionEventsVt *iface ) +{ + struct conn_event *conn_event = CONTAINING_RECORD( iface, struct conn_event, conn_event_sink ); + return InterlockedDecrement( &conn_event->refs ); +} + +static HRESULT WINAPI conneventvt_InfoMessage( ConnectionEventsVt *iface, Error *error, + EventStatusEnum *status, _Connection *Connection ) +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI conneventvt_BeginTransComplete( ConnectionEventsVt *iface, LONG TransactionLevel, + Error *error, EventStatusEnum *status, _Connection *connection ) +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI conneventvt_CommitTransComplete( ConnectionEventsVt *iface, Error *error, + EventStatusEnum *status, _Connection *connection ) +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI conneventvt_RollbackTransComplete( ConnectionEventsVt *iface, Error *error, + EventStatusEnum *status, _Connection *connection ) +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI conneventvt_WillExecute( ConnectionEventsVt *iface, BSTR *source, + CursorTypeEnum *cursor_type, LockTypeEnum *lock_type, LONG *options, EventStatusEnum *status, + _Command *command, _Recordset *record_set, _Connection *connection ) +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI conneventvt_ExecuteComplete( ConnectionEventsVt *iface, LONG records_affected, + Error *error, EventStatusEnum *status, _Command *command, _Recordset *record_set, + _Connection *connection ) +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI conneventvt_WillConnect( ConnectionEventsVt *iface, BSTR *string, BSTR *userid, + BSTR *password, LONG *options, EventStatusEnum *status, _Connection *connection ) +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI conneventvt_ConnectComplete( ConnectionEventsVt *iface, Error *error, + EventStatusEnum *status, _Connection *connection ) +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI conneventvt_Disconnect( ConnectionEventsVt *iface, EventStatusEnum *status, + _Connection *connection ) +{ + return E_NOTIMPL; +} + +static const ConnectionEventsVtVtbl conneventvt_vtbl = { + conneventvt_QueryInterface, + conneventvt_AddRef, + conneventvt_Release, + conneventvt_InfoMessage, + conneventvt_BeginTransComplete, + conneventvt_CommitTransComplete, + conneventvt_RollbackTransComplete, + conneventvt_WillExecute, + conneventvt_ExecuteComplete, + conneventvt_WillConnect, + conneventvt_ConnectComplete, + conneventvt_Disconnect +}; + +static HRESULT WINAPI supporterror_QueryInterface( ISupportErrorInfo *iface, REFIID riid, void **obj ) +{ + if (IsEqualGUID( &IID_ISupportErrorInfo, riid )) + { + *obj = iface; + return S_OK; + } + + return E_NOINTERFACE; +} + +static ULONG WINAPI supporterror_AddRef( ISupportErrorInfo *iface ) +{ + return 2; +} + +static ULONG WINAPI supporterror_Release( ISupportErrorInfo *iface ) +{ + return 1; +} + +static HRESULT WINAPI supporterror_InterfaceSupportsErrorInfo( ISupportErrorInfo *iface, REFIID riid ) +{ + return E_NOTIMPL; +} + +static const struct ISupportErrorInfoVtbl support_error_vtbl = +{ + supporterror_QueryInterface, + supporterror_AddRef, + supporterror_Release, + supporterror_InterfaceSupportsErrorInfo +}; + static void test_ConnectionPoint(void) { HRESULT hr; ULONG refs; + DWORD cookie; IConnectionPoint *point; IConnectionPointContainer *pointcontainer; + struct conn_event conn_event = { { &conneventvt_vtbl }, 0 }; + ISupportErrorInfo support_err_sink = { &support_error_vtbl }; hr = CoCreateInstance( &CLSID_Connection, NULL, CLSCTX_INPROC_SERVER, &IID_IConnectionPointContainer, (void**)&pointcontainer ); @@ -819,10 +959,59 @@ static void test_ConnectionPoint(void) hr = IConnectionPointContainer_FindConnectionPoint( pointcontainer, &DIID_ConnectionEvents, &point ); ok( hr == S_OK, "got %08x\n", hr ); +todo_wine { + /* nothing advised yet */ + hr = IConnectionPoint_Unadvise( point, 3 ); + ok( hr == E_FAIL, "got %08x\n", hr ); + + hr = IConnectionPoint_Advise( point, NULL, NULL ); + ok( hr == E_FAIL, "got %08x\n", hr ); + + hr = IConnectionPoint_Advise( point, (void*)&conn_event.conn_event_sink, NULL ); + ok( hr == E_FAIL, "got %08x\n", hr ); + + cookie = 0xdeadbeef; + hr = IConnectionPoint_Advise( point, NULL, &cookie ); + ok( hr == E_FAIL, "got %08x\n", hr ); +} + ok( cookie == 0xdeadbeef, "got %08x\n", cookie ); + +todo_wine { + /* unsupported sink */ + cookie = 0xdeadbeef; + hr = IConnectionPoint_Advise( point, (void*)&support_err_sink, &cookie ); + ok( hr == E_FAIL, "got %08x\n", hr ); + ok( !cookie, "got %08x\n", cookie ); + + cookie = 0; + hr = IConnectionPoint_Advise( point, (void*)&conn_event.conn_event_sink, &cookie ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( cookie, "got %08x\n", cookie ); + + /* invalid cookie */ + hr = IConnectionPoint_Unadvise( point, 0 ); + ok( hr == E_FAIL, "got %08x\n", hr ); + + /* wrong cookie */ + hr = IConnectionPoint_Unadvise( point, cookie + 1 ); + ok( hr == E_FAIL, "got %08x\n", hr ); + + hr = IConnectionPoint_Unadvise( point, cookie ); + ok( hr == S_OK, "got %08x\n", hr ); + + /* sinks are released when the connection is destroyed */ + cookie = 0; + hr = IConnectionPoint_Advise( point, (void*)&conn_event.conn_event_sink, &cookie ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( cookie, "got %08x\n", cookie ); + ok( conn_event.refs == 1, "got %d\n", conn_event.refs ); +} refs = IConnectionPoint_Release( point ); ok( refs == 1, "got %u", refs ); IConnectionPointContainer_Release( pointcontainer ); + + ok( !conn_event.refs, "got %d\n", conn_event.refs ); } START_TEST(msado15)
1
0
0
0
← Newer
1
...
61
62
63
64
65
66
67
...
86
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Results per page:
10
25
50
100
200