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
September 2014
----- 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
2 participants
301 discussions
Start a n
N
ew thread
Aric Stewart : dwrite: Break fontfamily data into its own structure.
by Alexandre Julliard
10 Sep '14
10 Sep '14
Module: wine Branch: master Commit: 15ef946f53f66f327a7ed45a0d2856aaff726561 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=15ef946f53f66f327a7ed45a0…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon Sep 8 19:10:48 2014 -0500 dwrite: Break fontfamily data into its own structure. --- dlls/dwrite/font.c | 61 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 8b59a37..efa305e 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -58,6 +58,14 @@ struct dwrite_font_data { WCHAR *facename; }; +struct dwrite_fontfamily_data { + IDWriteLocalizedStrings *familyname; + + struct dwrite_font_data **fonts; + UINT32 font_count; + UINT32 alloc; +}; + struct dwrite_fontcollection { IDWriteFontCollection IDWriteFontCollection_iface; LONG ref; @@ -71,13 +79,9 @@ struct dwrite_fontfamily { IDWriteFontFamily IDWriteFontFamily_iface; LONG ref; - struct dwrite_font_data **fonts; - UINT32 font_count; - UINT32 alloc; + struct dwrite_fontfamily_data *data; IDWriteFontCollection* collection; - - IDWriteLocalizedStrings *familyname; }; struct dwrite_font { @@ -744,13 +748,14 @@ static ULONG WINAPI dwritefontfamily_Release(IDWriteFontFamily *iface) if (!ref) { int i; - IDWriteLocalizedStrings_Release(This->familyname); + IDWriteLocalizedStrings_Release(This->data->familyname); if (This->collection) IDWriteFontCollection_Release(This->collection); - for (i = 0; i < This->font_count; i++) - _free_font_data(This->fonts[i]); - heap_free(This->fonts); + for (i = 0; i < This->data->font_count; i++) + _free_font_data(This->data->fonts[i]); + heap_free(This->data->fonts); + heap_free(This->data); heap_free(This); } @@ -775,19 +780,19 @@ static UINT32 WINAPI dwritefontfamily_GetFontCount(IDWriteFontFamily *iface) { struct dwrite_fontfamily *This = impl_from_IDWriteFontFamily(iface); TRACE("(%p)\n", This); - return This->font_count; + return This->data->font_count; } static HRESULT WINAPI dwritefontfamily_GetFont(IDWriteFontFamily *iface, UINT32 index, IDWriteFont **font) { struct dwrite_fontfamily *This = impl_from_IDWriteFontFamily(iface); TRACE("(%p)->(%u %p)\n", This, index, font); - if (This->font_count > 0) + if (This->data->font_count > 0) { HRESULT hr; - if (index >= This->font_count) + if (index >= This->data->font_count) return E_INVALIDARG; - hr = create_font_from_data(This->fonts[index], font); + hr = create_font_from_data(This->data->fonts[index], font); if (SUCCEEDED(hr)) { struct dwrite_font *font_data = impl_from_IDWriteFont(*font); @@ -803,7 +808,7 @@ static HRESULT WINAPI dwritefontfamily_GetFont(IDWriteFontFamily *iface, UINT32 static HRESULT WINAPI dwritefontfamily_GetFamilyNames(IDWriteFontFamily *iface, IDWriteLocalizedStrings **names) { struct dwrite_fontfamily *This = impl_from_IDWriteFontFamily(iface); - return clone_localizedstring(This->familyname, names); + return clone_localizedstring(This->data->familyname, names); } static HRESULT WINAPI dwritefontfamily_GetFirstMatchingFont(IDWriteFontFamily *iface, DWRITE_FONT_WEIGHT weight, @@ -815,26 +820,26 @@ static HRESULT WINAPI dwritefontfamily_GetFirstMatchingFont(IDWriteFontFamily *i TRACE("(%p)->(%d %d %d %p)\n", This, weight, stretch, style, font); /* fallback for system font collections */ - if (This->font_count == 0) + if (This->data->font_count == 0) { memset(&lf, 0, sizeof(lf)); lf.lfWeight = weight; lf.lfItalic = style == DWRITE_FONT_STYLE_ITALIC; - IDWriteLocalizedStrings_GetString(This->familyname, 0, lf.lfFaceName, LF_FACESIZE); + IDWriteLocalizedStrings_GetString(This->data->familyname, 0, lf.lfFaceName, LF_FACESIZE); return create_font_from_logfont(&lf, font); } else { int i; - for (i = 0; i < This->font_count; i++) + for (i = 0; i < This->data->font_count; i++) { - if (style == This->fonts[i]->style && - weight == This->fonts[i]->weight && - stretch == This->fonts[i]->stretch) + if (style == This->data->fonts[i]->style && + weight == This->data->fonts[i]->weight && + stretch == This->data->fonts[i]->stretch) { HRESULT hr; - hr = create_font_from_data(This->fonts[i], font); + hr = create_font_from_data(This->data->fonts[i], font); if (SUCCEEDED(hr)) { struct dwrite_font *font_data = impl_from_IDWriteFont(*font); @@ -1043,14 +1048,20 @@ static HRESULT create_fontfamily(IDWriteLocalizedStrings *familyname, IDWriteFon This = heap_alloc(sizeof(struct dwrite_fontfamily)); if (!This) return E_OUTOFMEMORY; + This->data = heap_alloc(sizeof(struct dwrite_fontfamily_data)); + if (!This) + { + heap_free(This); + return E_OUTOFMEMORY; + } This->IDWriteFontFamily_iface.lpVtbl = &fontfamilyvtbl; This->ref = 1; - This->font_count = 0; - This->alloc = 2; - This->fonts = heap_alloc(sizeof(*This->fonts) * 2); + This->data->font_count = 0; + This->data->alloc = 2; + This->data->fonts = heap_alloc(sizeof(*This->data->fonts) * 2); This->collection = NULL; - This->familyname = familyname; + This->data->familyname = familyname; *family = &This->IDWriteFontFamily_iface;
1
0
0
0
Nikolay Sivov : msvcrt: Added __dstbias() export.
by Alexandre Julliard
10 Sep '14
10 Sep '14
Module: wine Branch: master Commit: 1228f0bba500e2c3644fb1a10f80947338b73032 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1228f0bba500e2c3644fb1a10…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Sep 10 21:39:17 2014 +0400 msvcrt: Added __dstbias() export. --- dlls/msvcr100/msvcr100.spec | 4 ++-- dlls/msvcr110/msvcr110.spec | 4 ++-- dlls/msvcr70/msvcr70.spec | 2 +- dlls/msvcr71/msvcr71.spec | 2 +- dlls/msvcr80/msvcr80.spec | 4 ++-- dlls/msvcr90/msvcr90.spec | 4 ++-- dlls/msvcrt/msvcrt.spec | 4 ++-- dlls/msvcrt/tests/time.c | 11 +++++++++++ dlls/msvcrt/time.c | 8 ++++---- 9 files changed, 27 insertions(+), 16 deletions(-) diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index f8062f9..0d6e2dc 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -584,7 +584,7 @@ @ cdecl __daylight() MSVCRT___p__daylight @ cdecl __dllonexit(ptr ptr ptr) @ cdecl __doserrno() MSVCRT___doserrno -@ stub __dstbias +@ cdecl __dstbias() MSVCRT___p__dstbias @ stub ___fls_getvalue@4 @ stub ___fls_setvalue@8 @ cdecl __fpecode() @@ -633,7 +633,7 @@ @ cdecl __p__acmdln() @ cdecl __p__commode() @ cdecl __p__daylight() MSVCRT___p__daylight -@ cdecl __p__dstbias() +@ cdecl __p__dstbias() MSVCRT___p__dstbias @ cdecl __p__environ() MSVCRT___p__environ @ cdecl __p__fmode() @ cdecl __p__iob() MSVCRT___iob_func diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 6a328eb..1114190 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -934,7 +934,7 @@ @ cdecl __daylight() MSVCRT___p__daylight @ cdecl __dllonexit(ptr ptr ptr) @ cdecl __doserrno() MSVCRT___doserrno -@ stub __dstbias +@ cdecl __dstbias() MSVCRT___p__dstbias @ cdecl __fpecode() @ stub __free_locale @ stub __get_current_locale @@ -982,7 +982,7 @@ @ cdecl __p__acmdln() @ cdecl __p__commode() @ cdecl __p__daylight() MSVCRT___p__daylight -@ cdecl __p__dstbias() +@ cdecl __p__dstbias() MSVCRT___p__dstbias @ cdecl __p__environ() MSVCRT___p__environ @ cdecl __p__fmode() @ cdecl __p__iob() MSVCRT___iob_func diff --git a/dlls/msvcr70/msvcr70.spec b/dlls/msvcr70/msvcr70.spec index 1a94ee2..fb47e78 100644 --- a/dlls/msvcr70/msvcr70.spec +++ b/dlls/msvcr70/msvcr70.spec @@ -171,7 +171,7 @@ @ cdecl __p__amblksiz() @ cdecl __p__commode() @ cdecl __p__daylight() MSVCRT___p__daylight -@ cdecl __p__dstbias() +@ cdecl __p__dstbias() MSVCRT___p__dstbias @ cdecl __p__environ() MSVCRT___p__environ @ stub __p__fileinfo() @ cdecl __p__fmode() diff --git a/dlls/msvcr71/msvcr71.spec b/dlls/msvcr71/msvcr71.spec index 127a440..8b868db 100644 --- a/dlls/msvcr71/msvcr71.spec +++ b/dlls/msvcr71/msvcr71.spec @@ -166,7 +166,7 @@ @ cdecl __p__amblksiz() @ cdecl __p__commode() @ cdecl __p__daylight() MSVCRT___p__daylight -@ cdecl __p__dstbias() +@ cdecl __p__dstbias() MSVCRT___p__dstbias @ cdecl __p__environ() MSVCRT___p__environ @ stub __p__fileinfo() @ cdecl __p__fmode() diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 3902c85..fc313a4 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -220,7 +220,7 @@ @ cdecl __daylight() MSVCRT___p__daylight @ cdecl __dllonexit(ptr ptr ptr) @ cdecl __doserrno() MSVCRT___doserrno -@ stub __dstbias +@ cdecl __dstbias() MSVCRT___p__dstbias @ stub -arch=i386 ___fls_getvalue@4 @ stub -arch=x86_64 __fls_getvalue @ stub -arch=i386 ___fls_setvalue@8 @@ -277,7 +277,7 @@ @ cdecl __p__amblksiz() @ cdecl __p__commode() @ cdecl __p__daylight() MSVCRT___p__daylight -@ cdecl __p__dstbias() +@ cdecl __p__dstbias() MSVCRT___p__dstbias @ cdecl __p__environ() MSVCRT___p__environ @ cdecl __p__fmode() @ cdecl __p__iob() MSVCRT___iob_func diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index fa19f40..a89dbfb 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -211,7 +211,7 @@ @ cdecl __daylight() MSVCRT___p__daylight @ cdecl __dllonexit(ptr ptr ptr) @ cdecl __doserrno() MSVCRT___doserrno -@ stub __dstbias +@ cdecl __dstbias() MSVCRT___p__dstbias @ stub ___fls_getvalue@4 @ stub ___fls_setvalue@8 @ cdecl __fpecode() @@ -266,7 +266,7 @@ @ cdecl __p__amblksiz() @ cdecl __p__commode() @ cdecl __p__daylight() MSVCRT___p__daylight -@ cdecl __p__dstbias() +@ cdecl __p__dstbias() MSVCRT___p__dstbias @ cdecl __p__environ() MSVCRT___p__environ @ cdecl __p__fmode() @ cdecl __p__iob() MSVCRT___iob_func diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 01788e1..742ada3 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -209,7 +209,7 @@ @ cdecl __daylight() MSVCRT___p__daylight @ cdecl __dllonexit(ptr ptr ptr) @ cdecl __doserrno() MSVCRT___doserrno -# stub __dstbias() +@ cdecl __dstbias() MSVCRT___p__dstbias @ cdecl __fpecode() @ stub __get_app_type @ cdecl __getmainargs(ptr ptr ptr long ptr) @@ -255,7 +255,7 @@ @ cdecl __p__amblksiz() @ cdecl __p__commode() @ cdecl __p__daylight() MSVCRT___p__daylight -@ cdecl __p__dstbias() +@ cdecl __p__dstbias() MSVCRT___p__dstbias @ cdecl __p__environ() MSVCRT___p__environ @ stub __p__fileinfo() @ cdecl __p__fmode() diff --git a/dlls/msvcrt/tests/time.c b/dlls/msvcrt/tests/time.c index 71e58ba..995ece2 100644 --- a/dlls/msvcrt/tests/time.c +++ b/dlls/msvcrt/tests/time.c @@ -47,6 +47,7 @@ static errno_t (__cdecl *p_localtime64_s)(struct tm*, __time64_t*); static int* (__cdecl *p__daylight)(void); static int* (__cdecl *p___p__daylight)(void); static long* (__cdecl *p___p__dstbias)(void); +static long* (__cdecl *p__dstbias)(void); static long* (__cdecl *p___p__timezone)(void); static size_t (__cdecl *p_strftime)(char *, size_t, const char *, const struct tm *); static size_t (__cdecl *p_wcsftime)(wchar_t *, size_t, const wchar_t *, const struct tm *); @@ -67,6 +68,7 @@ static void init(void) p__daylight = (void*)GetProcAddress(hmod, "__daylight"); p___p__daylight = (void*)GetProcAddress(hmod, "__p__daylight"); p___p__dstbias = (void*)GetProcAddress(hmod, "__p__dstbias"); + p__dstbias = (void*)GetProcAddress(hmod, "__dstbias"); p___p__timezone = (void*)GetProcAddress(hmod, "__p__timezone"); p_strftime = (void*)GetProcAddress(hmod, "strftime"); p_wcsftime = (void*)GetProcAddress(hmod, "wcsftime"); @@ -821,6 +823,15 @@ static void test__tzset(void) return; } + if (p__dstbias) { + ret = *p__dstbias(); + ok(ret == -3600, "*__dstbias() = %d\n", ret); + ret = *p___p__dstbias(); + ok(ret == -3600, "*__p__dstbias() = %d\n", ret); + } + else + win_skip("__dstbias() is not available.\n"); + _snprintf(TZ_env,255,"TZ=%s",(getenv("TZ")?getenv("TZ"):"")); ret = *p___p__daylight(); diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c index 9c15bf4..e52e1d8 100644 --- a/dlls/msvcrt/time.c +++ b/dlls/msvcrt/time.c @@ -875,7 +875,7 @@ MSVCRT___time32_t CDECL MSVCRT_time(MSVCRT___time32_t* buf) #endif /********************************************************************* - * __p_daylight (MSVCRT.@) + * __p__daylight (MSVCRT.@) */ int * CDECL MSVCRT___p__daylight(void) { @@ -883,15 +883,15 @@ int * CDECL MSVCRT___p__daylight(void) } /********************************************************************* - * __p_dstbias (MSVCRT.@) + * __p__dstbias (MSVCRT.@) */ -int * CDECL __p__dstbias(void) +int * CDECL MSVCRT___p__dstbias(void) { return &MSVCRT__dstbias; } /********************************************************************* - * __p_timezone (MSVCRT.@) + * __p__timezone (MSVCRT.@) */ MSVCRT_long * CDECL MSVCRT___p__timezone(void) {
1
0
0
0
Jacek Caban : mshtml: Bind events to document node instead of body element.
by Alexandre Julliard
10 Sep '14
10 Sep '14
Module: wine Branch: master Commit: 5d2ee3ee82323346da6ba4cfb3931e6296aa480c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5d2ee3ee82323346da6ba4cfb…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Sep 10 17:30:24 2014 +0200 mshtml: Bind events to document node instead of body element. --- dlls/mshtml/htmlevent.c | 12 ++---------- dlls/mshtml/tests/events.html | 21 ++++++++++++++++++--- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 33f763e..75b41d3 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -1328,16 +1328,8 @@ static HRESULT ensure_nsevent_handler(HTMLDocumentNode *doc, event_target_t *eve return S_OK; if(event_info[eid].flags & EVENT_BIND_TO_BODY) { - nsIDOMHTMLElement *nsbody; - nsresult nsres; - - nsres = nsIDOMHTMLDocument_GetBody(doc->nsdoc, &nsbody); - if(NS_SUCCEEDED(nsres) && nsbody) { - nsnode = (nsIDOMNode*)nsbody; - }else { - ERR("GetBody failed: %08x\n", nsres); - return E_UNEXPECTED; - } + nsnode = doc->node.nsnode; + nsIDOMNode_AddRef(nsnode); } doc->event_vector[eid] = TRUE; diff --git a/dlls/mshtml/tests/events.html b/dlls/mshtml/tests/events.html index bf8a21f..d4e2644 100644 --- a/dlls/mshtml/tests/events.html +++ b/dlls/mshtml/tests/events.html @@ -114,14 +114,16 @@ function test_handler_this() { ok(calls == "div2,div2*,div1,div1*,body,body*", "calls = " + calls); } -function runTests(t) { +window.onload = function() { try { ok(cnt == 1, "cnt=" + cnt + " exception during loading?"); - ok(t === window, "t !== window"); + ok(this === window, "this !== window"); ok(typeof(window.onload) === "function", "typeof(window.onload) = " + typeof(window.onload)); ok(document.body.onload === window.onload, "document.body.onload !== window.onload"); + ok(img_onload_called, "img.onload not called before window.onload"); + test_scriptfor(); ondataavailable_test(); test_handler_this(); @@ -132,8 +134,18 @@ function runTests(t) { external.reportSuccess(); } </script> +<script> +var img = document.createElement("img"); +img.src = "
http://test.winehq.org/tests/winehq_snapshot/index_files/winehq_logo_glass.…
"; + +var img_onload_called = false; +img.onload = function() { + external.trace("img.onload"); + img_onload_called = true; +} +</script> </head> -<body onload="runTests(this)"> +<body> <div id="divid"></div> <div id="divid2"></div> <script event="onclick" for="divid2"> @@ -152,5 +164,8 @@ function runTests(t) { cnt++; })(); </script> +<script> +document.body.appendChild(img); +</script> </body> </html>
1
0
0
0
Alexandre Julliard : kernel32: Pass the correct completion values in ReadFileScatter and WriteFileGather.
by Alexandre Julliard
10 Sep '14
10 Sep '14
Module: wine Branch: master Commit: 553ba810b8e5034415992d99bf970b2ebb7a85ce URL:
http://source.winehq.org/git/wine.git/?a=commit;h=553ba810b8e5034415992d99b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Sep 10 13:49:40 2014 +0200 kernel32: Pass the correct completion values in ReadFileScatter and WriteFileGather. Test case based on a patch by Guo Jian. --- dlls/kernel32/file.c | 10 ++++++-- dlls/kernel32/tests/file.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c index 412659b..cf683df 100644 --- a/dlls/kernel32/file.c +++ b/dlls/kernel32/file.c @@ -374,17 +374,20 @@ BOOL WINAPI ReadFileScatter( HANDLE file, FILE_SEGMENT_ELEMENT *segments, DWORD { PIO_STATUS_BLOCK io_status; LARGE_INTEGER offset; + void *cvalue = NULL; NTSTATUS status; TRACE( "(%p %p %u %p)\n", file, segments, count, overlapped ); offset.u.LowPart = overlapped->u.s.Offset; offset.u.HighPart = overlapped->u.s.OffsetHigh; + if (!((ULONG_PTR)overlapped->hEvent & 1)) cvalue = overlapped; io_status = (PIO_STATUS_BLOCK)overlapped; io_status->u.Status = STATUS_PENDING; io_status->Information = 0; - status = NtReadFileScatter( file, NULL, NULL, NULL, io_status, segments, count, &offset, NULL ); + status = NtReadFileScatter( file, overlapped->hEvent, NULL, cvalue, io_status, + segments, count, &offset, NULL ); if (status) SetLastError( RtlNtStatusToDosError(status) ); return !status; } @@ -513,17 +516,20 @@ BOOL WINAPI WriteFileGather( HANDLE file, FILE_SEGMENT_ELEMENT *segments, DWORD { PIO_STATUS_BLOCK io_status; LARGE_INTEGER offset; + void *cvalue = NULL; NTSTATUS status; TRACE( "%p %p %u %p\n", file, segments, count, overlapped ); offset.u.LowPart = overlapped->u.s.Offset; offset.u.HighPart = overlapped->u.s.OffsetHigh; + if (!((ULONG_PTR)overlapped->hEvent & 1)) cvalue = overlapped; io_status = (PIO_STATUS_BLOCK)overlapped; io_status->u.Status = STATUS_PENDING; io_status->Information = 0; - status = NtWriteFileGather( file, NULL, NULL, NULL, io_status, segments, count, &offset, NULL ); + status = NtWriteFileGather( file, overlapped->hEvent, NULL, cvalue, io_status, + segments, count, &offset, NULL ); if (status) SetLastError( RtlNtStatusToDosError(status) ); return !status; } diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index 492a34f..ddfa019 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -3959,6 +3959,63 @@ static void test_SetFileValidData(void) DeleteFileA(filename); } +static void test_WriteFileGather(void) +{ + char temp_path[MAX_PATH], filename[MAX_PATH]; + HANDLE hfile, hiocp1, hiocp2; + DWORD ret, size; + ULONG_PTR key; + FILE_SEGMENT_ELEMENT fse[2]; + OVERLAPPED ovl, *povl = NULL; + SYSTEM_INFO si; + LPVOID buf = NULL; + + ret = GetTempPathA( MAX_PATH, temp_path ); + ok( ret != 0, "GetTempPathA error %d\n", GetLastError() ); + ok( ret < MAX_PATH, "temp path should fit into MAX_PATH\n" ); + ret = GetTempFileNameA( temp_path, "wfg", 0, filename ); + ok( ret != 0, "GetTempFileNameA error %d\n", GetLastError() ); + + hfile = CreateFileA( filename, GENERIC_READ | GENERIC_WRITE, 0, 0, CREATE_ALWAYS, + FILE_FLAG_NO_BUFFERING | FILE_FLAG_OVERLAPPED | FILE_ATTRIBUTE_NORMAL, 0 ); + ok( hfile != INVALID_HANDLE_VALUE, "CreateFile failed err %u\n", GetLastError() ); + if (hfile == INVALID_HANDLE_VALUE) return; + + hiocp1 = CreateIoCompletionPort( INVALID_HANDLE_VALUE, NULL, 999, 0 ); + hiocp2 = CreateIoCompletionPort( hfile, hiocp1, 999, 0 ); + ok( hiocp2 != 0, "CreateIoCompletionPort failed err %u\n", GetLastError() ); + + GetSystemInfo( &si ); + buf = VirtualAlloc( NULL, si.dwPageSize, MEM_COMMIT, PAGE_READWRITE ); + ok( buf != NULL, "VirtualAlloc failed err %u\n", GetLastError() ); + + memset( &ovl, 0, sizeof(ovl) ); + memset( fse, 0, sizeof(fse) ); + fse[0].Buffer = buf; + if (!WriteFileGather( hfile, fse, si.dwPageSize, NULL, &ovl )) + ok( GetLastError() == ERROR_IO_PENDING, "WriteFileGather failed err %u\n", GetLastError() ); + + ret = GetQueuedCompletionStatus( hiocp2, &size, &key, &povl, 1000 ); + ok( ret, "GetQueuedCompletionStatus failed err %u\n", GetLastError()); + ok( povl == &ovl, "wrong ovl %p\n", povl ); + + memset( &ovl, 0, sizeof(ovl) ); + memset( fse, 0, sizeof(fse) ); + fse[0].Buffer = buf; + if (!ReadFileScatter( hfile, fse, si.dwPageSize, NULL, &ovl )) + ok( GetLastError() == ERROR_IO_PENDING, "ReadFileScatter failed err %u\n", GetLastError() ); + + ret = GetQueuedCompletionStatus( hiocp2, &size, &key, &povl, 1000 ); + ok( ret, "GetQueuedCompletionStatus failed err %u\n", GetLastError()); + ok( povl == &ovl, "wrong ovl %p\n", povl ); + + CloseHandle( hfile ); + CloseHandle( hiocp1 ); + CloseHandle( hiocp2 ); + VirtualFree( buf, 0, MEM_RELEASE ); + DeleteFileA( filename ); +} + static unsigned file_map_access(unsigned access) { if (access & GENERIC_READ) access |= FILE_GENERIC_READ; @@ -4132,5 +4189,6 @@ START_TEST(file) test_GetFileInformationByHandleEx(); test_OpenFileById(); test_SetFileValidData(); + test_WriteFileGather(); test_file_access(); }
1
0
0
0
Alistair Leslie-Hughes : cmd: Dont assume cmd.exe is the first argument.
by Alexandre Julliard
10 Sep '14
10 Sep '14
Module: wine Branch: master Commit: 213b244cb5d98a27478252deaf57c2685a3d71a2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=213b244cb5d98a27478252dea…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Sat Mar 15 20:00:06 2014 +1100 cmd: Dont assume cmd.exe is the first argument. --- programs/cmd/wcmdmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index c475ad2..e5865e6 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -2363,7 +2363,7 @@ int wmain (int argc, WCHAR *argvW[]) */ cmdLine = GetCommandLineW(); WINE_TRACE("Full commandline '%s'\n", wine_dbgstr_w(cmdLine)); - args = 1; /* start at first arg, skipping cmd.exe itself */ + args = 0; opt_c = opt_k = opt_q = opt_s = FALSE; WCMD_parameter(cmdLine, args, &argPos, TRUE, TRUE);
1
0
0
0
Vincent Povirk : mscoree: Implement CorBindToCurrentRuntime.
by Alexandre Julliard
10 Sep '14
10 Sep '14
Module: wine Branch: master Commit: 4aa1af901635434e2f7692fd13d7c3e2e48af4fe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4aa1af901635434e2f7692fd1…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Tue Sep 9 14:31:41 2014 -0500 mscoree: Implement CorBindToCurrentRuntime. --- dlls/mscoree/mscoree_main.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/dlls/mscoree/mscoree_main.c b/dlls/mscoree/mscoree_main.c index 9ac1e3e..7534108 100644 --- a/dlls/mscoree/mscoree_main.c +++ b/dlls/mscoree/mscoree_main.c @@ -485,8 +485,23 @@ HRESULT WINAPI CorBindToRuntimeEx(LPWSTR szVersion, LPWSTR szBuildFlavor, DWORD HRESULT WINAPI CorBindToCurrentRuntime(LPCWSTR filename, REFCLSID rclsid, REFIID riid, LPVOID *ppv) { - FIXME("(%s, %s, %s, %p): stub\n", debugstr_w(filename), debugstr_guid(rclsid), debugstr_guid(riid), ppv); - return E_NOTIMPL; + HRESULT ret; + ICLRRuntimeInfo *info; + + TRACE("(%s, %s, %s, %p)\n", debugstr_w(filename), debugstr_guid(rclsid), debugstr_guid(riid), ppv); + + *ppv = NULL; + + ret = get_runtime_info(NULL, NULL, filename, 0, RUNTIME_INFO_UPGRADE_VERSION, TRUE, &info); + + if (SUCCEEDED(ret)) + { + ret = ICLRRuntimeInfo_GetInterface(info, rclsid, riid, ppv); + + ICLRRuntimeInfo_Release(info); + } + + return ret; } STDAPI ClrCreateManagedInstance(LPCWSTR pTypeName, REFIID riid, void **ppObject)
1
0
0
0
Alistair Leslie-Hughes : dpnet: Stub interface IDirectPlay8LobbyClient.
by Alexandre Julliard
09 Sep '14
09 Sep '14
Module: wine Branch: master Commit: 45c1d7c74584743f2af44486a86b8af933df22e2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=45c1d7c74584743f2af44486a…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon May 12 15:19:03 2014 +1000 dpnet: Stub interface IDirectPlay8LobbyClient. --- dlls/dpnet/client.c | 171 +++++++++++++++++++++++++++++++++++++++++++++ dlls/dpnet/dpnet_main.c | 1 + dlls/dpnet/dpnet_private.h | 1 + dlls/dpnet/tests/client.c | 26 +++++++ 4 files changed, 199 insertions(+) diff --git a/dlls/dpnet/client.c b/dlls/dpnet/client.c index abcc5f7..bf2b8d2 100644 --- a/dlls/dpnet/client.c +++ b/dlls/dpnet/client.c @@ -36,6 +36,17 @@ WINE_DEFAULT_DEBUG_CHANNEL(dpnet); +typedef struct IDirectPlay8LobbyClientImpl +{ + IDirectPlay8LobbyClient IDirectPlay8LobbyClient_iface; + LONG ref; +} IDirectPlay8LobbyClientImpl; + +static inline IDirectPlay8LobbyClientImpl *impl_from_IDirectPlay8LobbyClient(IDirectPlay8LobbyClient *iface) +{ + return CONTAINING_RECORD(iface, IDirectPlay8LobbyClientImpl, IDirectPlay8LobbyClient_iface); +} + static inline IDirectPlay8ClientImpl *impl_from_IDirectPlay8Client(IDirectPlay8Client *iface) { return CONTAINING_RECORD(iface, IDirectPlay8ClientImpl, IDirectPlay8Client_iface); @@ -320,3 +331,163 @@ HRESULT DPNET_CreateDirectPlay8Client(IClassFactory *iface, IUnknown *pUnkOuter, return hr; } + +static HRESULT WINAPI lobbyclient_QueryInterface(IDirectPlay8LobbyClient *iface, REFIID riid, void **obj) +{ + IDirectPlay8LobbyClientImpl *This = impl_from_IDirectPlay8LobbyClient(iface); + + TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), obj); + + *obj = NULL; + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_IDirectPlay8LobbyClient)) + { + *obj = &This->IDirectPlay8LobbyClient_iface; + IUnknown_AddRef( (IUnknown*)*obj); + + return DPN_OK; + } + + WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),obj); + return E_NOINTERFACE; +} + +static ULONG WINAPI lobbyclient_AddRef(IDirectPlay8LobbyClient *iface) +{ + IDirectPlay8LobbyClientImpl *This = impl_from_IDirectPlay8LobbyClient(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p) ref=%u\n", This, ref); + + return ref; +} + +static ULONG WINAPI lobbyclient_Release(IDirectPlay8LobbyClient *iface) +{ + IDirectPlay8LobbyClientImpl *This = impl_from_IDirectPlay8LobbyClient(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p) ref=%u\n", This, ref); + + if (!ref) + { + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + +static HRESULT WINAPI lobbyclient_Initialize(IDirectPlay8LobbyClient *iface, void *context, + PFNDPNMESSAGEHANDLER msghandler, DWORD flags) +{ + IDirectPlay8LobbyClientImpl *This = impl_from_IDirectPlay8LobbyClient(iface); + + FIXME("(%p)->(%p %p 0x%08x)\n", This, context, msghandler, flags); + + return E_NOTIMPL; +} + +static HRESULT WINAPI lobbyclient_EnumLocalPrograms(IDirectPlay8LobbyClient *iface, GUID* guidapplication, + BYTE *enumdata, DWORD *enumDataSize, DWORD *items, DWORD flags) +{ + IDirectPlay8LobbyClientImpl *This = impl_from_IDirectPlay8LobbyClient(iface); + + FIXME("(%p)->(%p %p %p %p 0x%08x)\n", This, guidapplication, enumdata, enumDataSize, items, flags); + + return E_NOTIMPL; +} + +static HRESULT WINAPI lobbyclient_ConnectApplication(IDirectPlay8LobbyClient *iface, DPL_CONNECT_INFO *connectioninfo, + void *connectioncontext, DPNHANDLE *application, DWORD timeout, + DWORD flags) +{ + IDirectPlay8LobbyClientImpl *This = impl_from_IDirectPlay8LobbyClient(iface); + + FIXME("(%p)->(%p %p %p %u 0x%08x)\n", This, connectioninfo, connectioncontext, application, timeout, flags); + + return E_NOTIMPL; +} + +static HRESULT WINAPI lobbyclient_Send(IDirectPlay8LobbyClient *iface, DPNHANDLE connection, BYTE *buffer, DWORD buffersize, DWORD flags) +{ + IDirectPlay8LobbyClientImpl *This = impl_from_IDirectPlay8LobbyClient(iface); + + FIXME("(%p)->(%u %p %u 0x%08x)\n", This, connection, buffer, buffersize, flags); + + return E_NOTIMPL; +} + +static HRESULT WINAPI lobbyclient_ReleaseApplication(IDirectPlay8LobbyClient *iface, DPNHANDLE connection, DWORD flags) +{ + IDirectPlay8LobbyClientImpl *This = impl_from_IDirectPlay8LobbyClient(iface); + + FIXME("(%p)->(%u 0x%08x)\n", This, connection, flags); + + return E_NOTIMPL; +} + +static HRESULT WINAPI lobbyclient_Close(IDirectPlay8LobbyClient *iface, DWORD flags) +{ + IDirectPlay8LobbyClientImpl *This = impl_from_IDirectPlay8LobbyClient(iface); + + FIXME("(%p)->(0x%08x)\n", This, flags); + + return E_NOTIMPL; +} + +static HRESULT WINAPI lobbyclient_GetConnectionSettings(IDirectPlay8LobbyClient *iface, DPNHANDLE connection, DPL_CONNECTION_SETTINGS *sessioninfo, DWORD *infosize, DWORD flags) +{ + IDirectPlay8LobbyClientImpl *This = impl_from_IDirectPlay8LobbyClient(iface); + + FIXME("(%p)->(%u %p %p 0x%08x)\n", This, connection, sessioninfo, infosize, flags); + + return E_NOTIMPL; +} + +static HRESULT WINAPI lobbyclient_SetConnectionSettings(IDirectPlay8LobbyClient *iface, DPNHANDLE connection, const DPL_CONNECTION_SETTINGS *sessioninfo, DWORD flags) +{ + IDirectPlay8LobbyClientImpl *This = impl_from_IDirectPlay8LobbyClient(iface); + + FIXME("(%p)->(%u %p 0x%08x)\n", This, connection, sessioninfo, flags); + + return E_NOTIMPL; +} + +static const IDirectPlay8LobbyClientVtbl DirectPlay8LobbiedClient_Vtbl = +{ + lobbyclient_QueryInterface, + lobbyclient_AddRef, + lobbyclient_Release, + lobbyclient_Initialize, + lobbyclient_EnumLocalPrograms, + lobbyclient_ConnectApplication, + lobbyclient_Send, + lobbyclient_ReleaseApplication, + lobbyclient_Close, + lobbyclient_GetConnectionSettings, + lobbyclient_SetConnectionSettings +}; + +HRESULT DPNET_CreateDirectPlay8LobbyClient(IClassFactory *iface, IUnknown *outer, REFIID riid, void **obj) +{ + IDirectPlay8LobbyClientImpl *client; + HRESULT ret; + + TRACE("%p (%p, %s, %p)\n", iface, outer, debugstr_guid(riid), obj); + + client = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*client)); + if (!client) + { + *obj = NULL; + return E_OUTOFMEMORY; + } + + client->IDirectPlay8LobbyClient_iface.lpVtbl = &DirectPlay8LobbiedClient_Vtbl; + client->ref = 1; + + ret = lobbyclient_QueryInterface(&client->IDirectPlay8LobbyClient_iface, riid, obj); + lobbyclient_Release(&client->IDirectPlay8LobbyClient_iface); + + return ret; +} diff --git a/dlls/dpnet/dpnet_main.c b/dlls/dpnet/dpnet_main.c index 29cbb79..042b95a 100644 --- a/dlls/dpnet/dpnet_main.c +++ b/dlls/dpnet/dpnet_main.c @@ -122,6 +122,7 @@ static IClassFactoryImpl DPNET_CFS[] = { { { &DICF_Vtbl }, 1, &CLSID_DirectPlay8Peer, DPNET_CreateDirectPlay8Peer }, { { &DICF_Vtbl }, 1, &CLSID_DirectPlay8Address, DPNET_CreateDirectPlay8Address }, { { &DICF_Vtbl }, 1, &CLSID_DirectPlay8LobbiedApplication, DPNET_CreateDirectPlay8LobbiedApp }, + { { &DICF_Vtbl }, 1, &CLSID_DirectPlay8LobbyClient, DPNET_CreateDirectPlay8LobbyClient }, { { &DICF_Vtbl }, 1, &CLSID_DirectPlay8ThreadPool, DPNET_CreateDirectPlay8ThreadPool}, { { NULL }, 0, NULL, NULL } }; diff --git a/dlls/dpnet/dpnet_private.h b/dlls/dpnet/dpnet_private.h index 8fd04d6..0c28491 100644 --- a/dlls/dpnet/dpnet_private.h +++ b/dlls/dpnet/dpnet_private.h @@ -105,6 +105,7 @@ extern HRESULT DPNET_CreateDirectPlay8Peer(LPCLASSFACTORY iface, LPUNKNOWN punkO extern HRESULT DPNET_CreateDirectPlay8Address(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN; extern HRESULT DPNET_CreateDirectPlay8LobbiedApp(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN; extern HRESULT DPNET_CreateDirectPlay8ThreadPool(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN; +extern HRESULT DPNET_CreateDirectPlay8LobbyClient(IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, void **ppobj) DECLSPEC_HIDDEN; extern void init_dpn_sp_caps(DPN_SP_CAPS *dpnspcaps) DECLSPEC_HIDDEN; diff --git a/dlls/dpnet/tests/client.c b/dlls/dpnet/tests/client.c index 92bed55..7f10439 100644 --- a/dlls/dpnet/tests/client.c +++ b/dlls/dpnet/tests/client.c @@ -41,6 +41,12 @@ static HRESULT WINAPI DirectPlayLobbyMessageHandler(PVOID context, DWORD message return S_OK; } +static HRESULT WINAPI DirectPlayLobbyClientMessageHandler(void *context, DWORD message_id, void* buffer) +{ + trace("DirectPlayLobbyClientMessageHandler: 0x%08x\n", message_id); + return S_OK; +} + static BOOL test_init_dp(void) { HRESULT hr; @@ -205,6 +211,25 @@ static void test_get_sp_caps(void) "expected 0x10000, got 0x%x\n", caps.dwSystemBufferSize); } +void test_lobbyclient(void) +{ + HRESULT hr; + IDirectPlay8LobbyClient *client = NULL; + + hr = CoCreateInstance( &CLSID_DirectPlay8LobbyClient, NULL, CLSCTX_ALL, &IID_IDirectPlay8LobbyClient, (void**)&client); + ok(hr == S_OK, "Failed to create object\n"); + if(SUCCEEDED(hr)) + { + hr = IDirectPlay8LobbyClient_Initialize(client, NULL, DirectPlayLobbyClientMessageHandler, 0); + todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDirectPlay8LobbyClient_Close(client, 0); + todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + + IDirectPlay8LobbyClient_Release(client); + } +} + static void test_cleanup_dp(void) { HRESULT hr; @@ -233,5 +258,6 @@ START_TEST(client) test_enum_service_providers(); test_enum_hosts(); test_get_sp_caps(); + test_lobbyclient(); test_cleanup_dp(); }
1
0
0
0
Jactry Zeng : mshtml: Add IHTMLStyle::pixelTop property implementation.
by Alexandre Julliard
09 Sep '14
09 Sep '14
Module: wine Branch: master Commit: e402bb5642ba384238586df5dd6e8b4909f9686e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e402bb5642ba384238586df5d…
Author: Jactry Zeng <wine(a)jactry.com> Date: Tue Sep 9 18:50:54 2014 +0800 mshtml: Add IHTMLStyle::pixelTop property implementation. --- dlls/mshtml/htmlstyle.c | 12 ++++++++---- dlls/mshtml/tests/style.c | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 7f82905..52d15f9 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -2460,15 +2460,19 @@ static HRESULT WINAPI HTMLStyle_get_cssText(IHTMLStyle *iface, BSTR *p) static HRESULT WINAPI HTMLStyle_put_pixelTop(IHTMLStyle *iface, LONG v) { HTMLStyle *This = impl_from_IHTMLStyle(iface); - FIXME("(%p)->()\n", This); - return E_NOTIMPL; + + TRACE("(%p)->(%d)\n", This, v); + + return set_style_pxattr(This->nsstyle, STYLEID_TOP, v); } static HRESULT WINAPI HTMLStyle_get_pixelTop(IHTMLStyle *iface, LONG *p) { HTMLStyle *This = impl_from_IHTMLStyle(iface); - FIXME("(%p)->()\n", This); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return get_nsstyle_pixel_val(This, STYLEID_TOP, p); } static HRESULT WINAPI HTMLStyle_put_pixelLeft(IHTMLStyle *iface, LONG v) diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c index eda62ef..40552a4 100644 --- a/dlls/mshtml/tests/style.c +++ b/dlls/mshtml/tests/style.c @@ -1210,6 +1210,17 @@ static void test_body_style(IHTMLStyle *style) f == 4.9f, /* IE8 */ "expected 4.0 or 4.9 (IE8) got %f\n", f); + hres = IHTMLStyle_put_pixelTop(style, 6); + ok(hres == S_OK, "put_pixelTop failed: %08x\n", hres); + + l = 0xdeadbeef; + hres = IHTMLStyle_get_pixelTop(style, &l); + ok(hres == S_OK, "get_pixelTop failed: %08x\n", hres); + ok(l == 6, "pixelTop = %d\n", l); + + hres = IHTMLStyle_get_pixelTop(style, NULL); + ok(hres == E_POINTER, "get_pixelTop failed: %08x\n", hres); + V_VT(&v) = VT_BSTR; V_BSTR(&v) = a2bstr("3px"); hres = IHTMLStyle_put_top(style, v); @@ -1227,6 +1238,11 @@ static void test_body_style(IHTMLStyle *style) ok(hres == S_OK, "get_posTop failed: %08x\n", hres); ok(f == 3.0, "expected 3.0 got %f\n", f); + l = 0xdeadbeef; + hres = IHTMLStyle_get_pixelTop(style, &l); + ok(hres == S_OK, "get_pixelTop failed: %08x\n", hres); + ok(l == 3, "pixelTop = %d\n", l); + V_VT(&v) = VT_NULL; hres = IHTMLStyle_put_top(style, v); ok(hres == S_OK, "put_top failed: %08x\n", hres); @@ -1238,6 +1254,11 @@ static void test_body_style(IHTMLStyle *style) ok(!V_BSTR(&v), "V_BSTR(v) != NULL\n"); VariantClear(&v); + l = 0xdeadbeef; + hres = IHTMLStyle_get_pixelTop(style, &l); + ok(hres == S_OK, "get_pixelTop failed: %08x\n", hres); + ok(!l, "pixelTop = %d\n", l); + /* Test posHeight */ hres = IHTMLStyle_get_posHeight(style, NULL); ok(hres == E_POINTER, "get_posHeight failed: %08x\n", hres);
1
0
0
0
Jactry Zeng : mshtml: Add IHTMLStyle::pixelHeight property implementation.
by Alexandre Julliard
09 Sep '14
09 Sep '14
Module: wine Branch: master Commit: 042b881b27de43ea8285424bba1d551e70675e44 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=042b881b27de43ea8285424bb…
Author: Jactry Zeng <wine(a)jactry.com> Date: Tue Sep 9 18:50:46 2014 +0800 mshtml: Add IHTMLStyle::pixelHeight property implementation. --- dlls/mshtml/htmlstyle.c | 12 ++++++++---- dlls/mshtml/tests/style.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 270f1fa..7f82905 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -2510,15 +2510,19 @@ static HRESULT WINAPI HTMLStyle_get_pixelWidth(IHTMLStyle *iface, LONG *p) static HRESULT WINAPI HTMLStyle_put_pixelHeight(IHTMLStyle *iface, LONG v) { HTMLStyle *This = impl_from_IHTMLStyle(iface); - FIXME("(%p)->()\n", This); - return E_NOTIMPL; + + TRACE("(%p)->(%d)\n", This, v); + + return set_style_pxattr(This->nsstyle, STYLEID_HEIGHT, v); } static HRESULT WINAPI HTMLStyle_get_pixelHeight(IHTMLStyle *iface, LONG *p) { HTMLStyle *This = impl_from_IHTMLStyle(iface); - FIXME("(%p)->()\n", This); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return get_nsstyle_pixel_val(This, STYLEID_HEIGHT, p); } static HRESULT WINAPI HTMLStyle_put_posTop(IHTMLStyle *iface, float v) diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c index 2a22f2f..eda62ef 100644 --- a/dlls/mshtml/tests/style.c +++ b/dlls/mshtml/tests/style.c @@ -1254,6 +1254,11 @@ static void test_body_style(IHTMLStyle *style) ok(hres == S_OK, "get_posHeight failed: %08x\n", hres); ok(f == 0.0, "expected 0.0 got %f\n", f); + l = 0xdeadbeef; + hres = IHTMLStyle_get_pixelHeight(style, &l); + ok(hres == S_OK, "get_pixelHeight failed: %08x\n", hres); + ok(!l, "pixelHeight = %d\n", l); + hres = IHTMLStyle_put_posHeight(style, 4.9f); ok(hres == S_OK, "put_posHeight failed: %08x\n", hres); @@ -1263,6 +1268,13 @@ static void test_body_style(IHTMLStyle *style) f == 4.9f, /* IE8 */ "expected 4.0 or 4.9 (IE8) got %f\n", f); + l = 0xdeadbeef; + hres = IHTMLStyle_get_pixelHeight(style, &l); + ok(hres == S_OK, "get_pixelHeight failed: %08x\n", hres); + ok(l == 4 || + l == 5, /* IE8 */ + "pixelHeight = %d\n", l); + V_VT(&v) = VT_BSTR; V_BSTR(&v) = a2bstr("70px"); hres = IHTMLStyle_put_height(style, v); @@ -1276,6 +1288,11 @@ static void test_body_style(IHTMLStyle *style) ok(!strcmp_wa(V_BSTR(&v), "70px"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v))); VariantClear(&v); + l = 0xdeadbeef; + hres = IHTMLStyle_get_pixelHeight(style, &l); + ok(hres == S_OK, "get_pixelHeight failed: %08x\n", hres); + ok(l == 70, "pixelHeight = %d\n", l); + V_VT(&v) = VT_BSTR; V_BSTR(&v) = NULL; hres = IHTMLStyle_put_height(style, v); @@ -1289,6 +1306,22 @@ static void test_body_style(IHTMLStyle *style) ok(!V_BSTR(&v), "V_BSTR(v) = %s, expected NULL\n", wine_dbgstr_w(V_BSTR(&v))); VariantClear(&v); + l = 0xdeadbeef; + hres = IHTMLStyle_get_pixelHeight(style, &l); + ok(hres == S_OK, "get_pixelHeight failed: %08x\n", hres); + ok(!l, "pixelHeight = %d\n", l); + + hres = IHTMLStyle_put_pixelHeight(style, 50); + ok(hres == S_OK, "put_pixelHeight failed: %08x\n", hres); + + l = 0xdeadbeef; + hres = IHTMLStyle_get_pixelHeight(style, &l); + ok(hres == S_OK, "get_pixelHeight failed: %08x\n", hres); + ok(l == 50, "pixelHeight = %d\n", l); + + hres = IHTMLStyle_get_pixelHeight(style, NULL); + ok(hres == E_POINTER, "get_pixelHeight failed: %08x\n", hres); + V_VT(&v) = VT_I4; V_I4(&v) = 64; hres = IHTMLStyle_put_height(style, v); @@ -1305,6 +1338,11 @@ static void test_body_style(IHTMLStyle *style) ok(hres == S_OK, "get_posHeight failed: %08x\n", hres); ok(f == 64.0, "expected 64.0 got %f\n", f); + l = 0xdeadbeef; + hres = IHTMLStyle_get_pixelHeight(style, &l); + ok(hres == S_OK, "get_pixelHeight failed: %08x\n", hres); + ok(l == 64, "pixelHeight = %d\n", l); + str = (void*)0xdeadbeef; hres = IHTMLStyle_get_cursor(style, &str); ok(hres == S_OK, "get_cursor failed: %08x\n", hres);
1
0
0
0
Jactry Zeng : mshtml: Add IHTMLStyle::get_pixelWidth implementation.
by Alexandre Julliard
09 Sep '14
09 Sep '14
Module: wine Branch: master Commit: 7152077b050c2bb3092c8447ba9b129cb05db4c2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7152077b050c2bb3092c8447b…
Author: Jactry Zeng <wine(a)jactry.com> Date: Tue Sep 9 18:50:36 2014 +0800 mshtml: Add IHTMLStyle::get_pixelWidth implementation. --- dlls/mshtml/htmlstyle.c | 6 ++++-- dlls/mshtml/tests/style.c | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 170db72..270f1fa 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -2501,8 +2501,10 @@ static HRESULT WINAPI HTMLStyle_put_pixelWidth(IHTMLStyle *iface, LONG v) static HRESULT WINAPI HTMLStyle_get_pixelWidth(IHTMLStyle *iface, LONG *p) { HTMLStyle *This = impl_from_IHTMLStyle(iface); - FIXME("(%p)->()\n", This); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return get_nsstyle_pixel_val(This, STYLEID_WIDTH, p); } static HRESULT WINAPI HTMLStyle_put_pixelHeight(IHTMLStyle *iface, LONG v) diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c index 64b4fe9..2a22f2f 100644 --- a/dlls/mshtml/tests/style.c +++ b/dlls/mshtml/tests/style.c @@ -963,6 +963,11 @@ static void test_body_style(IHTMLStyle *style) f == 2.2f, /* IE8 */ "f = %f\n", f); + l = 0xdeadbeef; + hres = IHTMLStyle_get_pixelWidth(style, &l); + ok(hres == S_OK, "get_pixelWidth failed: %08x\n", hres); + ok(l == 2, "pixelWidth = %d\n", l); + V_VT(&v) = VT_BSTR; V_BSTR(&v) = a2bstr("auto"); hres = IHTMLStyle_put_width(style, v); @@ -981,6 +986,11 @@ static void test_body_style(IHTMLStyle *style) hres = IHTMLStyle_put_width(style, v); ok(hres == S_OK, "put_width failed: %08x\n", hres); + l = 0xdeadbeef; + hres = IHTMLStyle_get_pixelWidth(style, &l); + ok(hres == S_OK, "get_pixelWidth failed: %08x\n", hres); + ok(l == 100, "pixelWidth = %d\n", l); + V_VT(&v) = VT_EMPTY; hres = IHTMLStyle_get_width(style, &v); ok(hres == S_OK, "get_width failed: %08x\n", hres); @@ -991,6 +1001,14 @@ static void test_body_style(IHTMLStyle *style) hres = IHTMLStyle_put_pixelWidth(style, 50); ok(hres == S_OK, "put_pixelWidth failed: %08x\n", hres); + l = 0xdeadbeef; + hres = IHTMLStyle_get_pixelWidth(style, &l); + ok(hres == S_OK, "get_pixelWidth failed: %08x\n", hres); + ok(l == 50, "pixelWidth = %d\n", l); + + hres = IHTMLStyle_get_pixelWidth(style, NULL); + ok(hres == E_POINTER, "get_pixelWidth failed: %08x\n", hres); + V_VT(&v) = VT_EMPTY; hres = IHTMLStyle_get_width(style, &v); ok(hres == S_OK, "get_width failed: %08x\n", hres);
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
31
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
Results per page:
10
25
50
100
200