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
June 2009
----- 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
5 participants
1115 discussions
Start a n
N
ew thread
Henri Verbeet : wined3d: Store compression information about compressed formats.
by Alexandre Julliard
10 Jun '09
10 Jun '09
Module: wine Branch: master Commit: 61fd875bb40cb039dee55eb3cefd5189bd7e1346 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=61fd875bb40cb039dee55eb3c…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Jun 10 09:44:04 2009 +0200 wined3d: Store compression information about compressed formats. --- dlls/wined3d/utils.c | 70 +++++++++++++++++++++++++++++++++------ dlls/wined3d/wined3d_private.h | 5 +++ 2 files changed, 64 insertions(+), 11 deletions(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 93c65fb..55c806b 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -134,6 +134,24 @@ static const struct StaticPixelFormatDesc formats[] = {WINED3DFMT_NVHS, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, TRUE }, }; +struct wined3d_format_compression_info +{ + WINED3DFORMAT format; + UINT block_width; + UINT block_height; + UINT block_byte_count; +}; + +static const struct wined3d_format_compression_info format_compression_info[] = +{ + {WINED3DFMT_DXT1, 4, 4, 8}, + {WINED3DFMT_DXT2, 4, 4, 16}, + {WINED3DFMT_DXT3, 4, 4, 16}, + {WINED3DFMT_DXT4, 4, 4, 16}, + {WINED3DFMT_DXT5, 4, 4, 16}, + {WINED3DFMT_ATI2N, 4, 4, 16}, +}; + struct wined3d_format_vertex_info { WINED3DFORMAT format; @@ -511,6 +529,32 @@ static BOOL init_format_base_info(WineD3D_GL_Info *gl_info) return TRUE; } +static BOOL init_format_compression_info(WineD3D_GL_Info *gl_info) +{ + unsigned int i; + + for (i = 0; i < (sizeof(format_compression_info) / sizeof(*format_compression_info)); ++i) + { + struct GlPixelFormatDesc *format_desc; + int fmt_idx = getFmtIdx(format_compression_info[i].format); + + if (fmt_idx == -1) + { + ERR("Format %s (%#x) not found.\n", + debug_d3dformat(format_compression_info[i].format), format_compression_info[i].format); + return FALSE; + } + + format_desc = &gl_info->gl_formats[fmt_idx]; + format_desc->block_width = format_compression_info[i].block_width; + format_desc->block_height = format_compression_info[i].block_height; + format_desc->block_byte_count = format_compression_info[i].block_byte_count; + format_desc->Flags |= WINED3DFMT_FLAG_COMPRESSED; + } + + return TRUE; +} + #define GLINFO_LOCATION (*gl_info) static BOOL check_fbo_compat(const WineD3D_GL_Info *gl_info, GLint internal_format, GLenum format, GLenum type) @@ -772,29 +816,33 @@ static BOOL init_format_vertex_info(WineD3D_GL_Info *gl_info) BOOL initPixelFormatsNoGL(WineD3D_GL_Info *gl_info) { - return init_format_base_info(gl_info); -} - -BOOL initPixelFormats(WineD3D_GL_Info *gl_info) -{ if (!init_format_base_info(gl_info)) return FALSE; - if (!init_format_texture_info(gl_info)) + if (!init_format_compression_info(gl_info)) { HeapFree(GetProcessHeap(), 0, gl_info->gl_formats); return FALSE; } - if (!init_format_vertex_info(gl_info)) - { - HeapFree(GetProcessHeap(), 0, gl_info->gl_formats); - return FALSE; - } + return TRUE; +} + +BOOL initPixelFormats(WineD3D_GL_Info *gl_info) +{ + if (!init_format_base_info(gl_info)) return FALSE; + + if (!init_format_compression_info(gl_info)) goto fail; + if (!init_format_texture_info(gl_info)) goto fail; + if (!init_format_vertex_info(gl_info)) goto fail; apply_format_fixups(gl_info); init_format_fbo_compat_info(gl_info); return TRUE; + +fail: + HeapFree(GetProcessHeap(), 0, gl_info->gl_formats); + return FALSE; } #undef GLINFO_LOCATION diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index adf6235..9cb3b76 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2750,6 +2750,7 @@ extern WINED3DFORMAT pixelformat_for_depth(DWORD depth); #define WINED3DFMT_FLAG_RENDERTARGET 0x10 #define WINED3DFMT_FLAG_FOURCC 0x20 #define WINED3DFMT_FLAG_FBO_ATTACHABLE 0x40 +#define WINED3DFMT_FLAG_COMPRESSED 0x80 struct GlPixelFormatDesc { @@ -2762,6 +2763,10 @@ struct GlPixelFormatDesc WORD depth_size; WORD stencil_size; + UINT block_width; + UINT block_height; + UINT block_byte_count; + enum wined3d_ffp_emit_idx emit_idx; GLint component_count; GLenum gl_vtx_type;
1
0
0
0
Henri Verbeet : wined3d: Round rows up to whole blocks for compressed surface blits in BltFast().
by Alexandre Julliard
10 Jun '09
10 Jun '09
Module: wine Branch: master Commit: 9d71a5f1e09420bc91d1e5d167f3e5bc0fa97d3b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9d71a5f1e09420bc91d1e5d16…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Jun 10 09:44:04 2009 +0200 wined3d: Round rows up to whole blocks for compressed surface blits in BltFast(). --- dlls/wined3d/surface_base.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/surface_base.c b/dlls/wined3d/surface_base.c index d487f80..50faf9a 100644 --- a/dlls/wined3d/surface_base.c +++ b/dlls/wined3d/surface_base.c @@ -1656,6 +1656,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dst UINT block_width; UINT block_height; UINT block_byte_size; + UINT row_block_count; TRACE("Fourcc -> Fourcc copy\n"); if (trans) @@ -1692,9 +1693,10 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dst block_byte_size = This->resource.format_desc->byte_count; } + row_block_count = (w + block_width - 1) / block_width; for (y = 0; y < h; y += block_height) { - memcpy(dbuf, sbuf, (w / block_width) * block_byte_size); + memcpy(dbuf, sbuf, row_block_count * block_byte_size); dbuf += dlock.Pitch; sbuf += slock.Pitch; }
1
0
0
0
Henri Verbeet : wined3d: Check the correct extensions in d3dfmt_get_conv().
by Alexandre Julliard
10 Jun '09
10 Jun '09
Module: wine Branch: master Commit: a25e63c62d3232563d6537149d40edf413ec10cb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a25e63c62d3232563d6537149…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Jun 10 09:44:04 2009 +0200 wined3d: Check the correct extensions in d3dfmt_get_conv(). According to Stefan these are either typos or leftovers from using GL_HILO8_NV. --- dlls/wined3d/surface.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 11e467b..a20ecd2 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1725,7 +1725,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_ break; case WINED3DFMT_R8G8_SNORM: - if(GL_SUPPORT(NV_TEXTURE_SHADER3)) break; + if (GL_SUPPORT(NV_TEXTURE_SHADER)) break; *convert = CONVERT_V8U8; *format = GL_BGR; *type = GL_UNSIGNED_BYTE; @@ -1762,7 +1762,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_ break; case WINED3DFMT_R8G8B8A8_SNORM: - if(GL_SUPPORT(NV_TEXTURE_SHADER3)) break; + if (GL_SUPPORT(NV_TEXTURE_SHADER)) break; *convert = CONVERT_Q8W8V8U8; *format = GL_BGRA; *type = GL_UNSIGNED_BYTE; @@ -1770,7 +1770,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_ break; case WINED3DFMT_R16G16_SNORM: - if(GL_SUPPORT(NV_TEXTURE_SHADER3)) break; + if (GL_SUPPORT(NV_TEXTURE_SHADER)) break; *convert = CONVERT_V16U16; *format = GL_BGR; *type = GL_UNSIGNED_SHORT;
1
0
0
0
Henri Verbeet : wined3d: Set explicitly sized internal formats for color key conversion in d3dfmt_get_conv ().
by Alexandre Julliard
10 Jun '09
10 Jun '09
Module: wine Branch: master Commit: 5ac8a7b054e75912c9ca1e99d3de242e11ebfe51 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5ac8a7b054e75912c9ca1e99d…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Jun 10 09:44:04 2009 +0200 wined3d: Set explicitly sized internal formats for color key conversion in d3dfmt_get_conv(). --- dlls/wined3d/surface.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 81c93e2..11e467b 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1691,7 +1691,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_ if (colorkey_active) { *convert = CONVERT_CK_565; *format = GL_RGBA; - *internal = GL_RGBA; + *internal = GL_RGB5_A1; *type = GL_UNSIGNED_SHORT_5_5_5_1; } break; @@ -1700,7 +1700,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_ if (colorkey_active) { *convert = CONVERT_CK_5551; *format = GL_BGRA; - *internal = GL_RGBA; + *internal = GL_RGB5_A1; *type = GL_UNSIGNED_SHORT_1_5_5_5_REV; } break; @@ -1709,7 +1709,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_ if (colorkey_active) { *convert = CONVERT_CK_RGB24; *format = GL_RGBA; - *internal = GL_RGBA; + *internal = GL_RGBA8; *type = GL_UNSIGNED_INT_8_8_8_8; *target_bpp = 4; } @@ -1719,7 +1719,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_ if (colorkey_active) { *convert = CONVERT_RGB32_888; *format = GL_RGBA; - *internal = GL_RGBA; + *internal = GL_RGBA8; *type = GL_UNSIGNED_INT_8_8_8_8; } break;
1
0
0
0
Piotr Caban : jscript: Added Date_getHours and Date_getUTCHours implementation.
by Alexandre Julliard
10 Jun '09
10 Jun '09
Module: wine Branch: master Commit: cfb7617688c1b255e3aeaa3caaad67dee4dd8365 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cfb7617688c1b255e3aeaa3ca…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Tue Jun 9 15:39:18 2009 +0200 jscript: Added Date_getHours and Date_getUTCHours implementation. --- dlls/jscript/date.c | 42 ++++++++++++++++++++++++++++++++++++++---- dlls/jscript/tests/api.js | 6 +++++- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/dlls/jscript/date.c b/dlls/jscript/date.c index 8056cc2..1dd9b96 100644 --- a/dlls/jscript/date.c +++ b/dlls/jscript/date.c @@ -85,6 +85,7 @@ static const WCHAR setUTCFullYearW[] = {'s','e','t','U','T','C','F','u','l','l', /*ECMA-262 3th Edition 15.9.1.2 */ #define MS_PER_DAY 86400000 +#define MS_PER_HOUR 3600000 #define MS_PER_MINUTE 60000 /* ECMA-262 3th Edition 15.9.1.2 */ @@ -215,6 +216,15 @@ static inline DOUBLE week_day(DOUBLE time) return (int)(day(time)+4) % 7; } +/* ECMA-262 3th Edition 15.9.1.10 */ +static inline DOUBLE hour_from_time(DOUBLE time) +{ + if(isnan(time)) + return ret_nan(); + + return (int)floor(time/MS_PER_HOUR) % 24; +} + /* ECMA-262 3rd Edition 15.9.1.14 */ static inline DOUBLE time_clip(DOUBLE time) { @@ -472,18 +482,42 @@ static HRESULT Date_getUTCDay(DispatchEx *dispex, LCID lcid, WORD flags, DISPPAR return S_OK; } +/* ECMA-262 3th Edition 15.9.1.10 */ static HRESULT Date_getHours(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) { - FIXME("\n"); - return E_NOTIMPL; + TRACE("\n"); + + if(!is_class(dispex, JSCLASS_DATE)) { + FIXME("throw TypeError\n"); + return E_FAIL; + } + + if(retv) { + DateInstance *date = (DateInstance*)dispex; + DOUBLE time = date->time - date->bias*MS_PER_MINUTE; + + num_set_val(retv, hour_from_time(time)); + } + return S_OK; } +/* ECMA-262 3th Edition 15.9.1.10 */ static HRESULT Date_getUTCHours(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) { - FIXME("\n"); - return E_NOTIMPL; + TRACE("\n"); + + if(!is_class(dispex, JSCLASS_DATE)) { + FIXME("throw TypeError\n"); + return E_FAIL; + } + + if(retv) { + DateInstance *date = (DateInstance*)dispex; + num_set_val(retv, hour_from_time(date->time)); + } + return S_OK; } static HRESULT Date_getMinutes(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index 2238a94..ceb314f 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -950,22 +950,26 @@ ok(date.getUTCFullYear() === 1970, "date.getUTCFullYear() = " + date.getUTCFullY ok(date.getUTCMonth() === 0, "date.getUTCMonth() = " + date.getUTCMonth()); ok(date.getUTCDate() === 1, "date.getUTCDate() = " + date.getUTCDate()); ok(date.getUTCDay() === 4, "date.getUTCDay() = " + date.getUTCDay()); +ok(date.getUTCHours() === 0, "date.getUTCHours() = " + date.getUTCHours()); date.setTime(60*24*60*60*1000); ok(date.getUTCFullYear() === 1970, "date.getUTCFullYear() = " + date.getUTCFullYear()); ok(date.getUTCMonth() === 2, "date.getUTCMonth() = " + date.getUTCMonth()); ok(date.getUTCDate() === 2, "date.getUTCDate() = " + date.getUTCDate()); ok(date.getUTCDay() === 1, "date.getUTCDay() = " + date.getUTCDay()); -date.setTime(59*24*60*60*1000 + 4*365*24*60*60*1000); +ok(date.getUTCHours() === 0, "date.getUTCHours() = " + date.getUTCHours()); +date.setTime(59*24*60*60*1000 + 4*365*24*60*60*1000 + 1000*60*60); ok(date.getUTCFullYear() === 1974, "date.getUTCFullYear() = " + date.getUTCFullYear()); ok(date.getUTCMonth() === 1, "date.getUTCMonth() = " + date.getUTCMonth()); ok(date.getUTCMonth(123) === 1, "date.getUTCMonth() = " + date.getUTCMonth()); ok(date.getUTCDate() === 28, "date.getUTCDate() = " + date.getUTCDate()); ok(date.getUTCDay() === 4, "date.getUTCDay() = " + date.getUTCDay()); +ok(date.getUTCHours() === 1, "date.getUTCHours() = " + date.getUTCHours()); date.setTime(Infinity); ok(isNaN(date.getUTCFullYear()), "date.getUTCFullYear() is not NaN"); ok(isNaN(date.getUTCMonth()), "date.getUTCMonth() is not NaN"); ok(isNaN(date.getUTCDate()), "date.getUTCDate() is not NaN"); ok(isNaN(date.getUTCDay()), "date.getUTCDay() is not NaN"); +ok(isNaN(date.getUTCHours()), "date.getUTCHours() is not NaN"); ok(typeof(Math.PI) === "number", "typeof(Math.PI) = " + typeof(Math.PI)); ok(Math.floor(Math.PI*100) === 314, "Math.PI = " + Math.PI);
1
0
0
0
Piotr Caban : jscript: Added Date_getDay and Date_getUTCDay implementation.
by Alexandre Julliard
10 Jun '09
10 Jun '09
Module: wine Branch: master Commit: 28e033e359ce5a509bf148c45b7db2c8b85e9120 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=28e033e359ce5a509bf148c45…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Tue Jun 9 14:05:23 2009 +0200 jscript: Added Date_getDay and Date_getUTCDay implementation. --- dlls/jscript/date.c | 41 +++++++++++++++++++++++++++++++++++++---- dlls/jscript/tests/api.js | 4 ++++ 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/dlls/jscript/date.c b/dlls/jscript/date.c index 84d4170..8056cc2 100644 --- a/dlls/jscript/date.c +++ b/dlls/jscript/date.c @@ -206,6 +206,15 @@ static inline DOUBLE date_from_time(DOUBLE time) return dwy-333-ily; } +/* ECMA-262 3th Edition 15.9.1.6 */ +static inline DOUBLE week_day(DOUBLE time) +{ + if(isnan(time)) + return ret_nan(); + + return (int)(day(time)+4) % 7; +} + /* ECMA-262 3rd Edition 15.9.1.14 */ static inline DOUBLE time_clip(DOUBLE time) { @@ -425,18 +434,42 @@ static HRESULT Date_getUTCDate(DispatchEx *dispex, LCID lcid, WORD flags, DISPPA return S_OK; } +/* ECMA-262 3th Edition 15.9.1.6 */ static HRESULT Date_getDay(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) { - FIXME("\n"); - return E_NOTIMPL; + TRACE("\n"); + + if(!is_class(dispex, JSCLASS_DATE)) { + FIXME("throw TypeError\n"); + return E_FAIL; + } + + if(retv) { + DateInstance *date = (DateInstance*)dispex; + DOUBLE time = date->time - date->bias*MS_PER_MINUTE; + + num_set_val(retv, week_day(time)); + } + return S_OK; } +/* ECMA-262 3th Edition 15.9.1.6 */ static HRESULT Date_getUTCDay(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) { - FIXME("\n"); - return E_NOTIMPL; + TRACE("\n"); + + if(!is_class(dispex, JSCLASS_DATE)) { + FIXME("throw TypeError\n"); + return E_FAIL; + } + + if(retv) { + DateInstance *date = (DateInstance*)dispex; + num_set_val(retv, week_day(date->time)); + } + return S_OK; } static HRESULT Date_getHours(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index 8616cc0..2238a94 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -949,19 +949,23 @@ ok(date.setTime(0) === date.getTime(), "date.setTime(0) !== date.getTime()"); ok(date.getUTCFullYear() === 1970, "date.getUTCFullYear() = " + date.getUTCFullYear()); ok(date.getUTCMonth() === 0, "date.getUTCMonth() = " + date.getUTCMonth()); ok(date.getUTCDate() === 1, "date.getUTCDate() = " + date.getUTCDate()); +ok(date.getUTCDay() === 4, "date.getUTCDay() = " + date.getUTCDay()); date.setTime(60*24*60*60*1000); ok(date.getUTCFullYear() === 1970, "date.getUTCFullYear() = " + date.getUTCFullYear()); ok(date.getUTCMonth() === 2, "date.getUTCMonth() = " + date.getUTCMonth()); ok(date.getUTCDate() === 2, "date.getUTCDate() = " + date.getUTCDate()); +ok(date.getUTCDay() === 1, "date.getUTCDay() = " + date.getUTCDay()); date.setTime(59*24*60*60*1000 + 4*365*24*60*60*1000); ok(date.getUTCFullYear() === 1974, "date.getUTCFullYear() = " + date.getUTCFullYear()); ok(date.getUTCMonth() === 1, "date.getUTCMonth() = " + date.getUTCMonth()); ok(date.getUTCMonth(123) === 1, "date.getUTCMonth() = " + date.getUTCMonth()); ok(date.getUTCDate() === 28, "date.getUTCDate() = " + date.getUTCDate()); +ok(date.getUTCDay() === 4, "date.getUTCDay() = " + date.getUTCDay()); date.setTime(Infinity); ok(isNaN(date.getUTCFullYear()), "date.getUTCFullYear() is not NaN"); ok(isNaN(date.getUTCMonth()), "date.getUTCMonth() is not NaN"); ok(isNaN(date.getUTCDate()), "date.getUTCDate() is not NaN"); +ok(isNaN(date.getUTCDay()), "date.getUTCDay() is not NaN"); ok(typeof(Math.PI) === "number", "typeof(Math.PI) = " + typeof(Math.PI)); ok(Math.floor(Math.PI*100) === 314, "Math.PI = " + Math.PI);
1
0
0
0
Piotr Caban : jscript: Added Date_getDate and Date_getUTCDate implementation.
by Alexandre Julliard
10 Jun '09
10 Jun '09
Module: wine Branch: master Commit: 190ed2ef99bc5a20afc8a193d5b37588062bf01a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=190ed2ef99bc5a20afc8a193d…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Tue Jun 9 14:04:09 2009 +0200 jscript: Added Date_getDate and Date_getUTCDate implementation. --- dlls/jscript/date.c | 56 +++++++++++++++++++++++++++++++++++++++++--- dlls/jscript/tests/api.js | 4 +++ 2 files changed, 56 insertions(+), 4 deletions(-) diff --git a/dlls/jscript/date.c b/dlls/jscript/date.c index d018a10..84d4170 100644 --- a/dlls/jscript/date.c +++ b/dlls/jscript/date.c @@ -182,6 +182,30 @@ static inline DOUBLE month_from_time(DOUBLE time) return 11; } +/* ECMA-262 3th Edition 15.9.1.5 */ +static inline DOUBLE date_from_time(DOUBLE time) +{ + int dwy = day_within_year(time); + int ily = in_leap_year(time); + int mft = month_from_time(time); + + if(isnan(time)) + return ret_nan(); + + if(mft==0) return dwy+1; + if(mft==1) return dwy-30; + if(mft==2) return dwy-58-ily; + if(mft==3) return dwy-89-ily; + if(mft==4) return dwy-119-ily; + if(mft==5) return dwy-150-ily; + if(mft==6) return dwy-180-ily; + if(mft==7) return dwy-211-ily; + if(mft==8) return dwy-242-ily; + if(mft==9) return dwy-272-ily; + if(mft==10) return dwy-303-ily; + return dwy-333-ily; +} + /* ECMA-262 3rd Edition 15.9.1.14 */ static inline DOUBLE time_clip(DOUBLE time) { @@ -363,18 +387,42 @@ static HRESULT Date_getUTCMonth(DispatchEx *dispex, LCID lcid, WORD flags, DISPP return S_OK; } +/* ECMA-262 3th Edition 15.9.1.5 */ static HRESULT Date_getDate(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) { - FIXME("\n"); - return E_NOTIMPL; + TRACE("\n"); + + if(!is_class(dispex, JSCLASS_DATE)) { + FIXME("throw TypeError\n"); + return E_FAIL; + } + + if(retv) { + DateInstance *date = (DateInstance*)dispex; + DOUBLE time = date->time - date->bias*MS_PER_MINUTE; + + num_set_val(retv, date_from_time(time)); + } + return S_OK; } +/* ECMA-262 3th Edition 15.9.1.5 */ static HRESULT Date_getUTCDate(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) { - FIXME("\n"); - return E_NOTIMPL; + TRACE("\n"); + + if(!is_class(dispex, JSCLASS_DATE)) { + FIXME("throw TypeError\n"); + return E_FAIL; + } + + if(retv) { + DateInstance *date = (DateInstance*)dispex; + num_set_val(retv, date_from_time(date->time)); + } + return S_OK; } static HRESULT Date_getDay(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index 1a10863..8616cc0 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -948,16 +948,20 @@ ok(isNaN(date.setTime(NaN)), "date.setTime(NaN) is not NaN"); ok(date.setTime(0) === date.getTime(), "date.setTime(0) !== date.getTime()"); ok(date.getUTCFullYear() === 1970, "date.getUTCFullYear() = " + date.getUTCFullYear()); ok(date.getUTCMonth() === 0, "date.getUTCMonth() = " + date.getUTCMonth()); +ok(date.getUTCDate() === 1, "date.getUTCDate() = " + date.getUTCDate()); date.setTime(60*24*60*60*1000); ok(date.getUTCFullYear() === 1970, "date.getUTCFullYear() = " + date.getUTCFullYear()); ok(date.getUTCMonth() === 2, "date.getUTCMonth() = " + date.getUTCMonth()); +ok(date.getUTCDate() === 2, "date.getUTCDate() = " + date.getUTCDate()); date.setTime(59*24*60*60*1000 + 4*365*24*60*60*1000); ok(date.getUTCFullYear() === 1974, "date.getUTCFullYear() = " + date.getUTCFullYear()); ok(date.getUTCMonth() === 1, "date.getUTCMonth() = " + date.getUTCMonth()); ok(date.getUTCMonth(123) === 1, "date.getUTCMonth() = " + date.getUTCMonth()); +ok(date.getUTCDate() === 28, "date.getUTCDate() = " + date.getUTCDate()); date.setTime(Infinity); ok(isNaN(date.getUTCFullYear()), "date.getUTCFullYear() is not NaN"); ok(isNaN(date.getUTCMonth()), "date.getUTCMonth() is not NaN"); +ok(isNaN(date.getUTCDate()), "date.getUTCDate() is not NaN"); ok(typeof(Math.PI) === "number", "typeof(Math.PI) = " + typeof(Math.PI)); ok(Math.floor(Math.PI*100) === 314, "Math.PI = " + Math.PI);
1
0
0
0
Piotr Caban : jscript: Added Date_getMonth and Date_getUTCMonth implementation.
by Alexandre Julliard
10 Jun '09
10 Jun '09
Module: wine Branch: master Commit: 3f289de8a3325ab728d7d3052f326264e71edbbd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3f289de8a3325ab728d7d3052…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Tue Jun 9 14:02:42 2009 +0200 jscript: Added Date_getMonth and Date_getUTCMonth implementation. --- dlls/jscript/date.c | 90 +++++++++++++++++++++++++++++++++++++++++++-- dlls/jscript/tests/api.js | 5 ++ 2 files changed, 91 insertions(+), 4 deletions(-) diff --git a/dlls/jscript/date.c b/dlls/jscript/date.c index 5b957f4..d018a10 100644 --- a/dlls/jscript/date.c +++ b/dlls/jscript/date.c @@ -87,6 +87,27 @@ static const WCHAR setUTCFullYearW[] = {'s','e','t','U','T','C','F','u','l','l', #define MS_PER_DAY 86400000 #define MS_PER_MINUTE 60000 +/* ECMA-262 3th Edition 15.9.1.2 */ +static inline DOUBLE day(DOUBLE time) +{ + return floor(time / MS_PER_DAY); +} + +/* ECMA-262 3th Edition 15.9.1.3 */ +static inline DOUBLE days_in_year(DOUBLE year) +{ + int y; + + if(year != (int)year) + return ret_nan(); + + y = year; + if(y%4 != 0) return 365; + if(y%100 != 0) return 366; + if(y%400 != 0) return 365; + return 366; +} + /* ECMA-262 3th Edition 15.9.1.3 */ static inline DOUBLE day_from_year(DOUBLE year) { @@ -124,6 +145,43 @@ static inline DOUBLE year_from_time(DOUBLE time) return y; } +/* ECMA-262 3th Edition 15.9.1.3 */ +static inline int in_leap_year(DOUBLE time) +{ + if(days_in_year(year_from_time(time))==366) + return 1; + return 0; +} + +/* ECMA-262 3th Edition 15.9.1.4 */ +static inline int day_within_year(DOUBLE time) +{ + return day(time) - day_from_year(year_from_time(time)); +} + +/* ECMA-262 3th Edition 15.9.1.4 */ +static inline DOUBLE month_from_time(DOUBLE time) +{ + int ily = in_leap_year(time); + int dwy = day_within_year(time); + + if(isnan(time)) + return ret_nan(); + + if(0<=dwy && dwy<31) return 0; + if(dwy < 59+ily) return 1; + if(dwy < 90+ily) return 2; + if(dwy < 120+ily) return 3; + if(dwy < 151+ily) return 4; + if(dwy < 181+ily) return 5; + if(dwy < 212+ily) return 6; + if(dwy < 243+ily) return 7; + if(dwy < 273+ily) return 8; + if(dwy < 304+ily) return 9; + if(dwy < 334+ily) return 10; + return 11; +} + /* ECMA-262 3rd Edition 15.9.1.14 */ static inline DOUBLE time_clip(DOUBLE time) { @@ -267,18 +325,42 @@ static HRESULT Date_getUTCFullYear(DispatchEx *dispex, LCID lcid, WORD flags, DI return S_OK; } +/* ECMA-262 3th Edition 15.9.1.4 */ static HRESULT Date_getMonth(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) { - FIXME("\n"); - return E_NOTIMPL; + TRACE("\n"); + + if(!is_class(dispex, JSCLASS_DATE)) { + FIXME("throw TypeError\n"); + return E_FAIL; + } + + if(retv) { + DateInstance *date = (DateInstance*)dispex; + DOUBLE time = date->time - date->bias*MS_PER_MINUTE; + + num_set_val(retv, month_from_time(time)); + } + return S_OK; } +/* ECMA-262 3th Edition 15.9.1.4 */ static HRESULT Date_getUTCMonth(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) { - FIXME("\n"); - return E_NOTIMPL; + TRACE("\n"); + + if(!is_class(dispex, JSCLASS_DATE)) { + FIXME("throw TypeError\n"); + return E_FAIL; + } + + if(retv) { + DateInstance *date = (DateInstance*)dispex; + num_set_val(retv, month_from_time(date->time)); + } + return S_OK; } static HRESULT Date_getDate(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index a10665d..1a10863 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -947,12 +947,17 @@ ok(isNaN(date.setTime(NaN)), "date.setTime(NaN) is not NaN"); ok(date.setTime(0) === date.getTime(), "date.setTime(0) !== date.getTime()"); ok(date.getUTCFullYear() === 1970, "date.getUTCFullYear() = " + date.getUTCFullYear()); +ok(date.getUTCMonth() === 0, "date.getUTCMonth() = " + date.getUTCMonth()); date.setTime(60*24*60*60*1000); ok(date.getUTCFullYear() === 1970, "date.getUTCFullYear() = " + date.getUTCFullYear()); +ok(date.getUTCMonth() === 2, "date.getUTCMonth() = " + date.getUTCMonth()); date.setTime(59*24*60*60*1000 + 4*365*24*60*60*1000); ok(date.getUTCFullYear() === 1974, "date.getUTCFullYear() = " + date.getUTCFullYear()); +ok(date.getUTCMonth() === 1, "date.getUTCMonth() = " + date.getUTCMonth()); +ok(date.getUTCMonth(123) === 1, "date.getUTCMonth() = " + date.getUTCMonth()); date.setTime(Infinity); ok(isNaN(date.getUTCFullYear()), "date.getUTCFullYear() is not NaN"); +ok(isNaN(date.getUTCMonth()), "date.getUTCMonth() is not NaN"); ok(typeof(Math.PI) === "number", "typeof(Math.PI) = " + typeof(Math.PI)); ok(Math.floor(Math.PI*100) === 314, "Math.PI = " + Math.PI);
1
0
0
0
Piotr Caban : jscript: Added Date_getFullYear and Date_getUTCFullYear implementation.
by Alexandre Julliard
10 Jun '09
10 Jun '09
Module: wine Branch: master Commit: 8427127bb976d8cd3114e8f245921f341ee9904a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8427127bb976d8cd3114e8f24…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Tue Jun 9 14:01:01 2009 +0200 jscript: Added Date_getFullYear and Date_getUTCFullYear implementation. --- dlls/jscript/date.c | 73 ++++++++++++++++++++++++++++++++++++++++++-- dlls/jscript/tests/api.js | 9 +++++ 2 files changed, 78 insertions(+), 4 deletions(-) diff --git a/dlls/jscript/date.c b/dlls/jscript/date.c index e17ad26..5b957f4 100644 --- a/dlls/jscript/date.c +++ b/dlls/jscript/date.c @@ -83,6 +83,47 @@ static const WCHAR setUTCMonthW[] = {'s','e','t','U','T','C','M','o','n','t','h' static const WCHAR setFullYearW[] = {'s','e','t','F','u','l','l','Y','e','a','r',0}; static const WCHAR setUTCFullYearW[] = {'s','e','t','U','T','C','F','u','l','l','Y','e','a','r',0}; +/*ECMA-262 3th Edition 15.9.1.2 */ +#define MS_PER_DAY 86400000 +#define MS_PER_MINUTE 60000 + +/* ECMA-262 3th Edition 15.9.1.3 */ +static inline DOUBLE day_from_year(DOUBLE year) +{ + int y; + + if(year != (int)year) + return ret_nan(); + + y = year; + return 365*(y-1970) + floor((y-1969)/4) + - floor((y-1901)/100) + floor((y-1601)/400); +} + +/* ECMA-262 3th Edition 15.9.1.3 */ +static inline DOUBLE time_from_year(DOUBLE year) +{ + return MS_PER_DAY*day_from_year(year); +} + +/* ECMA-262 3th Edition 15.9.1.3 */ +static inline DOUBLE year_from_time(DOUBLE time) +{ + int y; + + if(isnan(time)) + return ret_nan(); + + y = 1970 + time/365.25/MS_PER_DAY; + + if(time_from_year(y) > time) + while(time_from_year(y) > time) y--; + else + while(time_from_year(y+1)<=time) y++; + + return y; +} + /* ECMA-262 3rd Edition 15.9.1.14 */ static inline DOUBLE time_clip(DOUBLE time) { @@ -188,18 +229,42 @@ static HRESULT Date_getTime(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM return S_OK; } +/* ECMA-262 3th Edition 15.9.1.3 */ static HRESULT Date_getFullYear(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) { - FIXME("\n"); - return E_NOTIMPL; + TRACE("\n"); + + if(!is_class(dispex, JSCLASS_DATE)) { + FIXME("throw TypeError\n"); + return E_FAIL; + } + + if(retv) { + DateInstance *date = (DateInstance*)dispex; + DOUBLE time = date->time - date->bias*MS_PER_MINUTE; + + num_set_val(retv, year_from_time(time)); + } + return S_OK; } +/* ECMA-262 3th Edition 15.9.1.3 */ static HRESULT Date_getUTCFullYear(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) { - FIXME("\n"); - return E_NOTIMPL; + TRACE("\n"); + + if(!is_class(dispex, JSCLASS_DATE)) { + FIXME("throw TypeError\n"); + return E_FAIL; + } + + if(retv) { + DateInstance *date = (DateInstance*)dispex; + num_set_val(retv, year_from_time(date->time)); + } + return S_OK; } static HRESULT Date_getMonth(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index 1f922b9..a10665d 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -945,6 +945,15 @@ ok(date.setTime(123) === 123, "date.setTime(123) !== 123"); ok(date.setTime("123", NaN) === 123, "date.setTime(\"123\") !== 123"); ok(isNaN(date.setTime(NaN)), "date.setTime(NaN) is not NaN"); +ok(date.setTime(0) === date.getTime(), "date.setTime(0) !== date.getTime()"); +ok(date.getUTCFullYear() === 1970, "date.getUTCFullYear() = " + date.getUTCFullYear()); +date.setTime(60*24*60*60*1000); +ok(date.getUTCFullYear() === 1970, "date.getUTCFullYear() = " + date.getUTCFullYear()); +date.setTime(59*24*60*60*1000 + 4*365*24*60*60*1000); +ok(date.getUTCFullYear() === 1974, "date.getUTCFullYear() = " + date.getUTCFullYear()); +date.setTime(Infinity); +ok(isNaN(date.getUTCFullYear()), "date.getUTCFullYear() is not NaN"); + ok(typeof(Math.PI) === "number", "typeof(Math.PI) = " + typeof(Math.PI)); ok(Math.floor(Math.PI*100) === 314, "Math.PI = " + Math.PI); Math.PI = "test";
1
0
0
0
Nikolay Sivov : comctl32/listview: Implement callback functionality for item indentation.
by Alexandre Julliard
10 Jun '09
10 Jun '09
Module: wine Branch: master Commit: abe5dee0bb7f3854a6cb2519faf75facdd08fe6f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=abe5dee0bb7f3854a6cb2519f…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Wed Jun 10 03:23:17 2009 +0400 comctl32/listview: Implement callback functionality for item indentation. --- dlls/comctl32/listview.c | 21 +++++++++++++++++++-- dlls/comctl32/tests/listview.c | 2 +- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index df07384..55519dd 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -6,6 +6,7 @@ * Copyright 2000 Jason Mawdsley * Copyright 2001 CodeWeavers Inc. * Copyright 2002 Dimitrie O. Paun + * Copyright 2009 Nikolay Sivov * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -5746,6 +5747,14 @@ static BOOL LISTVIEW_GetItemT(const LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem, dispInfo.item.iImage = I_IMAGECALLBACK; } + /* Only items support indentation */ + if ((lpLVItem->mask & LVIF_INDENT) && lpItem->iIndent == I_INDENTCALLBACK && + (isubitem == 0)) + { + dispInfo.item.mask |= LVIF_INDENT; + dispInfo.item.iIndent = I_INDENTCALLBACK; + } + /* Apps depend on calling back for text if it is NULL or LPSTR_TEXTCALLBACKW */ if ((lpLVItem->mask & LVIF_TEXT) && !(lpLVItem->mask & LVIF_NORECOMPUTE) && !is_textW(pItemHdr->pszText)) @@ -5837,8 +5846,16 @@ static BOOL LISTVIEW_GetItemT(const LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem, } /* and last, but not least, the indent field */ - if (lpLVItem->mask & LVIF_INDENT) - lpLVItem->iIndent = lpItem->iIndent; + if (dispInfo.item.mask & LVIF_INDENT) + { + lpLVItem->iIndent = dispInfo.item.iIndent; + if ((dispInfo.item.mask & LVIF_DI_SETITEM) && lpItem->iIndent == I_INDENTCALLBACK) + lpItem->iIndent = dispInfo.item.iIndent; + } + else if (lpLVItem->mask & LVIF_INDENT) + { + lpLVItem->iIndent = lpItem->iIndent; + } return TRUE; } diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index e7cbe03..2dce945 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -3304,7 +3304,7 @@ static void test_indentation(void) expect(TRUE, r); ok_sequence(sequences, PARENT_SEQ_INDEX, single_getdispinfo_parent_seq, - "get indent dispinfo", TRUE); + "get indent dispinfo", FALSE); DestroyWindow(hwnd); }
1
0
0
0
← Newer
1
...
76
77
78
79
80
81
82
...
112
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
Results per page:
10
25
50
100
200