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
October 2008
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
1216 discussions
Start a n
N
ew thread
Paul Vriens : kernel32/tests: We need the return value.
by Alexandre Julliard
07 Oct '08
07 Oct '08
Module: wine Branch: master Commit: b16983c1bcbe3909d86d4ba6af3f3335c398258d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b16983c1bcbe3909d86d4ba6a…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Mon Oct 6 17:32:09 2008 +0200 kernel32/tests: We need the return value. --- dlls/kernel32/tests/locale.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index 5b2722e..ec2455a 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -2052,7 +2052,7 @@ static void test_EnumSystemLanguageGroupsA(void) /* No enumeration proc */ SetLastError(0); - pEnumSystemLanguageGroupsA(0, LGRPID_INSTALLED, 0); + ret = pEnumSystemLanguageGroupsA(0, LGRPID_INSTALLED, 0); if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) { win_skip("EnumSystemLanguageGroupsA is not implemented\n");
1
0
0
0
Henri Verbeet : d3d9: Use more reasonable texture dimensions.
by Alexandre Julliard
07 Oct '08
07 Oct '08
Module: wine Branch: master Commit: 5780b9b56d15ed46330ec532dd29e79cdf74b032 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5780b9b56d15ed46330ec532d…
Author: Henri Verbeet <hverbeet(a)gmail.com> Date: Mon Oct 6 19:09:53 2008 +0200 d3d9: Use more reasonable texture dimensions. caps.MaxTextureWidth / caps.MaxTextureHeight can potentially be very large, which could cause a driver to run out of memory. Arguably the driver shouldn't report such large limits, but there's no reason for us to create a texture larger than 1024x1024 either. --- dlls/d3d9/tests/visual.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 6538a60..3211076 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -2971,6 +2971,7 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) D3DLOCKED_RECT lr; D3DLOCKED_BOX lb; DWORD color; + UINT w, h; IDirect3DVertexDeclaration9 *decl, *decl2, *decl3; float identity[16] = {1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, @@ -3032,7 +3033,9 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); ok(hr == D3D_OK, "IDirect3DDevice9_GetDeviceCaps returned %08x\n", hr); - hr = IDirect3DDevice9_CreateTexture(device, caps.MaxTextureWidth, caps.MaxTextureHeight, 1, + w = min(1024, caps.MaxTextureWidth); + h = min(1024, caps.MaxTextureHeight); + hr = IDirect3DDevice9_CreateTexture(device, w, h, 1, 0, fmt, D3DPOOL_MANAGED, &texture, NULL); ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture returned %08x\n", hr); if(!texture) { @@ -3046,10 +3049,10 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) */ hr = IDirect3DTexture9_LockRect(texture, 0, &lr, NULL, 0); ok(hr == D3D_OK, "IDirect3DTexture9_LockRect returned %08x\n", hr); - for(y = 0; y < caps.MaxTextureHeight; y++) { - for(x = 0; x < caps.MaxTextureWidth; x++) { - double r_f = (double) y / (double) caps.MaxTextureHeight; - double g_f = (double) x / (double) caps.MaxTextureWidth; + for(y = 0; y < h; y++) { + for(x = 0; x < w; x++) { + double r_f = (double) y / (double) h; + double g_f = (double) x / (double) w; if(fmt == D3DFMT_A16B16G16R16) { unsigned short r, g; unsigned short *dst = (unsigned short *) (((char *) lr.pBits) + y * lr.Pitch + x * 8);
1
0
0
0
Henri Verbeet : secur32: Forward schannel InitializeSecurityContextA to InitializeSecurityContextW.
by Alexandre Julliard
07 Oct '08
07 Oct '08
Module: wine Branch: master Commit: 420cb678e157e5747942d6a2116bfe0c46da56bb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=420cb678e157e5747942d6a21…
Author: Henri Verbeet <hverbeet(a)gmail.com> Date: Mon Oct 6 19:08:47 2008 +0200 secur32: Forward schannel InitializeSecurityContextA to InitializeSecurityContextW. --- dlls/secur32/schannel.c | 41 ++++++++++++++++++++++++----------------- 1 files changed, 24 insertions(+), 17 deletions(-) diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c index 9d64799..402383f 100644 --- a/dlls/secur32/schannel.c +++ b/dlls/secur32/schannel.c @@ -28,6 +28,7 @@ #include "windef.h" #include "winbase.h" +#include "winnls.h" #include "sspi.h" #include "schannel.h" #include "secur32_priv.h" @@ -406,10 +407,10 @@ static SECURITY_STATUS SEC_ENTRY schan_FreeCredentialsHandle( } /*********************************************************************** - * InitializeSecurityContextA + * InitializeSecurityContextW */ -static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextA( - PCredHandle phCredential, PCtxtHandle phContext, SEC_CHAR *pszTargetName, +static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW( + PCredHandle phCredential, PCtxtHandle phContext, SEC_WCHAR *pszTargetName, ULONG fContextReq, ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput, ULONG *pfContextAttr, PTimeStamp ptsExpiry) @@ -417,9 +418,9 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextA( SECURITY_STATUS ret; TRACE("%p %p %s %d %d %d %p %d %p %p %p %p\n", phCredential, phContext, - debugstr_a(pszTargetName), fContextReq, Reserved1, TargetDataRep, pInput, + debugstr_w(pszTargetName), fContextReq, Reserved1, TargetDataRep, pInput, Reserved1, phNewContext, pOutput, pfContextAttr, ptsExpiry); - if(phCredential) + if (phCredential) { FIXME("stub\n"); ret = SEC_E_UNSUPPORTED_FUNCTION; @@ -432,28 +433,34 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextA( } /*********************************************************************** - * InitializeSecurityContextW + * InitializeSecurityContextA */ -static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW( - PCredHandle phCredential, PCtxtHandle phContext, SEC_WCHAR *pszTargetName, +static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextA( + PCredHandle phCredential, PCtxtHandle phContext, SEC_CHAR *pszTargetName, ULONG fContextReq, ULONG Reserved1, ULONG TargetDataRep, - PSecBufferDesc pInput,ULONG Reserved2, PCtxtHandle phNewContext, + PSecBufferDesc pInput, ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput, ULONG *pfContextAttr, PTimeStamp ptsExpiry) { SECURITY_STATUS ret; + SEC_WCHAR *target_name = NULL; TRACE("%p %p %s %d %d %d %p %d %p %p %p %p\n", phCredential, phContext, - debugstr_w(pszTargetName), fContextReq, Reserved1, TargetDataRep, pInput, + debugstr_a(pszTargetName), fContextReq, Reserved1, TargetDataRep, pInput, Reserved1, phNewContext, pOutput, pfContextAttr, ptsExpiry); - if (phCredential) - { - FIXME("stub\n"); - ret = SEC_E_UNSUPPORTED_FUNCTION; - } - else + + if (pszTargetName) { - ret = SEC_E_INVALID_HANDLE; + INT len = MultiByteToWideChar(CP_ACP, 0, pszTargetName, -1, NULL, 0); + target_name = HeapAlloc(GetProcessHeap(), 0, len * sizeof(*target_name)); + MultiByteToWideChar(CP_ACP, 0, pszTargetName, -1, target_name, len); } + + ret = schan_InitializeSecurityContextW(phCredential, phContext, target_name, + fContextReq, Reserved1, TargetDataRep, pInput, Reserved2, + phNewContext, pOutput, pfContextAttr, ptsExpiry); + + HeapFree(GetProcessHeap(), 0, target_name); + return ret; }
1
0
0
0
Henri Verbeet : secur32: Improve error handling for gnutls_certificate_allocate_credentials().
by Alexandre Julliard
07 Oct '08
07 Oct '08
Module: wine Branch: master Commit: 937488c298e4a5ec8d0c4221fd751cd9cb47ddf4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=937488c298e4a5ec8d0c4221f…
Author: Henri Verbeet <hverbeet(a)gmail.com> Date: Mon Oct 6 19:08:47 2008 +0200 secur32: Improve error handling for gnutls_certificate_allocate_credentials(). --- dlls/secur32/schannel.c | 22 +++++++++++++++------- 1 files changed, 15 insertions(+), 7 deletions(-) diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c index f501bab..9d64799 100644 --- a/dlls/secur32/schannel.c +++ b/dlls/secur32/schannel.c @@ -46,6 +46,7 @@ MAKE_FUNCPTR(gnutls_global_deinit); MAKE_FUNCPTR(gnutls_global_init); MAKE_FUNCPTR(gnutls_global_set_log_function); MAKE_FUNCPTR(gnutls_global_set_log_level); +MAKE_FUNCPTR(gnutls_perror); #undef MAKE_FUNCPTR #define SCHAN_INVALID_HANDLE ~0UL @@ -262,6 +263,7 @@ static SECURITY_STATUS schan_CheckCreds(const SCHANNEL_CRED *schanCred) static SECURITY_STATUS schan_AcquireClientCredentials(const SCHANNEL_CRED *schanCred, PCredHandle phCredential, PTimeStamp ptsExpiry) { + struct schan_credentials *creds; SECURITY_STATUS st = SEC_E_OK; TRACE("schanCred %p, phCredential %p, ptsExpiry %p\n", schanCred, phCredential, ptsExpiry); @@ -279,20 +281,21 @@ static SECURITY_STATUS schan_AcquireClientCredentials(const SCHANNEL_CRED *schan if (st == SEC_E_OK) { ULONG_PTR handle; - struct schan_credentials *creds; + int ret; creds = HeapAlloc(GetProcessHeap(), 0, sizeof(*creds)); if (!creds) return SEC_E_INSUFFICIENT_MEMORY; handle = schan_alloc_handle(creds, SCHAN_HANDLE_CRED); - if (handle == SCHAN_INVALID_HANDLE) - { - HeapFree(GetProcessHeap(), 0, creds); - return SEC_E_INTERNAL_ERROR; - } + if (handle == SCHAN_INVALID_HANDLE) goto fail; creds->credential_use = SECPKG_CRED_OUTBOUND; - pgnutls_certificate_allocate_credentials(&creds->credentials); + ret = pgnutls_certificate_allocate_credentials(&creds->credentials); + if (ret != GNUTLS_E_SUCCESS) + { + pgnutls_perror(ret); + goto fail; + } phCredential->dwLower = handle; phCredential->dwUpper = 0; @@ -305,6 +308,10 @@ static SECURITY_STATUS schan_AcquireClientCredentials(const SCHANNEL_CRED *schan } } return st; + +fail: + HeapFree(GetProcessHeap(), 0, creds); + return SEC_E_INTERNAL_ERROR; } static SECURITY_STATUS schan_AcquireServerCredentials(const SCHANNEL_CRED *schanCred, @@ -548,6 +555,7 @@ void SECUR32_initSchannelSP(void) LOAD_FUNCPTR(gnutls_global_init) LOAD_FUNCPTR(gnutls_global_set_log_function) LOAD_FUNCPTR(gnutls_global_set_log_level) + LOAD_FUNCPTR(gnutls_perror) #undef LOAD_FUNCPTR provider = SECUR32_addProvider(&schanTableA, &schanTableW, schannelDllName);
1
0
0
0
Henri Verbeet : secur32: Use ~0UL instead of -1 for invalid schannel handles.
by Alexandre Julliard
07 Oct '08
07 Oct '08
Module: wine Branch: master Commit: 79d88ffe567c774e9076f09e5cf7aa2b2f86e710 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=79d88ffe567c774e9076f09e5…
Author: Henri Verbeet <hverbeet(a)gmail.com> Date: Mon Oct 6 19:08:36 2008 +0200 secur32: Use ~0UL instead of -1 for invalid schannel handles. --- dlls/secur32/schannel.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c index 8207668..f501bab 100644 --- a/dlls/secur32/schannel.c +++ b/dlls/secur32/schannel.c @@ -48,6 +48,8 @@ MAKE_FUNCPTR(gnutls_global_set_log_function); MAKE_FUNCPTR(gnutls_global_set_log_level); #undef MAKE_FUNCPTR +#define SCHAN_INVALID_HANDLE ~0UL + enum schan_handle_type { SCHAN_HANDLE_CRED, @@ -82,7 +84,7 @@ static ULONG_PTR schan_alloc_handle(void *object, enum schan_handle_type type) if (handle->type != SCHAN_HANDLE_FREE) { ERR("Handle %d(%p) is in the free list, but has type %#x.\n", (handle-schan_handle_table), handle, handle->type); - return -1; + return SCHAN_INVALID_HANDLE; } schan_free_handles = (struct schan_handle *)handle->object; handle->object = object; @@ -98,7 +100,7 @@ static ULONG_PTR schan_alloc_handle(void *object, enum schan_handle_type type) if (!new_table) { ERR("Failed to grow the handle table\n"); - return -1; + return SCHAN_INVALID_HANDLE; } schan_handle_table = new_table; schan_handle_table_size = new_size; @@ -116,7 +118,7 @@ static void *schan_free_handle(ULONG_PTR handle_idx, enum schan_handle_type type struct schan_handle *handle; void *object; - if (handle_idx == -1) return NULL; + if (handle_idx == SCHAN_INVALID_HANDLE) return NULL; handle = &schan_handle_table[handle_idx]; if (handle->type != type) { @@ -283,7 +285,7 @@ static SECURITY_STATUS schan_AcquireClientCredentials(const SCHANNEL_CRED *schan if (!creds) return SEC_E_INSUFFICIENT_MEMORY; handle = schan_alloc_handle(creds, SCHAN_HANDLE_CRED); - if (handle == -1) + if (handle == SCHAN_INVALID_HANDLE) { HeapFree(GetProcessHeap(), 0, creds); return SEC_E_INTERNAL_ERROR; @@ -325,7 +327,7 @@ static SECURITY_STATUS schan_AcquireServerCredentials(const SCHANNEL_CRED *schan creds->credential_use = SECPKG_CRED_INBOUND; handle = schan_alloc_handle(creds, SCHAN_HANDLE_CRED); - if (handle == -1) + if (handle == SCHAN_INVALID_HANDLE) { HeapFree(GetProcessHeap(), 0, creds); return SEC_E_INTERNAL_ERROR;
1
0
0
0
Jacek Caban : mshtml: Added DispHTMLIFrame dispinterface declaration.
by Alexandre Julliard
07 Oct '08
07 Oct '08
Module: wine Branch: master Commit: abe7846a944932f05ef204e63a4a5b51b948e38a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=abe7846a944932f05ef204e63…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Oct 6 09:54:21 2008 -0500 mshtml: Added DispHTMLIFrame dispinterface declaration. --- include/mshtmdid.h | 12 + include/mshtml.idl | 957 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 969 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=abe7846a944932f05ef20…
1
0
0
0
Jacek Caban : mshtml: Fixed handing non-element nodes in IHTMLElementCollection.
by Alexandre Julliard
07 Oct '08
07 Oct '08
Module: wine Branch: master Commit: 7db77df36d41d0150a9cc53ef122919c25fc17a7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7db77df36d41d0150a9cc53ef…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Oct 6 09:53:35 2008 -0500 mshtml: Fixed handing non-element nodes in IHTMLElementCollection. --- dlls/mshtml/htmlelemcol.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/mshtml/htmlelemcol.c b/dlls/mshtml/htmlelemcol.c index cf11234..f0ca6d7 100644 --- a/dlls/mshtml/htmlelemcol.c +++ b/dlls/mshtml/htmlelemcol.c @@ -359,6 +359,9 @@ static HRESULT HTMLElementCollection_get_dispid(IUnknown *iface, BSTR name, DWOR WCHAR *ptr; DWORD idx=0; + if(!*name) + return DISP_E_UNKNOWNNAME; + for(ptr = name; *ptr && isdigitW(*ptr); ptr++) idx = idx*10 + (*ptr-'0'); @@ -484,8 +487,9 @@ IHTMLElementCollection *create_collection_from_nodelist(HTMLDocument *doc, IUnkn nsIDOMNodeList_GetLength(nslist, &length); - buf.len = buf.size = length; - if(buf.len) { + buf.len = 0; + buf.size = length; + if(length) { nsIDOMNode *nsnode; buf.buf = heap_alloc(buf.size*sizeof(HTMLElement*)); @@ -493,9 +497,11 @@ IHTMLElementCollection *create_collection_from_nodelist(HTMLDocument *doc, IUnkn for(i=0; i<length; i++) { nsIDOMNodeList_Item(nslist, i, &nsnode); if(is_elem_node(nsnode)) - buf.buf[i] = HTMLELEM_NODE_THIS(get_node(doc, nsnode, TRUE)); + buf.buf[buf.len++] = HTMLELEM_NODE_THIS(get_node(doc, nsnode, TRUE)); nsIDOMNode_Release(nsnode); } + + elem_vector_normalize(&buf); }else { buf.buf = NULL; }
1
0
0
0
Jacek Caban : mshtml: Added INVOKE_FUNC support to InvokeEx.
by Alexandre Julliard
07 Oct '08
07 Oct '08
Module: wine Branch: master Commit: a06ef64036e45356945d69a329d4e7ef420a6a25 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a06ef64036e45356945d69a32…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Oct 6 09:53:01 2008 -0500 mshtml: Added INVOKE_FUNC support to InvokeEx. --- dlls/mshtml/dispex.c | 41 ++++++++++- dlls/mshtml/tests/script.c | 180 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 217 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 891d42c..a55ef74 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -539,6 +539,45 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc var = &This->dynamic_data->props[idx].var; switch(wFlags) { + case INVOKE_FUNC: { + DISPID named_arg = DISPID_THIS; + DISPPARAMS dp = {NULL, &named_arg, 0, 1}; + IDispatchEx *dispex; + + if(V_VT(var) != VT_DISPATCH) { + FIXME("invoke vt %d\n", V_VT(var)); + return E_NOTIMPL; + } + + if(pdp->cNamedArgs) { + FIXME("named args not supported\n"); + return E_NOTIMPL; + } + + dp.rgvarg = heap_alloc((pdp->cArgs+1)*sizeof(VARIANTARG)); + if(!dp.rgvarg) + return E_OUTOFMEMORY; + + dp.cArgs = pdp->cArgs+1; + memcpy(dp.rgvarg+1, pdp->rgvarg, pdp->cArgs*sizeof(VARIANTARG)); + + V_VT(dp.rgvarg) = VT_DISPATCH; + V_DISPATCH(dp.rgvarg) = (IDispatch*)DISPATCHEX(This); + + hres = IDispatch_QueryInterface(V_DISPATCH(var), &IID_IDispatchEx, (void**)&dispex); + TRACE("%s call\n", debugstr_w(This->dynamic_data->props[idx].name)); + if(SUCCEEDED(hres)) { + hres = IDispatchEx_InvokeEx(dispex, DISPID_VALUE, lcid, wFlags, &dp, pvarRes, pei, pspCaller); + IDispatchEx_Release(dispex); + }else { + ULONG err = 0; + hres = IDispatch_Invoke(V_DISPATCH(var), DISPID_VALUE, &IID_NULL, lcid, wFlags, pdp, pvarRes, pei, &err); + } + TRACE("%s ret %08x\n", debugstr_w(This->dynamic_data->props[idx].name), hres); + + heap_free(dp.rgvarg); + return hres; + } case INVOKE_PROPERTYGET: return VariantCopy(pvarRes, var); case INVOKE_PROPERTYPUT: @@ -582,7 +621,7 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc hres = IUnknown_QueryInterface(This->outer, tid_ids[data->funcs[n].tid], (void**)&unk); if(FAILED(hres)) { - ERR("Could not get iface: %08x\n", hres); + ERR("Could not get iface %s: %08x\n", debugstr_guid(tid_ids[data->funcs[n].tid]), hres); return E_FAIL; } diff --git a/dlls/mshtml/tests/script.c b/dlls/mshtml/tests/script.c index 157dbc3..3944962 100644 --- a/dlls/mshtml/tests/script.c +++ b/dlls/mshtml/tests/script.c @@ -84,6 +84,7 @@ DEFINE_EXPECT(SetScriptState_DISCONNECTED); DEFINE_EXPECT(AddNamedItem); DEFINE_EXPECT(ParseScriptText); DEFINE_EXPECT(GetScriptDispatch); +DEFINE_EXPECT(funcDisp); #define TESTSCRIPT_CLSID "{178fc163-f585-4e24-9c13-4bb7faf80746}" @@ -170,6 +171,145 @@ static IPropertyNotifySinkVtbl PropertyNotifySinkVtbl = { static IPropertyNotifySink PropertyNotifySink = { &PropertyNotifySinkVtbl }; +static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv) +{ + *ppv = NULL; + + if(IsEqualGUID(riid, &IID_IUnknown) + || IsEqualGUID(riid, &IID_IDispatch) + || IsEqualGUID(riid, &IID_IDispatchEx)) + *ppv = iface; + else + return E_NOINTERFACE; + + return S_OK; +} + +static ULONG WINAPI DispatchEx_AddRef(IDispatchEx *iface) +{ + return 2; +} + +static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface) +{ + return 1; +} + +static HRESULT WINAPI DispatchEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pctinfo) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, + LCID lcid, ITypeInfo **ppTInfo) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_GetIDsOfNames(IDispatchEx *iface, REFIID riid, + LPOLESTR *rgszNames, UINT cNames, + LCID lcid, DISPID *rgDispId) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember, + REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, + VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex) +{ + ok(0, "unexpected call %s %x\n", debugstr_w(bstrName), grfdex); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID id) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *pbstrName) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI funcDisp_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, + VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) +{ + CHECK_EXPECT(funcDisp); + + ok(id == DISPID_VALUE, "id = %d\n", id); + ok(lcid == 0, "lcid = %x\n", lcid); + ok(wFlags == DISPATCH_METHOD, "wFlags = %x\n", wFlags); + ok(pdp != NULL, "pdp == NULL\n"); + ok(pdp->cArgs == 2, "pdp->cArgs = %d\n", pdp->cArgs); + ok(pdp->cNamedArgs == 1, "pdp->cNamedArgs = %d\n", pdp->cNamedArgs); + ok(pdp->rgdispidNamedArgs[0] == DISPID_THIS, "pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]); + ok(V_VT(pdp->rgvarg) == VT_DISPATCH, "V_VT(rgvarg) = %d\n", V_VT(pdp->rgvarg)); + ok(V_VT(pdp->rgvarg+1) == VT_BOOL, "V_VT(rgvarg[1]) = %d\n", V_VT(pdp->rgvarg)); + ok(V_BOOL(pdp->rgvarg+1) == VARIANT_TRUE, "V_BOOL(rgvarg[1]) = %x\n", V_BOOL(pdp->rgvarg)); + ok(pvarRes != NULL, "pvarRes == NULL\n"); + ok(pei != NULL, "pei == NULL"); + ok(!pspCaller, "pspCaller != NULL\n"); + + V_VT(pvarRes) = VT_I4; + V_I4(pvarRes) = 100; + return S_OK; +} + +static IDispatchExVtbl testObjVtbl = { + DispatchEx_QueryInterface, + DispatchEx_AddRef, + DispatchEx_Release, + DispatchEx_GetTypeInfoCount, + DispatchEx_GetTypeInfo, + DispatchEx_GetIDsOfNames, + DispatchEx_Invoke, + DispatchEx_GetDispID, + funcDisp_InvokeEx, + DispatchEx_DeleteMemberByName, + DispatchEx_DeleteMemberByDispID, + DispatchEx_GetMemberProperties, + DispatchEx_GetMemberName, + DispatchEx_GetNextDispID, + DispatchEx_GetNameSpaceParent +}; + +static IDispatchEx funcDisp = { &testObjVtbl }; + static IHTMLDocument2 *create_document(void) { IHTMLDocument2 *doc; @@ -453,7 +593,7 @@ static HRESULT WINAPI ActiveScriptParse_ParseScriptText(IActiveScriptParse *ifac { IDispatchEx *document; IUnknown *unk; - VARIANT var; + VARIANT var, arg; DISPPARAMS dp; EXCEPINFO ei; DISPID id, named_arg = DISPID_PROPERTYPUT; @@ -462,6 +602,7 @@ static HRESULT WINAPI ActiveScriptParse_ParseScriptText(IActiveScriptParse *ifac static const WCHAR documentW[] = {'d','o','c','u','m','e','n','t',0}; static const WCHAR testW[] = {'t','e','s','t',0}; + static const WCHAR funcW[] = {'f','u','n','c',0}; CHECK_EXPECT(ParseScriptText); @@ -525,13 +666,46 @@ static HRESULT WINAPI ActiveScriptParse_ParseScriptText(IActiveScriptParse *ifac ok(V_VT(&var) == VT_I4, "V_VT(var)=%d\n", V_VT(&var)); ok(V_I4(&var) == 100, "V_I4(&var) == NULL\n"); - IDispatchEx_Release(document); - unk = (void*)0xdeadbeef; hres = IDispatchEx_GetNameSpaceParent(window_dispex, &unk); ok(hres == S_OK, "GetNameSpaceParent failed: %08x\n", hres); ok(!unk, "unk=%p, expected NULL\n", unk); + id = 0; + tmp = SysAllocString(funcW); + hres = IDispatchEx_GetDispID(document, tmp, fdexNameCaseSensitive|fdexNameEnsure, &id); + SysFreeString(tmp); + ok(hres == S_OK, "GetDispID(func) failed: %08x\n", hres); + ok(id, "id == 0\n"); + + dp.cArgs = 1; + dp.rgvarg = &var; + dp.cNamedArgs = 0; + dp.rgdispidNamedArgs = NULL; + V_VT(&var) = VT_DISPATCH; + V_DISPATCH(&var) = (IDispatch*)&funcDisp; + + hres = IDispatchEx_InvokeEx(document, id, LOCALE_NEUTRAL, INVOKE_PROPERTYPUT, &dp, NULL, &ei, NULL); + ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + + VariantInit(&var); + memset(&dp, 0, sizeof(dp)); + memset(&ei, 0, sizeof(ei)); + V_VT(&arg) = VT_BOOL; + V_BOOL(&arg) = VARIANT_TRUE; + dp.cArgs = 1; + dp.rgvarg = &arg; + + SET_EXPECT(funcDisp); + hres = IDispatchEx_InvokeEx(document, id, LOCALE_NEUTRAL, INVOKE_FUNC, &dp, &var, &ei, NULL); + CHECK_CALLED(funcDisp); + + ok(hres == S_OK, "InvokeEx(INVOKE_FUNC) failed: %08x\n", hres); + ok(V_VT(&var) == VT_I4, "V_VT(var)=%d\n", V_VT(&var)); + ok(V_I4(&var) == 100, "V_I4(&var) == NULL\n"); + + IDispatchEx_Release(document); + return S_OK; }
1
0
0
0
Jacek Caban : mshtml: Added IHTMLStyle2::[get|put]_position.
by Alexandre Julliard
07 Oct '08
07 Oct '08
Module: wine Branch: master Commit: c8b3a164c664d0ca70bbb6322e008724346606ba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c8b3a164c664d0ca70bbb6322…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Oct 6 09:52:06 2008 -0500 mshtml: Added IHTMLStyle2::[get|put]_position. --- dlls/mshtml/htmlstyle.c | 14 ++++++++++---- dlls/mshtml/htmlstyle.h | 2 ++ dlls/mshtml/htmlstyle2.c | 12 ++++++++---- dlls/mshtml/tests/dom.c | 29 +++++++++++++++++++++++++++++ 4 files changed, 49 insertions(+), 8 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 8effb87..34ae105 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -69,6 +69,8 @@ static const WCHAR attrMarginRight[] = {'m','a','r','g','i','n','-','r','i','g','h','t',0}; static const WCHAR attrPaddingLeft[] = {'p','a','d','d','i','n','g','-','l','e','f','t',0}; +static const WCHAR attrPosition[] = + {'p','o','s','i','t','i','o','n',0}; static const WCHAR attrTextDecoration[] = {'t','e','x','t','-','d','e','c','o','r','a','t','i','o','n',0}; static const WCHAR attrTop[] = @@ -99,6 +101,7 @@ static const LPCWSTR style_strings[] = { attrMarginLeft, attrMarginRight, attrPaddingLeft, + attrPosition, attrTextDecoration, attrTop, attrVerticalAlign, @@ -172,7 +175,7 @@ static LPWSTR fix_url_value(LPCWSTR val) #define ATTR_FIX_PX 1 #define ATTR_FIX_URL 2 -static HRESULT set_style_attr(HTMLStyle *This, styleid_t sid, LPCWSTR value, DWORD flags) +HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, LPCWSTR value, DWORD flags) { nsAString str_name, str_value, str_empty; LPWSTR val = NULL; @@ -180,8 +183,6 @@ static HRESULT set_style_attr(HTMLStyle *This, styleid_t sid, LPCWSTR value, DWO static const PRUnichar wszEmpty[] = {0}; - TRACE("(%p)->(%s %s)\n", This, debugstr_w(style_strings[sid]), debugstr_w(value)); - if(flags & ATTR_FIX_PX) val = fix_px_value(value); if(flags & ATTR_FIX_URL) @@ -192,7 +193,7 @@ static HRESULT set_style_attr(HTMLStyle *This, styleid_t sid, LPCWSTR value, DWO nsAString_Init(&str_empty, wszEmpty); heap_free(val); - nsres = nsIDOMCSSStyleDeclaration_SetProperty(This->nsstyle, &str_name, &str_value, &str_empty); + nsres = nsIDOMCSSStyleDeclaration_SetProperty(nsstyle, &str_name, &str_value, &str_empty); if(NS_FAILED(nsres)) ERR("SetProperty failed: %08x\n", nsres); @@ -203,6 +204,11 @@ static HRESULT set_style_attr(HTMLStyle *This, styleid_t sid, LPCWSTR value, DWO return S_OK; } +static inline HRESULT set_style_attr(HTMLStyle *This, styleid_t sid, LPCWSTR value, DWORD flags) +{ + return set_nsstyle_attr(This->nsstyle, sid, value, flags); +} + static HRESULT get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, nsAString *value) { nsAString str_name; diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index 65ec99d..38bfdb1 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -49,6 +49,7 @@ typedef enum { STYLEID_MARGIN_LEFT, STYLEID_MARGIN_RIGHT, STYLEID_PADDING_LEFT, + STYLEID_POSITION, STYLEID_TEXT_DECORATION, STYLEID_TOP, STYLEID_VERTICAL_ALIGN, @@ -59,3 +60,4 @@ typedef enum { void HTMLStyle2_Init(HTMLStyle*); HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration*,styleid_t,BSTR*); +HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration*,styleid_t,LPCWSTR,DWORD); diff --git a/dlls/mshtml/htmlstyle2.c b/dlls/mshtml/htmlstyle2.c index f900f7d..a3ed601 100644 --- a/dlls/mshtml/htmlstyle2.c +++ b/dlls/mshtml/htmlstyle2.c @@ -166,15 +166,19 @@ static HRESULT WINAPI HTMLStyle2_removeExpression(IHTMLStyle2 *iface, BSTR propn static HRESULT WINAPI HTMLStyle2_put_position(IHTMLStyle2 *iface, BSTR v) { HTMLStyle *This = HTMLSTYLE2_THIS(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + return set_nsstyle_attr(This->nsstyle, STYLEID_POSITION, v, 0); } static HRESULT WINAPI HTMLStyle2_get_position(IHTMLStyle2 *iface, BSTR *p) { HTMLStyle *This = HTMLSTYLE2_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return get_nsstyle_attr(This->nsstyle, STYLEID_POSITION, p); } static HRESULT WINAPI HTMLStyle2_put_unicodeBidi(IHTMLStyle2 *iface, BSTR v) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 94a508e..ee7f3ea 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -1998,8 +1998,31 @@ static void test_current_style(IHTMLCurrentStyle *current_style) SysFreeString(str); } +static void test_style2(IHTMLStyle2 *style2) +{ + BSTR str; + HRESULT hres; + + str = (void*)0xdeadbeef; + hres = IHTMLStyle2_get_position(style2, &str); + ok(hres == S_OK, "get_position failed: %08x\n", hres); + ok(!str, "str != NULL\n"); + + str = a2bstr("absolute"); + hres = IHTMLStyle2_put_position(style2, str); + ok(hres == S_OK, "get_position failed: %08x\n", hres); + SysFreeString(str); + + str = NULL; + hres = IHTMLStyle2_get_position(style2, &str); + ok(hres == S_OK, "get_position failed: %08x\n", hres); + ok(!strcmp_wa(str, "absolute"), "get_position returned %s\n", dbgstr_w(str)); + SysFreeString(str); +} + static void test_default_style(IHTMLStyle *style) { + IHTMLStyle2 *style2; VARIANT_BOOL b; VARIANT v; BSTR str; @@ -2195,6 +2218,12 @@ static void test_default_style(IHTMLStyle *style) ok(!strcmp_wa(V_BSTR(&v), "middle"), "V_BSTR(v) = %s\n", dbgstr_w(V_BSTR(&v))); VariantClear(&v); + hres = IHTMLStyle_QueryInterface(style, &IID_IHTMLStyle2, (void**)&style2); + ok(hres == S_OK, "Could not get IHTMLStyle2 iface: %08x\n", hres); + if(SUCCEEDED(hres)) { + test_style2(style2); + IHTMLStyle2_Release(style2); + } } static void test_default_selection(IHTMLDocument2 *doc)
1
0
0
0
Jacek Caban : mshtml: Added IHTMLStyle::[get|put]_height implementation.
by Alexandre Julliard
07 Oct '08
07 Oct '08
Module: wine Branch: master Commit: 7a8043d399974cfeeba875bbeb08f301dd9f8633 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7a8043d399974cfeeba875bbe…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Oct 6 09:51:34 2008 -0500 mshtml: Added IHTMLStyle::[get|put]_height implementation. --- dlls/mshtml/htmlstyle.c | 31 +++++++++++++++++++++++++++---- dlls/mshtml/htmlstyle.h | 1 + dlls/mshtml/tests/dom.c | 20 ++++++++++++++++++++ 3 files changed, 48 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index dd5cbb2..8effb87 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -57,6 +57,8 @@ static const WCHAR attrFontStyle[] = {'f','o','n','t','-','s','t','y','l','e',0}; static const WCHAR attrFontWeight[] = {'f','o','n','t','-','w','e','i','g','h','t',0}; +static const WCHAR attrHeight[] = + {'h','e','i','g','h','t',0}; static const WCHAR attrLeft[] = {'l','e','f','t',0}; static const WCHAR attrMargin[] = @@ -91,6 +93,7 @@ static const LPCWSTR style_strings[] = { attrFontSize, attrFontStyle, attrFontWeight, + attrHeight, attrLeft, attrMargin, attrMarginLeft, @@ -1329,15 +1332,35 @@ static HRESULT WINAPI HTMLStyle_get_width(IHTMLStyle *iface, VARIANT *p) static HRESULT WINAPI HTMLStyle_put_height(IHTMLStyle *iface, VARIANT v) { HTMLStyle *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->(v%d)\n", This, V_VT(&v)); - return E_NOTIMPL; + + TRACE("(%p)->(%s)\n", This, debugstr_variant(&v)); + + switch(V_VT(&v)) { + case VT_BSTR: + return set_style_attr(This, STYLEID_HEIGHT, V_BSTR(&v), 0); + default: + FIXME("unimplemented vt %d\n", V_VT(&v)); + return E_NOTIMPL; + } + + return S_OK; } static HRESULT WINAPI HTMLStyle_get_height(IHTMLStyle *iface, VARIANT *p) { HTMLStyle *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + BSTR ret; + HRESULT hres; + + TRACE("(%p)->(%p)\n", This, p); + + hres = get_style_attr(This, STYLEID_HEIGHT, &ret); + if(FAILED(hres)) + return hres; + + V_VT(p) = VT_BSTR; + V_BSTR(p) = ret; + return S_OK; } static HRESULT WINAPI HTMLStyle_put_styleFloat(IHTMLStyle *iface, BSTR v) diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index 4a7e121..65ec99d 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -43,6 +43,7 @@ typedef enum { STYLEID_FONT_SIZE, STYLEID_FONT_STYLE, STYLEID_FONT_WEIGHT, + STYLEID_HEIGHT, STYLEID_LEFT, STYLEID_MARGIN, STYLEID_MARGIN_LEFT, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index bb4e7ef..94a508e 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2138,6 +2138,26 @@ static void test_default_style(IHTMLStyle *style) ok(!strcmp_wa(V_BSTR(&v), "3px"), "V_BSTR(v) = %s\n", dbgstr_w(V_BSTR(&v))); VariantClear(&v); + V_VT(&v) = VT_EMPTY; + hres = IHTMLStyle_get_height(style, &v); + ok(hres == S_OK, "get_height failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v)=%d\n", V_VT(&v)); + ok(!V_BSTR(&v), "V_BSTR(v) != NULL\n"); + VariantClear(&v); + + V_VT(&v) = VT_BSTR; + V_BSTR(&v) = a2bstr("64px"); + hres = IHTMLStyle_put_height(style, v); + ok(hres == S_OK, "put_height failed: %08x\n", hres); + VariantClear(&v); + + V_VT(&v) = VT_EMPTY; + hres = IHTMLStyle_get_height(style, &v); + ok(hres == S_OK, "get_height failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v)=%d\n", V_VT(&v)); + ok(!strcmp_wa(V_BSTR(&v), "64px"), "V_BSTR(v) = %s\n", dbgstr_w(V_BSTR(&v))); + VariantClear(&v); + str = (void*)0xdeadbeef; hres = IHTMLStyle_get_cursor(style, &str); ok(hres == S_OK, "get_cursor failed: %08x\n", hres);
1
0
0
0
← Newer
1
...
100
101
102
103
104
105
106
...
122
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Results per page:
10
25
50
100
200