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
March
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 2009
----- 2025 -----
March 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
866 discussions
Start a n
N
ew thread
Alistair Leslie-Hughes : mshtml: Implement IHTMLCurrentStyle_get_paddingBottom.
by Alexandre Julliard
15 Sep '09
15 Sep '09
Module: wine Branch: master Commit: 7f3cb81686813f8b7c190fe06db682cf06d0aae2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7f3cb81686813f8b7c190fe06…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon Sep 14 21:15:31 2009 +1000 mshtml: Implement IHTMLCurrentStyle_get_paddingBottom. --- dlls/mshtml/htmlcurstyle.c | 4 ++-- dlls/mshtml/htmlstyle.c | 3 +++ dlls/mshtml/htmlstyle.h | 1 + dlls/mshtml/tests/dom.c | 5 +++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlcurstyle.c b/dlls/mshtml/htmlcurstyle.c index 6d28495..cc17ec9 100644 --- a/dlls/mshtml/htmlcurstyle.c +++ b/dlls/mshtml/htmlcurstyle.c @@ -357,8 +357,8 @@ static HRESULT WINAPI HTMLCurrentStyle_get_paddingRight(IHTMLCurrentStyle *iface static HRESULT WINAPI HTMLCurrentStyle_get_paddingBottom(IHTMLCurrentStyle *iface, VARIANT *p) { HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, p); + return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_BOTTOM, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_textAlign(IHTMLCurrentStyle *iface, BSTR *p) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 8da9c21..698dff1 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -115,6 +115,8 @@ static const WCHAR attrMinHeight[] = {'m','i','n','-','h','e','i','g','h','t',0}; static const WCHAR attrOverflow[] = {'o','v','e','r','f','l','o','w',0}; +static const WCHAR attrPaddingBottom[] = + {'p','a','d','d','i','n','g','-','b','o','t','t','o','m',0}; static const WCHAR attrPaddingLeft[] = {'p','a','d','d','i','n','g','-','l','e','f','t',0}; static const WCHAR attrPaddingRight[] = @@ -186,6 +188,7 @@ static const struct{ {attrMarginRight, DISPID_IHTMLSTYLE_MARGINRIGHT}, {attrMinHeight, DISPID_IHTMLSTYLE4_MINHEIGHT}, {attrOverflow, DISPID_IHTMLSTYLE_OVERFLOW}, + {attrPaddingBottom, DISPID_IHTMLSTYLE_PADDINGBOTTOM}, {attrPaddingLeft, DISPID_IHTMLSTYLE_PADDINGLEFT}, {attrPaddingRight, DISPID_IHTMLSTYLE_PADDINGRIGHT}, {attrPaddingTop, DISPID_IHTMLSTYLE_PADDINGTOP}, diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index 3a77667..03ee72a 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -75,6 +75,7 @@ typedef enum { STYLEID_MARGIN_RIGHT, STYLEID_MIN_HEIGHT, STYLEID_OVERFLOW, + STYLEID_PADDING_BOTTOM, STYLEID_PADDING_LEFT, STYLEID_PADDING_RIGHT, STYLEID_PADDING_TOP, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 2d646e8..37790f5 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2766,6 +2766,11 @@ static void test_current_style(IHTMLCurrentStyle *current_style) ok(hres == S_OK, "get_paddingRight failed: %08x\n", hres); ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v)); VariantClear(&v); + + hres = IHTMLCurrentStyle_get_paddingBottom(current_style, &v); + ok(hres == S_OK, "get_paddingRight failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v)); + VariantClear(&v); } static void test_style2(IHTMLStyle2 *style2)
1
0
0
0
Alistair Leslie-Hughes : mshtml: Implement IHTMLCurrentStyle_get_paddingRight.
by Alexandre Julliard
15 Sep '09
15 Sep '09
Module: wine Branch: master Commit: 9a2a02fde9a304859c0f97b8d527a450feaca221 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9a2a02fde9a304859c0f97b8d…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon Sep 14 21:13:12 2009 +1000 mshtml: Implement IHTMLCurrentStyle_get_paddingRight. --- dlls/mshtml/htmlcurstyle.c | 4 ++-- dlls/mshtml/htmlstyle.c | 3 +++ dlls/mshtml/htmlstyle.h | 1 + dlls/mshtml/tests/dom.c | 5 +++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlcurstyle.c b/dlls/mshtml/htmlcurstyle.c index 74cb3e2..6d28495 100644 --- a/dlls/mshtml/htmlcurstyle.c +++ b/dlls/mshtml/htmlcurstyle.c @@ -350,8 +350,8 @@ static HRESULT WINAPI HTMLCurrentStyle_get_paddingTop(IHTMLCurrentStyle *iface, static HRESULT WINAPI HTMLCurrentStyle_get_paddingRight(IHTMLCurrentStyle *iface, VARIANT *p) { HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, p); + return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_RIGHT, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_paddingBottom(IHTMLCurrentStyle *iface, VARIANT *p) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 5d4647f..8da9c21 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -117,6 +117,8 @@ static const WCHAR attrOverflow[] = {'o','v','e','r','f','l','o','w',0}; static const WCHAR attrPaddingLeft[] = {'p','a','d','d','i','n','g','-','l','e','f','t',0}; +static const WCHAR attrPaddingRight[] = + {'p','a','d','d','i','n','g','-','r','i','g','h','t',0}; static const WCHAR attrPaddingTop[] = {'p','a','d','d','i','n','g','-','t','o','p',0}; static const WCHAR attrPosition[] = @@ -185,6 +187,7 @@ static const struct{ {attrMinHeight, DISPID_IHTMLSTYLE4_MINHEIGHT}, {attrOverflow, DISPID_IHTMLSTYLE_OVERFLOW}, {attrPaddingLeft, DISPID_IHTMLSTYLE_PADDINGLEFT}, + {attrPaddingRight, DISPID_IHTMLSTYLE_PADDINGRIGHT}, {attrPaddingTop, DISPID_IHTMLSTYLE_PADDINGTOP}, {attrPosition, DISPID_IHTMLSTYLE2_POSITION}, {attrTextAlign, DISPID_IHTMLSTYLE_TEXTALIGN}, diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index 7fe5f5e..3a77667 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -76,6 +76,7 @@ typedef enum { STYLEID_MIN_HEIGHT, STYLEID_OVERFLOW, STYLEID_PADDING_LEFT, + STYLEID_PADDING_RIGHT, STYLEID_PADDING_TOP, STYLEID_POSITION, STYLEID_TEXT_ALIGN, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 04da7ec..2d646e8 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2761,6 +2761,11 @@ static void test_current_style(IHTMLCurrentStyle *current_style) ok(hres == S_OK, "get_paddingTop failed: %08x\n", hres); ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v)); VariantClear(&v); + + hres = IHTMLCurrentStyle_get_paddingRight(current_style, &v); + ok(hres == S_OK, "get_paddingRight failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v)); + VariantClear(&v); } static void test_style2(IHTMLStyle2 *style2)
1
0
0
0
Alistair Leslie-Hughes : mshtml: Implement IHTMLCurrentStyle_get_paddingTop .
by Alexandre Julliard
15 Sep '09
15 Sep '09
Module: wine Branch: master Commit: e5b3b26573bc0fe992b5d3876196882e5226d423 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e5b3b26573bc0fe992b5d3876…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon Sep 14 21:05:54 2009 +1000 mshtml: Implement IHTMLCurrentStyle_get_paddingTop. --- dlls/mshtml/htmlcurstyle.c | 4 ++-- dlls/mshtml/htmlstyle.c | 3 +++ dlls/mshtml/htmlstyle.h | 1 + dlls/mshtml/tests/dom.c | 5 +++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlcurstyle.c b/dlls/mshtml/htmlcurstyle.c index 5a786ef..74cb3e2 100644 --- a/dlls/mshtml/htmlcurstyle.c +++ b/dlls/mshtml/htmlcurstyle.c @@ -343,8 +343,8 @@ static HRESULT WINAPI HTMLCurrentStyle_get_paddingLeft(IHTMLCurrentStyle *iface, static HRESULT WINAPI HTMLCurrentStyle_get_paddingTop(IHTMLCurrentStyle *iface, VARIANT *p) { HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, p); + return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_TOP, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_paddingRight(IHTMLCurrentStyle *iface, VARIANT *p) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 56d9271..5d4647f 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -117,6 +117,8 @@ static const WCHAR attrOverflow[] = {'o','v','e','r','f','l','o','w',0}; static const WCHAR attrPaddingLeft[] = {'p','a','d','d','i','n','g','-','l','e','f','t',0}; +static const WCHAR attrPaddingTop[] = + {'p','a','d','d','i','n','g','-','t','o','p',0}; static const WCHAR attrPosition[] = {'p','o','s','i','t','i','o','n',0}; static const WCHAR attrTextAlign[] = @@ -183,6 +185,7 @@ static const struct{ {attrMinHeight, DISPID_IHTMLSTYLE4_MINHEIGHT}, {attrOverflow, DISPID_IHTMLSTYLE_OVERFLOW}, {attrPaddingLeft, DISPID_IHTMLSTYLE_PADDINGLEFT}, + {attrPaddingTop, DISPID_IHTMLSTYLE_PADDINGTOP}, {attrPosition, DISPID_IHTMLSTYLE2_POSITION}, {attrTextAlign, DISPID_IHTMLSTYLE_TEXTALIGN}, {attrTextDecoration, DISPID_IHTMLSTYLE_TEXTDECORATION}, diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index 0d0d9c8..7fe5f5e 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -76,6 +76,7 @@ typedef enum { STYLEID_MIN_HEIGHT, STYLEID_OVERFLOW, STYLEID_PADDING_LEFT, + STYLEID_PADDING_TOP, STYLEID_POSITION, STYLEID_TEXT_ALIGN, STYLEID_TEXT_DECORATION, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index d4e04de..04da7ec 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2756,6 +2756,11 @@ static void test_current_style(IHTMLCurrentStyle *current_style) ok(hres == S_OK, "get_borderBottomColor failed: %08x\n", hres); ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v)); VariantClear(&v); + + hres = IHTMLCurrentStyle_get_paddingTop(current_style, &v); + ok(hres == S_OK, "get_paddingTop failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v)); + VariantClear(&v); } static void test_style2(IHTMLStyle2 *style2)
1
0
0
0
Alistair Leslie-Hughes : mshtml: Implement IHTMLCurrentStyle_get_borderBottomColor.
by Alexandre Julliard
15 Sep '09
15 Sep '09
Module: wine Branch: master Commit: b80faba1683a1e21d17aad5ed28f673afd0af17c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b80faba1683a1e21d17aad5ed…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon Sep 14 20:57:18 2009 +1000 mshtml: Implement IHTMLCurrentStyle_get_borderBottomColor. --- dlls/mshtml/htmlcurstyle.c | 4 ++-- dlls/mshtml/htmlstyle.c | 3 +++ dlls/mshtml/htmlstyle.h | 1 + dlls/mshtml/tests/dom.c | 5 +++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlcurstyle.c b/dlls/mshtml/htmlcurstyle.c index f1a4068..5a786ef 100644 --- a/dlls/mshtml/htmlcurstyle.c +++ b/dlls/mshtml/htmlcurstyle.c @@ -245,8 +245,8 @@ static HRESULT WINAPI HTMLCurrentStyle_get_borderRightColor(IHTMLCurrentStyle *i static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomColor(IHTMLCurrentStyle *iface, VARIANT *p) { HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, p); + return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_COLOR, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_borderTopStyle(IHTMLCurrentStyle *iface, BSTR *p) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 00184ca..56d9271 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -49,6 +49,8 @@ static const WCHAR attrBackgroundRepeat[] = {'b','a','c','k','g','r','o','u','n','d','-','r','e','p','e','a','t',0}; static const WCHAR attrBorder[] = {'b','o','r','d','e','r',0}; +static const WCHAR attrBorderBottomColor[] = + {'b','o','r','d','e','r','-','b','o','t','t','o','m','-','c','o','l','o','r',0}; static const WCHAR attrBorderBottomStyle[] = {'b','o','r','d','e','r','-','b','o','t','t','o','m','-','s','t','y','l','e',0}; static const WCHAR attrBorderBottomWidth[] = @@ -147,6 +149,7 @@ static const struct{ {attrBackgroundPositionY, DISPID_IHTMLSTYLE_BACKGROUNDPOSITIONY}, {attrBackgroundRepeat, DISPID_IHTMLSTYLE_BACKGROUNDREPEAT}, {attrBorder, DISPID_IHTMLSTYLE_BORDER}, + {attrBorderBottomColor, DISPID_IHTMLSTYLE_BORDERBOTTOMCOLOR}, {attrBorderBottomStyle, DISPID_IHTMLSTYLE_BORDERBOTTOMSTYLE}, {attrBorderBottomWidth, DISPID_IHTMLSTYLE_BORDERBOTTOMWIDTH}, {attrBorderColor, DISPID_IHTMLSTYLE_BORDERCOLOR}, diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index ef194a0..0d0d9c8 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -42,6 +42,7 @@ typedef enum { STYLEID_BACKGROUND_POSITION_Y, STYLEID_BACKGROUND_REPEAT, STYLEID_BORDER, + STYLEID_BORDER_BOTTOM_COLOR, STYLEID_BORDER_BOTTOM_STYLE, STYLEID_BORDER_BOTTOM_WIDTH, STYLEID_BORDER_COLOR, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 882f706..d4e04de 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2751,6 +2751,11 @@ static void test_current_style(IHTMLCurrentStyle *current_style) ok(hres == S_OK, "get_borderRightColor failed: %08x\n", hres); ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v)); VariantClear(&v); + + hres = IHTMLCurrentStyle_get_borderBottomColor(current_style, &v); + ok(hres == S_OK, "get_borderBottomColor failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v)); + VariantClear(&v); } static void test_style2(IHTMLStyle2 *style2)
1
0
0
0
Alistair Leslie-Hughes : mshtml: Implement IHTMLCurrentStyle_get_borderRightColor.
by Alexandre Julliard
15 Sep '09
15 Sep '09
Module: wine Branch: master Commit: bf5ab29c1c42481d353a46b7978d37b715cd3f98 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bf5ab29c1c42481d353a46b79…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon Sep 14 20:46:39 2009 +1000 mshtml: Implement IHTMLCurrentStyle_get_borderRightColor. --- dlls/mshtml/htmlcurstyle.c | 4 ++-- dlls/mshtml/htmlstyle.c | 3 +++ dlls/mshtml/htmlstyle.h | 1 + dlls/mshtml/tests/dom.c | 5 +++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlcurstyle.c b/dlls/mshtml/htmlcurstyle.c index a45f3ee..f1a4068 100644 --- a/dlls/mshtml/htmlcurstyle.c +++ b/dlls/mshtml/htmlcurstyle.c @@ -238,8 +238,8 @@ static HRESULT WINAPI HTMLCurrentStyle_get_borderTopColor(IHTMLCurrentStyle *ifa static HRESULT WINAPI HTMLCurrentStyle_get_borderRightColor(IHTMLCurrentStyle *iface, VARIANT *p) { HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, p); + return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_COLOR, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomColor(IHTMLCurrentStyle *iface, VARIANT *p) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index b245778..00184ca 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -63,6 +63,8 @@ static const WCHAR attrBorderLeftStyle[] = {'b','o','r','d','e','r','-','l','e','f','t','-','s','t','y','l','e',0}; static const WCHAR attrBorderLeftWidth[] = {'b','o','r','d','e','r','-','l','e','f','t','-','w','i','d','t','h',0}; +static const WCHAR attrBorderRightColor[] = + {'b','o','r','d','e','r','-','r','i','g','h','t','-','c','o','l','o','r',0}; static const WCHAR attrBorderRightStyle[] = {'b','o','r','d','e','r','-','r','i','g','h','t','-','s','t','y','l','e',0}; static const WCHAR attrBorderRightWidth[] = @@ -152,6 +154,7 @@ static const struct{ {attrBorderLeftColor, DISPID_IHTMLSTYLE_BORDERLEFTCOLOR}, {attrBorderLeftStyle, DISPID_IHTMLSTYLE_BORDERLEFTSTYLE}, {attrBorderLeftWidth, DISPID_IHTMLSTYLE_BORDERLEFTWIDTH}, + {attrBorderRightColor, DISPID_IHTMLSTYLE_BORDERRIGHTCOLOR}, {attrBorderRightStyle, DISPID_IHTMLSTYLE_BORDERRIGHTSTYLE}, {attrBorderRightWidth, DISPID_IHTMLSTYLE_BORDERRIGHTWIDTH}, {attrBorderStyle, DISPID_IHTMLSTYLE_BORDERSTYLE}, diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index ee9f18c..ef194a0 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -49,6 +49,7 @@ typedef enum { STYLEID_BORDER_LEFT_COLOR, STYLEID_BORDER_LEFT_STYLE, STYLEID_BORDER_LEFT_WIDTH, + STYLEID_BORDER_RIGHT_COLOR, STYLEID_BORDER_RIGHT_STYLE, STYLEID_BORDER_RIGHT_WIDTH, STYLEID_BORDER_STYLE, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index e9059ea..882f706 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2746,6 +2746,11 @@ static void test_current_style(IHTMLCurrentStyle *current_style) ok(hres == S_OK, "get_borderTopColor failed: %08x\n", hres); ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v)); VariantClear(&v); + + hres = IHTMLCurrentStyle_get_borderRightColor(current_style, &v); + ok(hres == S_OK, "get_borderRightColor failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v)); + VariantClear(&v); } static void test_style2(IHTMLStyle2 *style2)
1
0
0
0
Alistair Leslie-Hughes : mshtml: Implement IHTMLCurrentStyle_get_borderTopColor.
by Alexandre Julliard
15 Sep '09
15 Sep '09
Module: wine Branch: master Commit: 04da6200e852d30b77543dd8f018a065000f4f3e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=04da6200e852d30b77543dd8f…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon Sep 14 20:44:29 2009 +1000 mshtml: Implement IHTMLCurrentStyle_get_borderTopColor. --- dlls/mshtml/htmlcurstyle.c | 4 ++-- dlls/mshtml/htmlstyle.c | 3 +++ dlls/mshtml/htmlstyle.h | 1 + dlls/mshtml/tests/dom.c | 5 +++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlcurstyle.c b/dlls/mshtml/htmlcurstyle.c index 19eb36e..a45f3ee 100644 --- a/dlls/mshtml/htmlcurstyle.c +++ b/dlls/mshtml/htmlcurstyle.c @@ -231,8 +231,8 @@ static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftColor(IHTMLCurrentStyle *if static HRESULT WINAPI HTMLCurrentStyle_get_borderTopColor(IHTMLCurrentStyle *iface, VARIANT *p) { HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, p); + return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_COLOR, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_borderRightColor(IHTMLCurrentStyle *iface, VARIANT *p) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index aadcd65..b245778 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -67,6 +67,8 @@ static const WCHAR attrBorderRightStyle[] = {'b','o','r','d','e','r','-','r','i','g','h','t','-','s','t','y','l','e',0}; static const WCHAR attrBorderRightWidth[] = {'b','o','r','d','e','r','-','r','i','g','h','t','-','w','i','d','t','h',0}; +static const WCHAR attrBorderTopColor[] = + {'b','o','r','d','e','r','-','t','o','p','-','c','o','l','o','r',0}; static const WCHAR attrBorderStyle[] = {'b','o','r','d','e','r','-','s','t','y','l','e',0}; static const WCHAR attrBorderTopStyle[] = @@ -153,6 +155,7 @@ static const struct{ {attrBorderRightStyle, DISPID_IHTMLSTYLE_BORDERRIGHTSTYLE}, {attrBorderRightWidth, DISPID_IHTMLSTYLE_BORDERRIGHTWIDTH}, {attrBorderStyle, DISPID_IHTMLSTYLE_BORDERSTYLE}, + {attrBorderTopColor, DISPID_IHTMLSTYLE_BORDERTOPCOLOR}, {attrBorderTopStyle, DISPID_IHTMLSTYLE_BORDERTOPSTYLE}, {attrBorderTopWidth, DISPID_IHTMLSTYLE_BORDERTOPWIDTH}, {attrBorderWidth, DISPID_IHTMLSTYLE_BORDERWIDTH}, diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index c3df238..ee9f18c 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -52,6 +52,7 @@ typedef enum { STYLEID_BORDER_RIGHT_STYLE, STYLEID_BORDER_RIGHT_WIDTH, STYLEID_BORDER_STYLE, + STYLEID_BORDER_TOP_COLOR, STYLEID_BORDER_TOP_STYLE, STYLEID_BORDER_TOP_WIDTH, STYLEID_BORDER_WIDTH, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index ea38b40..e9059ea 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2741,6 +2741,11 @@ static void test_current_style(IHTMLCurrentStyle *current_style) ok(hres == S_OK, "get_borderLeftColor failed: %08x\n", hres); ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v)); VariantClear(&v); + + hres = IHTMLCurrentStyle_get_borderTopColor(current_style, &v); + ok(hres == S_OK, "get_borderTopColor failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v)); + VariantClear(&v); } static void test_style2(IHTMLStyle2 *style2)
1
0
0
0
Alistair Leslie-Hughes : mshtml: Implement IHTMLCurrentStyle_get_borderLeftColor.
by Alexandre Julliard
15 Sep '09
15 Sep '09
Module: wine Branch: master Commit: 144cf8d61355c54b8ac6a762f7d295419c4fa900 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=144cf8d61355c54b8ac6a762f…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon Sep 14 20:41:22 2009 +1000 mshtml: Implement IHTMLCurrentStyle_get_borderLeftColor. --- dlls/mshtml/htmlcurstyle.c | 4 ++-- dlls/mshtml/htmlstyle.c | 3 +++ dlls/mshtml/htmlstyle.h | 1 + dlls/mshtml/tests/dom.c | 5 +++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlcurstyle.c b/dlls/mshtml/htmlcurstyle.c index d622239..19eb36e 100644 --- a/dlls/mshtml/htmlcurstyle.c +++ b/dlls/mshtml/htmlcurstyle.c @@ -224,8 +224,8 @@ static HRESULT WINAPI HTMLCurrentStyle_get_backgroundRepeat(IHTMLCurrentStyle *i static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftColor(IHTMLCurrentStyle *iface, VARIANT *p) { HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, p); + return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_COLOR, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_borderTopColor(IHTMLCurrentStyle *iface, VARIANT *p) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index c2cfa43..aadcd65 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -57,6 +57,8 @@ static const WCHAR attrBorderColor[] = {'b','o','r','d','e','r','-','c','o','l','o','r',0}; static const WCHAR attrBorderLeft[] = {'b','o','r','d','e','r','-','l','e','f','t',0}; +static const WCHAR attrBorderLeftColor[] = + {'b','o','r','d','e','r','-','l','e','f','t','-','c','o','l','o','r',0}; static const WCHAR attrBorderLeftStyle[] = {'b','o','r','d','e','r','-','l','e','f','t','-','s','t','y','l','e',0}; static const WCHAR attrBorderLeftWidth[] = @@ -145,6 +147,7 @@ static const struct{ {attrBorderBottomWidth, DISPID_IHTMLSTYLE_BORDERBOTTOMWIDTH}, {attrBorderColor, DISPID_IHTMLSTYLE_BORDERCOLOR}, {attrBorderLeft, DISPID_IHTMLSTYLE_BORDERLEFT}, + {attrBorderLeftColor, DISPID_IHTMLSTYLE_BORDERLEFTCOLOR}, {attrBorderLeftStyle, DISPID_IHTMLSTYLE_BORDERLEFTSTYLE}, {attrBorderLeftWidth, DISPID_IHTMLSTYLE_BORDERLEFTWIDTH}, {attrBorderRightStyle, DISPID_IHTMLSTYLE_BORDERRIGHTSTYLE}, diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index b691804..c3df238 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -46,6 +46,7 @@ typedef enum { STYLEID_BORDER_BOTTOM_WIDTH, STYLEID_BORDER_COLOR, STYLEID_BORDER_LEFT, + STYLEID_BORDER_LEFT_COLOR, STYLEID_BORDER_LEFT_STYLE, STYLEID_BORDER_LEFT_WIDTH, STYLEID_BORDER_RIGHT_STYLE, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index bdf859f..ea38b40 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2736,6 +2736,11 @@ static void test_current_style(IHTMLCurrentStyle *current_style) ok(hres == S_OK, "get_backgroundColor failed: %08x\n", hres); ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v)); VariantClear(&v); + + hres = IHTMLCurrentStyle_get_borderLeftColor(current_style, &v); + ok(hres == S_OK, "get_borderLeftColor failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v)); + VariantClear(&v); } static void test_style2(IHTMLStyle2 *style2)
1
0
0
0
Nikolay Sivov : comctl32/dpa: Fix DPA_Merge() test failures on old 4. 7x comctl32.
by Alexandre Julliard
15 Sep '09
15 Sep '09
Module: wine Branch: master Commit: d82fb3d308b9b43a069eef8beac188a11fcee474 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d82fb3d308b9b43a069eef8be…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sun Sep 13 21:56:48 2009 +0400 comctl32/dpa: Fix DPA_Merge() test failures on old 4.7x comctl32. --- dlls/comctl32/tests/dpa.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/tests/dpa.c b/dlls/comctl32/tests/dpa.c index 1ba4c67..6acb55b 100644 --- a/dlls/comctl32/tests/dpa.c +++ b/dlls/comctl32/tests/dpa.c @@ -433,11 +433,15 @@ static void test_DPA_Merge(void) pDPA_Merge(dpa2, dpa, DPAM_UNION, CB_CmpLT, CB_MergeInsertSrc, 0xdeadbeef); rc = CheckDPA(dpa2, 0x123456, &dw); - ok(rc, "dw=0x%x\n", dw); + ok(rc || + broken(!rc && dw == 0x23456), /* 4.7x */ + "dw=0x%x\n", dw); expect(0, nMessages[DPAMM_MERGE]); expect(0, nMessages[DPAMM_DELETE]); - expect(3, nMessages[DPAMM_INSERT]); + ok(nMessages[DPAMM_INSERT] == 3 || + broken(nMessages[DPAMM_INSERT] == 2), /* 4.7x */ + "Expected 3, got %d\n", nMessages[DPAMM_INSERT]); /* Merge dpa3 into dpa2 and dpa */ memset(nMessages, 0, sizeof(nMessages)); @@ -458,7 +462,9 @@ static void test_DPA_Merge(void) CB_CmpLT, CB_MergeInsertSrc, 0xdeadbeef); expect(3, nMessages[DPAMM_MERGE]); expect(0, nMessages[DPAMM_DELETE]); - expect(3, nMessages[DPAMM_INSERT]); + ok(nMessages[DPAMM_INSERT] == 3 || + broken(nMessages[DPAMM_INSERT] == 2), /* 4.7x */ + "Expected 3, got %d\n", nMessages[DPAMM_INSERT]); rc = CheckDPA(dpa, 0x123456, &dw); ok(rc, "dw=0x%x\n", dw);
1
0
0
0
Nikolay Sivov : comctl32/dpa: Implement DPA_GetSize().
by Alexandre Julliard
15 Sep '09
15 Sep '09
Module: wine Branch: master Commit: 28998999d0add43d8dbc7e57b7366b02f3438c76 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=28998999d0add43d8dbc7e57b…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sun Sep 13 03:13:42 2009 +0400 comctl32/dpa: Implement DPA_GetSize(). --- dlls/comctl32/comctl32.spec | 1 + dlls/comctl32/dpa.c | 24 ++++++++++++++++++++++-- include/commctrl.h | 1 + 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/comctl32.spec b/dlls/comctl32/comctl32.spec index e852916..4249d56 100644 --- a/dlls/comctl32/comctl32.spec +++ b/dlls/comctl32/comctl32.spec @@ -125,6 +125,7 @@ @ stdcall DestroyPropertySheetPage(long) @ stdcall -private DllGetVersion(ptr) @ stdcall -private DllInstall(long wstr) +@ stdcall DPA_GetSize(ptr) @ stdcall DrawShadowText(long wstr long ptr long long long long long) @ stdcall DrawStatusText(long ptr ptr long) DrawStatusTextA @ stdcall DrawStatusTextW(long ptr wstr long) diff --git a/dlls/comctl32/dpa.c b/dlls/comctl32/dpa.c index 722e2fa..e3c03c8 100644 --- a/dlls/comctl32/dpa.c +++ b/dlls/comctl32/dpa.c @@ -45,14 +45,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(dpa); -struct _DPA +typedef struct _DPA { INT nItemCount; LPVOID *ptrs; HANDLE hHeap; INT nGrow; INT nMaxCount; -}; +} DPA; typedef struct _STREAMDATA { @@ -997,3 +997,23 @@ void WINAPI DPA_DestroyCallback (HDPA hdpa, PFNDPAENUMCALLBACK enumProc, DPA_EnumCallback (hdpa, enumProc, lParam); DPA_Destroy (hdpa); } + +/************************************************************************** + * DPA_GetSize [COMCTL32.@] + * + * Returns all array allocated memory size + * + * PARAMS + * hdpa [I] handle to the dynamic pointer array + * + * RETURNS + * Size in bytes + */ +ULONGLONG WINAPI DPA_GetSize(HDPA hdpa) +{ + TRACE("(%p)\n", hdpa); + + if (!hdpa) return 0; + + return sizeof(DPA) + hdpa->nMaxCount*sizeof(PVOID); +} diff --git a/include/commctrl.h b/include/commctrl.h index bda13de..ae417c0 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -5003,6 +5003,7 @@ BOOL WINAPI DPA_DeleteAllPtrs(HDPA); BOOL WINAPI DPA_SetPtr(HDPA, INT, LPVOID); LPVOID WINAPI DPA_GetPtr(HDPA, INT); INT WINAPI DPA_GetPtrIndex(HDPA, LPCVOID); +ULONGLONG WINAPI DPA_GetSize(HDPA); BOOL WINAPI DPA_Grow(HDPA, INT); INT WINAPI DPA_InsertPtr(HDPA, INT, LPVOID); BOOL WINAPI DPA_Sort(HDPA, PFNDPACOMPARE, LPARAM);
1
0
0
0
Nikolay Sivov : comctl32/dpa: Implement DPA_SaveStream() with tests.
by Alexandre Julliard
15 Sep '09
15 Sep '09
Module: wine Branch: master Commit: c1513c6bde5165f6172b488cb64900eee635d4c0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c1513c6bde5165f6172b488cb…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Mon Sep 14 11:16:06 2009 +0400 comctl32/dpa: Implement DPA_SaveStream() with tests. --- dlls/comctl32/dpa.c | 79 +++++++++++++++++++++++++++++++++++------ dlls/comctl32/tests/dpa.c | 84 +++++++++++++++++++++++++++++++++++++-------- 2 files changed, 136 insertions(+), 27 deletions(-) diff --git a/dlls/comctl32/dpa.c b/dlls/comctl32/dpa.c index ca28282..722e2fa 100644 --- a/dlls/comctl32/dpa.c +++ b/dlls/comctl32/dpa.c @@ -73,8 +73,8 @@ typedef struct _STREAMDATA * pData [I] pointer to callback data * * RETURNS - * Success: TRUE - * Failure: FALSE + * Success: S_OK, S_FALSE - partial success + * Failure: HRESULT error code * * NOTES * No more information available yet! @@ -91,7 +91,7 @@ HRESULT WINAPI DPA_LoadStream (HDPA *phDpa, PFNDPASTREAM loadProc, HDPA hDpa; PVOID *ptr; - FIXME ("phDpa=%p loadProc=%p pStream=%p pData=%p\n", + TRACE ("phDpa=%p loadProc=%p pStream=%p pData=%p\n", phDpa, loadProc, pStream, pData); if (!phDpa || !loadProc || !pStream) @@ -110,7 +110,7 @@ HRESULT WINAPI DPA_LoadStream (HDPA *phDpa, PFNDPASTREAM loadProc, if (errCode != S_OK) return errCode; - FIXME ("dwSize=%u dwData2=%u dwItems=%u\n", + TRACE ("dwSize=%u dwData2=%u dwItems=%u\n", streamData.dwSize, streamData.dwData2, streamData.dwItems); if (ulRead < sizeof(STREAMDATA) || @@ -150,7 +150,7 @@ HRESULT WINAPI DPA_LoadStream (HDPA *phDpa, PFNDPASTREAM loadProc, /* store the handle to the dpa */ *phDpa = hDpa; - FIXME ("new hDpa=%p, errorcode=%x\n", hDpa, errCode); + TRACE ("new hDpa=%p, errorcode=%x\n", hDpa, errCode); return errCode; } @@ -163,25 +163,80 @@ HRESULT WINAPI DPA_LoadStream (HDPA *phDpa, PFNDPASTREAM loadProc, * * PARAMS * hDpa [I] handle to a dynamic pointer array - * loadProc [I] pointer to a callback function + * saveProc [I] pointer to a callback function * pStream [I] pointer to a stream * pData [I] pointer to callback data * * RETURNS - * Success: TRUE - * Failure: FALSE + * Success: S_OK, S_FALSE - partial success + * Failure: HRESULT error code * * NOTES * No more information available yet! */ -HRESULT WINAPI DPA_SaveStream (const HDPA hDpa, PFNDPASTREAM loadProc, +HRESULT WINAPI DPA_SaveStream (const HDPA hDpa, PFNDPASTREAM saveProc, IStream *pStream, LPVOID pData) { + LARGE_INTEGER position; + ULARGE_INTEGER initial_pos, curr_pos; + STREAMDATA streamData; + DPASTREAMINFO streamInfo; + HRESULT hr; + PVOID *ptr; + + TRACE ("hDpa=%p saveProc=%p pStream=%p pData=%p\n", + hDpa, saveProc, pStream, pData); + + if (!hDpa || !saveProc || !pStream) return E_INVALIDARG; + + /* save initial position to write header after completion */ + position.QuadPart = 0; + hr = IStream_Seek (pStream, position, STREAM_SEEK_CUR, &initial_pos); + if (hr != S_OK) + return hr; + + /* write empty header */ + streamData.dwSize = sizeof(streamData); + streamData.dwData2 = 1; + streamData.dwItems = 0; + + hr = IStream_Write (pStream, &streamData, sizeof(streamData), NULL); + if (hr != S_OK) { + position.QuadPart = initial_pos.QuadPart; + IStream_Seek (pStream, position, STREAM_SEEK_SET, NULL); + return hr; + } + + /* no items - we're done */ + if (hDpa->nItemCount == 0) return S_OK; + + ptr = hDpa->ptrs; + for (streamInfo.iPos = 0; streamInfo.iPos < hDpa->nItemCount; streamInfo.iPos++) { + streamInfo.pvItem = *ptr; + hr = (saveProc)(&streamInfo, pStream, pData); + if (hr != S_OK) { + hr = S_FALSE; + break; + } + ptr++; + } + + /* write updated header */ + position.QuadPart = 0; + IStream_Seek (pStream, position, STREAM_SEEK_CUR, &curr_pos); + + streamData.dwSize = curr_pos.QuadPart - initial_pos.QuadPart; + streamData.dwData2 = 1; + streamData.dwItems = streamInfo.iPos; + + position.QuadPart = initial_pos.QuadPart; + IStream_Seek (pStream, position, STREAM_SEEK_SET, NULL); + IStream_Write (pStream, &streamData, sizeof(streamData), NULL); - FIXME ("hDpa=%p loadProc=%p pStream=%p pData=%p\n", - hDpa, loadProc, pStream, pData); + position.QuadPart = curr_pos.QuadPart; + IStream_Seek (pStream, position, STREAM_SEEK_SET, NULL); - return E_FAIL; + return hr; } diff --git a/dlls/comctl32/tests/dpa.c b/dlls/comctl32/tests/dpa.c index 54e8d0e..1ba4c67 100644 --- a/dlls/comctl32/tests/dpa.c +++ b/dlls/comctl32/tests/dpa.c @@ -142,12 +142,12 @@ static INT CALLBACK CB_EnumFirstThree(PVOID pItem, PVOID lp) static HRESULT CALLBACK CB_Save(DPASTREAMINFO *pInfo, IStream *pStm, LPVOID lp) { HRESULT hRes; - + ok(lp == (LPVOID)0xdeadbeef, "lp=%p\n", lp); hRes = IStream_Write(pStm, &pInfo->iPos, sizeof(INT), NULL); - ok(hRes == S_OK, "hRes=0x%x\n", hRes); + expect(S_OK, hRes); hRes = IStream_Write(pStm, &pInfo->pvItem, sizeof(PVOID), NULL); - ok(hRes == S_OK, "hRes=0x%x\n", hRes); + expect(S_OK, hRes); return S_OK; } @@ -159,10 +159,10 @@ static HRESULT CALLBACK CB_Load(DPASTREAMINFO *pInfo, IStream *pStm, LPVOID lp) iOldPos = pInfo->iPos; ok(lp == (LPVOID)0xdeadbeef, "lp=%p\n", lp); hRes = IStream_Read(pStm, &pInfo->iPos, sizeof(INT), NULL); - ok(hRes == S_OK, "hRes=0x%x\n", hRes); + expect(S_OK, hRes); ok(pInfo->iPos == iOldPos, "iPos=%d iOldPos=%d\n", pInfo->iPos, iOldPos); hRes = IStream_Read(pStm, &pInfo->pvItem, sizeof(PVOID), NULL); - ok(hRes == S_OK, "hRes=0x%x\n", hRes); + expect(S_OK, hRes); return S_OK; } @@ -643,6 +643,62 @@ static void test_DPA_LoadStream(void) CoUninitialize(); } +static void test_DPA_SaveStream(void) +{ + HDPA dpa; + static const WCHAR szStg[] = { 'S','t','g',0 }; + IStorage* pStg = NULL; + IStream* pStm = NULL; + DWORD dwMode; + HRESULT hRes; + ULONG ret; + + if(!pDPA_SaveStream) + { + win_skip("DPA_SaveStream() not available. Skipping stream tests.\n"); + return; + } + + hRes = CoInitialize(NULL); + if (hRes != S_OK) + { + ok(0, "hResult: %d\n", hRes); + return; + } + + dwMode = STGM_DIRECT|STGM_CREATE|STGM_READWRITE|STGM_SHARE_EXCLUSIVE; + hRes = StgCreateDocfile(NULL, dwMode|STGM_DELETEONRELEASE, 0, &pStg); + expect(S_OK, hRes); + + hRes = IStorage_CreateStream(pStg, szStg, dwMode, 0, 0, &pStm); + expect(S_OK, hRes); + + dpa = pDPA_Create(0); + + /* simple parameter check */ + hRes = pDPA_SaveStream(dpa, NULL, pStm, NULL); + ok(hRes == E_INVALIDARG || + broken(hRes == S_OK) /* XP and below */, "Wrong result, %d\n", hRes); +if (0) { + /* crashes on XP */ + hRes = pDPA_SaveStream(NULL, CB_Save, pStm, NULL); + expect(E_INVALIDARG, hRes); + + hRes = pDPA_SaveStream(dpa, CB_Save, NULL, NULL); + expect(E_INVALIDARG, hRes); +} + + pDPA_Destroy(dpa); + + ret = IStream_Release(pStm); + ok(!ret, "ret=%d\n", ret); + + ret = IStorage_Release(pStg); + ok(!ret, "ret=%d\n", ret); + + CoUninitialize(); +} + static void test_dpa_stream(void) { HDPA dpa; @@ -679,25 +735,22 @@ static void test_dpa_stream(void) dwMode = STGM_DIRECT|STGM_CREATE|STGM_READWRITE|STGM_SHARE_EXCLUSIVE; hRes = StgCreateDocfile(NULL, dwMode|STGM_DELETEONRELEASE, 0, &pStg); - ok(hRes == S_OK, "hRes=0x%x\n", hRes); + expect(S_OK, hRes); hRes = IStorage_CreateStream(pStg, szStg, dwMode, 0, 0, &pStm); - ok(hRes == S_OK, "hRes=0x%x\n", hRes); + expect(S_OK, hRes); hRes = pDPA_SaveStream(dpa, CB_Save, pStm, (void*)0xdeadbeef); - todo_wine ok(hRes == S_OK, "hRes=0x%x\n", hRes); + ok(hRes == S_OK, "hRes=0x%x\n", hRes); pDPA_Destroy(dpa); liZero.QuadPart = 0; hRes = IStream_Seek(pStm, liZero, STREAM_SEEK_SET, NULL); - ok(hRes == S_OK, "hRes=0x%x\n", hRes); + expect(S_OK, hRes); hRes = pDPA_LoadStream(&dpa, CB_Load, pStm, (void*)0xdeadbeef); - todo_wine - { - ok(hRes == S_OK, "hRes=0x%x\n", hRes); - rc = CheckDPA(dpa, 0x123456, &dw); - ok(rc, "dw=0x%x\n", dw); - } + expect(S_OK, hRes); + rc = CheckDPA(dpa, 0x123456, &dw); + ok(rc, "dw=0x%x\n", dw); pDPA_Destroy(dpa); ret = IStream_Release(pStm); @@ -726,5 +779,6 @@ START_TEST(dpa) test_DPA_EnumCallback(); test_DPA_DestroyCallback(); test_DPA_LoadStream(); + test_DPA_SaveStream(); test_dpa_stream(); }
1
0
0
0
← Newer
1
...
46
47
48
49
50
51
52
...
87
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
Results per page:
10
25
50
100
200