winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
October 2008
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
1216 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Added IHTMLStyle::[get|put] _verticalAlign implementation.
by Alexandre Julliard
07 Oct '08
07 Oct '08
Module: wine Branch: master Commit: 91cb239f3339d00124d9bcbd04956a3bd87ec87c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=91cb239f3339d00124d9bcbd0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Oct 6 09:51:21 2008 -0500 mshtml: Added IHTMLStyle::[get|put]_verticalAlign implementation. --- dlls/mshtml/htmlstyle.c | 31 +++++++++++++++++++++++++++---- dlls/mshtml/htmlstyle.h | 1 + dlls/mshtml/tests/dom.c | 21 +++++++++++++++++++++ 3 files changed, 49 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 874624e..dd5cbb2 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -71,6 +71,8 @@ static const WCHAR attrTextDecoration[] = {'t','e','x','t','-','d','e','c','o','r','a','t','i','o','n',0}; static const WCHAR attrTop[] = {'t','o','p',0}; +static const WCHAR attrVerticalAlign[] = + {'v','e','r','t','i','c','a','l','-','a','l','i','g','n',0}; static const WCHAR attrVisibility[] = {'v','i','s','i','b','i','l','i','t','y',0}; static const WCHAR attrWidth[] = @@ -96,6 +98,7 @@ static const LPCWSTR style_strings[] = { attrPaddingLeft, attrTextDecoration, attrTop, + attrVerticalAlign, attrVisibility, attrWidth, }; @@ -728,15 +731,35 @@ static HRESULT WINAPI HTMLStyle_get_textDecorationBlink(IHTMLStyle *iface, VARIA static HRESULT WINAPI HTMLStyle_put_verticalAlign(IHTMLStyle *iface, VARIANT v) { HTMLStyle *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->(v%d)\n", This, V_VT(&v)); - return E_NOTIMPL; + + TRACE("(%p)->(%s)\n", This, debugstr_variant(&v)); + + switch(V_VT(&v)) { + case VT_BSTR: + return set_style_attr(This, STYLEID_VERTICAL_ALIGN, V_BSTR(&v), 0); + default: + FIXME("not implemented vt %d\n", V_VT(&v)); + return E_NOTIMPL; + } + + return S_OK; } static HRESULT WINAPI HTMLStyle_get_verticalAlign(IHTMLStyle *iface, VARIANT *p) { HTMLStyle *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + BSTR ret; + HRESULT hres; + + TRACE("(%p)->(%p)\n", This, p); + + hres = get_style_attr(This, STYLEID_VERTICAL_ALIGN, &ret); + if(FAILED(hres)) + return hres; + + V_VT(p) = VT_BSTR; + V_BSTR(p) = ret; + return S_OK; } static HRESULT WINAPI HTMLStyle_put_textTransform(IHTMLStyle *iface, BSTR v) diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index 371df89..4a7e121 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -50,6 +50,7 @@ typedef enum { STYLEID_PADDING_LEFT, STYLEID_TEXT_DECORATION, STYLEID_TOP, + STYLEID_VERTICAL_ALIGN, STYLEID_VISIBILITY, STYLEID_WIDTH } styleid_t; diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 6618930..bb4e7ef 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2154,6 +2154,27 @@ static void test_default_style(IHTMLStyle *style) ok(hres == S_OK, "get_cursor failed: %08x\n", hres); ok(!strcmp_wa(str, "default"), "get_cursor returned %s\n", dbgstr_w(str)); SysFreeString(str); + + V_VT(&v) = VT_EMPTY; + hres = IHTMLStyle_get_verticalAlign(style, &v); + ok(hres == S_OK, "get_vertivalAlign failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v)=%d\n", V_VT(&v)); + ok(!V_BSTR(&v), "V_BSTR(v) != NULL\n"); + VariantClear(&v); + + V_VT(&v) = VT_BSTR; + V_BSTR(&v) = a2bstr("middle"); + hres = IHTMLStyle_put_verticalAlign(style, v); + ok(hres == S_OK, "put_vertivalAlign failed: %08x\n", hres); + VariantClear(&v); + + V_VT(&v) = VT_EMPTY; + hres = IHTMLStyle_get_verticalAlign(style, &v); + ok(hres == S_OK, "get_verticalAlign failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v)=%d\n", V_VT(&v)); + ok(!strcmp_wa(V_BSTR(&v), "middle"), "V_BSTR(v) = %s\n", dbgstr_w(V_BSTR(&v))); + VariantClear(&v); + } static void test_default_selection(IHTMLDocument2 *doc)
1
0
0
0
Jacek Caban : mshtml: Added IHTMLStyle::[put|get]_top implementation.
by Alexandre Julliard
07 Oct '08
07 Oct '08
Module: wine Branch: master Commit: 173f7f57d7d6c3f8f3c7fee43eb84e511ed2470d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=173f7f57d7d6c3f8f3c7fee43…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Oct 6 09:51:04 2008 -0500 mshtml: Added IHTMLStyle::[put|get]_top implementation. --- dlls/mshtml/htmlstyle.c | 31 +++++++++++++++++++++++++++---- dlls/mshtml/htmlstyle.h | 1 + dlls/mshtml/tests/dom.c | 20 ++++++++++++++++++++ 3 files changed, 48 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 1f257a0..874624e 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -69,6 +69,8 @@ static const WCHAR attrPaddingLeft[] = {'p','a','d','d','i','n','g','-','l','e','f','t',0}; static const WCHAR attrTextDecoration[] = {'t','e','x','t','-','d','e','c','o','r','a','t','i','o','n',0}; +static const WCHAR attrTop[] = + {'t','o','p',0}; static const WCHAR attrVisibility[] = {'v','i','s','i','b','i','l','i','t','y',0}; static const WCHAR attrWidth[] = @@ -93,6 +95,7 @@ static const LPCWSTR style_strings[] = { attrMarginRight, attrPaddingLeft, attrTextDecoration, + attrTop, attrVisibility, attrWidth, }; @@ -1451,15 +1454,35 @@ static HRESULT WINAPI HTMLStyle_get_whiteSpace(IHTMLStyle *iface, BSTR *p) static HRESULT WINAPI HTMLStyle_put_top(IHTMLStyle *iface, VARIANT v) { HTMLStyle *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->(v%d)\n", This, V_VT(&v)); - return E_NOTIMPL; + + TRACE("(%p)->(%s)\n", This, debugstr_variant(&v)); + + switch(V_VT(&v)) { + case VT_BSTR: + return set_style_attr(This, STYLEID_TOP, V_BSTR(&v), 0); + default: + FIXME("unimplemented vt %d\n", V_VT(&v)); + return E_NOTIMPL; + } + + return S_OK; } static HRESULT WINAPI HTMLStyle_get_top(IHTMLStyle *iface, VARIANT *p) { HTMLStyle *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + BSTR ret; + HRESULT hres; + + TRACE("(%p)->(%p)\n", This, p); + + hres = get_style_attr(This, STYLEID_TOP, &ret); + if(FAILED(hres)) + return hres; + + V_VT(p) = VT_BSTR; + V_BSTR(p) = ret; + return S_OK; } static HRESULT WINAPI HTMLStyle_put_left(IHTMLStyle *iface, VARIANT v) diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index 563187c..371df89 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -49,6 +49,7 @@ typedef enum { STYLEID_MARGIN_RIGHT, STYLEID_PADDING_LEFT, STYLEID_TEXT_DECORATION, + STYLEID_TOP, STYLEID_VISIBILITY, STYLEID_WIDTH } styleid_t; diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 1fcfa7c..6618930 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2118,6 +2118,26 @@ static void test_default_style(IHTMLStyle *style) ok(!strcmp_wa(V_BSTR(&v), "3px"), "V_BSTR(v) = %s\n", dbgstr_w(V_BSTR(&v))); VariantClear(&v); + V_VT(&v) = VT_EMPTY; + hres = IHTMLStyle_get_top(style, &v); + ok(hres == S_OK, "get_top failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v)=%d\n", V_VT(&v)); + ok(!V_BSTR(&v), "V_BSTR(v) != NULL\n"); + VariantClear(&v); + + V_VT(&v) = VT_BSTR; + V_BSTR(&v) = a2bstr("3px"); + hres = IHTMLStyle_put_top(style, v); + ok(hres == S_OK, "put_top failed: %08x\n", hres); + VariantClear(&v); + + V_VT(&v) = VT_EMPTY; + hres = IHTMLStyle_get_top(style, &v); + ok(hres == S_OK, "get_top failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v)=%d\n", V_VT(&v)); + ok(!strcmp_wa(V_BSTR(&v), "3px"), "V_BSTR(v) = %s\n", dbgstr_w(V_BSTR(&v))); + VariantClear(&v); + str = (void*)0xdeadbeef; hres = IHTMLStyle_get_cursor(style, &str); ok(hres == S_OK, "get_cursor failed: %08x\n", hres);
1
0
0
0
Jacek Caban : mshtml: Added IHTMLStyle::[get|put]_cursor implementation.
by Alexandre Julliard
07 Oct '08
07 Oct '08
Module: wine Branch: master Commit: d7e693cdfa9c6eb95ad23332ced5625e2c49dcb4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d7e693cdfa9c6eb95ad23332c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Oct 6 09:50:46 2008 -0500 mshtml: Added IHTMLStyle::[get|put]_cursor implementation. --- dlls/mshtml/htmlstyle.c | 15 +++++++++++---- dlls/mshtml/htmlstyle.h | 1 + dlls/mshtml/tests/dom.c | 16 ++++++++++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index f42b4d0..1f257a0 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -45,6 +45,8 @@ static const WCHAR attrBorderLeft[] = {'b','o','r','d','e','r','-','l','e','f','t',0}; static const WCHAR attrColor[] = {'c','o','l','o','r',0}; +static const WCHAR attrCursor[] = + {'c','u','r','s','o','r',0}; static const WCHAR attrDisplay[] = {'d','i','s','p','l','a','y',0}; static const WCHAR attrFontFamily[] = @@ -79,6 +81,7 @@ static const LPCWSTR style_strings[] = { attrBorder, attrBorderLeft, attrColor, + attrCursor, attrDisplay, attrFontFamily, attrFontSize, @@ -1685,15 +1688,19 @@ static HRESULT WINAPI HTMLStyle_get_posHeight(IHTMLStyle *iface, float *p) static HRESULT WINAPI HTMLStyle_put_cursor(IHTMLStyle *iface, BSTR v) { HTMLStyle *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + return set_style_attr(This, STYLEID_CURSOR, v, 0); } static HRESULT WINAPI HTMLStyle_get_cursor(IHTMLStyle *iface, BSTR *p) { HTMLStyle *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return get_style_attr(This, STYLEID_CURSOR, p); } static HRESULT WINAPI HTMLStyle_put_clip(IHTMLStyle *iface, BSTR v) diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index 902cc9a..563187c 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -37,6 +37,7 @@ typedef enum { STYLEID_BORDER, STYLEID_BORDER_LEFT, STYLEID_COLOR, + STYLEID_CURSOR, STYLEID_DISPLAY, STYLEID_FONT_FAMILY, STYLEID_FONT_SIZE, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 1105f0f..1fcfa7c 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2118,6 +2118,22 @@ static void test_default_style(IHTMLStyle *style) ok(!strcmp_wa(V_BSTR(&v), "3px"), "V_BSTR(v) = %s\n", dbgstr_w(V_BSTR(&v))); VariantClear(&v); + str = (void*)0xdeadbeef; + hres = IHTMLStyle_get_cursor(style, &str); + ok(hres == S_OK, "get_cursor failed: %08x\n", hres); + ok(!str, "get_cursor != NULL\n"); + SysFreeString(str); + + str = a2bstr("default"); + hres = IHTMLStyle_put_cursor(style, str); + ok(hres == S_OK, "get_cursor failed: %08x\n", hres); + SysFreeString(str); + + str = NULL; + hres = IHTMLStyle_get_cursor(style, &str); + ok(hres == S_OK, "get_cursor failed: %08x\n", hres); + ok(!strcmp_wa(str, "default"), "get_cursor returned %s\n", dbgstr_w(str)); + SysFreeString(str); } static void test_default_selection(IHTMLDocument2 *doc)
1
0
0
0
Jacek Caban : mshtml: Added IHTMLStyle::[get|put]_left implementation.
by Alexandre Julliard
07 Oct '08
07 Oct '08
Module: wine Branch: master Commit: d7d2587c62d6fc8ae3cfcb05f11803a017c1a849 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d7d2587c62d6fc8ae3cfcb05f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Oct 6 09:50:28 2008 -0500 mshtml: Added IHTMLStyle::[get|put]_left implementation. --- dlls/mshtml/htmlstyle.c | 31 +++++++++++++++++++++++++++---- dlls/mshtml/htmlstyle.h | 1 + dlls/mshtml/tests/dom.c | 21 +++++++++++++++++++++ 3 files changed, 49 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 0beef50..f42b4d0 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -55,6 +55,8 @@ static const WCHAR attrFontStyle[] = {'f','o','n','t','-','s','t','y','l','e',0}; static const WCHAR attrFontWeight[] = {'f','o','n','t','-','w','e','i','g','h','t',0}; +static const WCHAR attrLeft[] = + {'l','e','f','t',0}; static const WCHAR attrMargin[] = {'m','a','r','g','i','n',0}; static const WCHAR attrMarginLeft[] = @@ -82,6 +84,7 @@ static const LPCWSTR style_strings[] = { attrFontSize, attrFontStyle, attrFontWeight, + attrLeft, attrMargin, attrMarginLeft, attrMarginRight, @@ -1459,15 +1462,35 @@ static HRESULT WINAPI HTMLStyle_get_top(IHTMLStyle *iface, VARIANT *p) static HRESULT WINAPI HTMLStyle_put_left(IHTMLStyle *iface, VARIANT v) { HTMLStyle *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->(v%d)\n", This, V_VT(&v)); - return E_NOTIMPL; + + TRACE("(%p)->(%s)\n", This, debugstr_variant(&v)); + + switch(V_VT(&v)) { + case VT_BSTR: + return set_style_attr(This, STYLEID_LEFT, V_BSTR(&v), 0); + default: + FIXME("unimplemented vt %d\n", V_VT(&v)); + return E_NOTIMPL; + } + + return S_OK; } static HRESULT WINAPI HTMLStyle_get_left(IHTMLStyle *iface, VARIANT *p) { HTMLStyle *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + BSTR ret; + HRESULT hres; + + TRACE("(%p)->(%p)\n", This, p); + + hres = get_style_attr(This, STYLEID_LEFT, &ret); + if(FAILED(hres)) + return hres; + + V_VT(p) = VT_BSTR; + V_BSTR(p) = ret; + return S_OK; } static HRESULT WINAPI HTMLStyle_get_position(IHTMLStyle *iface, BSTR *p) diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index ed3cba7..902cc9a 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -42,6 +42,7 @@ typedef enum { STYLEID_FONT_SIZE, STYLEID_FONT_STYLE, STYLEID_FONT_WEIGHT, + STYLEID_LEFT, STYLEID_MARGIN, STYLEID_MARGIN_LEFT, STYLEID_MARGIN_RIGHT, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 13364c0..1105f0f 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2097,6 +2097,27 @@ static void test_default_style(IHTMLStyle *style) hres = IHTMLStyle_put_border(style, str); ok(hres == S_OK, "get_border failed: %08x\n", hres); SysFreeString(str); + + V_VT(&v) = VT_EMPTY; + hres = IHTMLStyle_get_left(style, &v); + ok(hres == S_OK, "get_left failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v)=%d\n", V_VT(&v)); + ok(!V_BSTR(&v), "V_BSTR(v) != NULL\n"); + VariantClear(&v); + + V_VT(&v) = VT_BSTR; + V_BSTR(&v) = a2bstr("3px"); + hres = IHTMLStyle_put_left(style, v); + ok(hres == S_OK, "put_left failed: %08x\n", hres); + VariantClear(&v); + + V_VT(&v) = VT_EMPTY; + hres = IHTMLStyle_get_left(style, &v); + ok(hres == S_OK, "get_left failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v)=%d\n", V_VT(&v)); + ok(!strcmp_wa(V_BSTR(&v), "3px"), "V_BSTR(v) = %s\n", dbgstr_w(V_BSTR(&v))); + VariantClear(&v); + } static void test_default_selection(IHTMLDocument2 *doc)
1
0
0
0
Jacek Caban : mshtml: Added IHTMLStyle::[get|put]_border implementation.
by Alexandre Julliard
07 Oct '08
07 Oct '08
Module: wine Branch: master Commit: cc528d26982dabd01416e4278905d554d1ce0932 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cc528d26982dabd01416e4278…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Oct 6 09:50:03 2008 -0500 mshtml: Added IHTMLStyle::[get|put]_border implementation. --- dlls/mshtml/htmlstyle.c | 15 +++++++++++---- dlls/mshtml/htmlstyle.h | 1 + dlls/mshtml/tests/dom.c | 11 +++++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index cf8d295..0beef50 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -39,6 +39,8 @@ static const WCHAR attrBackgroundColor[] = {'b','a','c','k','g','r','o','u','n','d','-','c','o','l','o','r',0}; static const WCHAR attrBackgroundImage[] = {'b','a','c','k','g','r','o','u','n','d','-','i','m','a','g','e',0}; +static const WCHAR attrBorder[] = + {'b','o','r','d','e','r',0}; static const WCHAR attrBorderLeft[] = {'b','o','r','d','e','r','-','l','e','f','t',0}; static const WCHAR attrColor[] = @@ -72,6 +74,7 @@ static const LPCWSTR style_strings[] = { attrBackground, attrBackgroundColor, attrBackgroundImage, + attrBorder, attrBorderLeft, attrColor, attrDisplay, @@ -981,15 +984,19 @@ static HRESULT WINAPI HTMLStyle_get_padding(IHTMLStyle *iface, BSTR *p) static HRESULT WINAPI HTMLStyle_put_border(IHTMLStyle *iface, BSTR v) { HTMLStyle *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + return set_style_attr(This, STYLEID_BORDER, v, 0); } static HRESULT WINAPI HTMLStyle_get_border(IHTMLStyle *iface, BSTR *p) { HTMLStyle *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return get_style_attr(This, STYLEID_BORDER, p); } static HRESULT WINAPI HTMLStyle_put_borderTop(IHTMLStyle *iface, BSTR v) diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index f12e072..ed3cba7 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -34,6 +34,7 @@ typedef enum { STYLEID_BACKGROUND, STYLEID_BACKGROUND_COLOR, STYLEID_BACKGROUND_IMAGE, + STYLEID_BORDER, STYLEID_BORDER_LEFT, STYLEID_COLOR, STYLEID_DISPLAY, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 689020c..13364c0 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2086,6 +2086,17 @@ static void test_default_style(IHTMLStyle *style) hres = IHTMLStyle_put_margin(style, NULL); ok(hres == S_OK, "get_margin failed: %08x\n", hres); + + str = NULL; + hres = IHTMLStyle_get_border(style, &str); + ok(hres == S_OK, "get_border failed: %08x\n", hres); + ok(!str || !*str, "str is not empty\n"); + SysFreeString(str); + + str = a2bstr("1px"); + hres = IHTMLStyle_put_border(style, str); + ok(hres == S_OK, "get_border failed: %08x\n", hres); + SysFreeString(str); } static void test_default_selection(IHTMLDocument2 *doc)
1
0
0
0
Jacek Caban : mshtml: Release nsstyle when destroying HTMLStyle.
by Alexandre Julliard
07 Oct '08
07 Oct '08
Module: wine Branch: master Commit: b381951e7c8f0cb738f4524601883ed8fe398dad URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b381951e7c8f0cb738f452460…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Oct 6 09:49:46 2008 -0500 mshtml: Release nsstyle when destroying HTMLStyle. --- dlls/mshtml/htmlstyle.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index f9ff883..cf8d295 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -290,8 +290,11 @@ static ULONG WINAPI HTMLStyle_Release(IHTMLStyle *iface) TRACE("(%p) ref=%d\n", This, ref); - if(!ref) + if(!ref) { + if(This->nsstyle) + nsIDOMCSSStyleDeclaration_Release(This->nsstyle); heap_free(This); + } return ref; }
1
0
0
0
Jacek Caban : mshtml: Added IHTMLCurrentStyle::get_display implementation.
by Alexandre Julliard
07 Oct '08
07 Oct '08
Module: wine Branch: master Commit: 9a665ec2b1f614215ae9ea189b2282b3cab54e8c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9a665ec2b1f614215ae9ea189…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Oct 6 09:49:24 2008 -0500 mshtml: Added IHTMLCurrentStyle::get_display implementation. --- dlls/mshtml/htmlcurstyle.c | 12 +++++++----- dlls/mshtml/htmlstyle.c | 15 ++++++++++----- dlls/mshtml/htmlstyle.h | 2 ++ dlls/mshtml/tests/dom.c | 8 ++++++++ 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/dlls/mshtml/htmlcurstyle.c b/dlls/mshtml/htmlcurstyle.c index ffce224..8bb56f3 100644 --- a/dlls/mshtml/htmlcurstyle.c +++ b/dlls/mshtml/htmlcurstyle.c @@ -25,10 +25,10 @@ #include "winuser.h" #include "ole2.h" -#include "wine/debug.h" -#include "wine/unicode.h" - #include "mshtml_private.h" +#include "htmlstyle.h" + +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(mshtml); @@ -376,8 +376,10 @@ static HRESULT WINAPI HTMLCurrentStyle_get_textDecoration(IHTMLCurrentStyle *ifa static HRESULT WINAPI HTMLCurrentStyle_get_display(IHTMLCurrentStyle *iface, BSTR *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(This->nsstyle, STYLEID_DISPLAY, p); } static HRESULT WINAPI HTMLCurrentStyle_get_visibility(IHTMLCurrentStyle *iface, BSTR *p) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 3805c74..f9ff883 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -185,14 +185,14 @@ static HRESULT set_style_attr(HTMLStyle *This, styleid_t sid, LPCWSTR value, DWO return S_OK; } -static HRESULT get_style_attr_nsval(HTMLStyle *This, styleid_t sid, nsAString *value) +static HRESULT get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, nsAString *value) { nsAString str_name; nsresult nsres; nsAString_Init(&str_name, style_strings[sid]); - nsres = nsIDOMCSSStyleDeclaration_GetPropertyValue(This->nsstyle, &str_name, value); + nsres = nsIDOMCSSStyleDeclaration_GetPropertyValue(nsstyle, &str_name, value); if(NS_FAILED(nsres)) { ERR("SetProperty failed: %08x\n", nsres); return E_FAIL; @@ -203,14 +203,14 @@ static HRESULT get_style_attr_nsval(HTMLStyle *This, styleid_t sid, nsAString *v return NS_OK; } -static HRESULT get_style_attr(HTMLStyle *This, styleid_t sid, BSTR *p) +HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, BSTR *p) { nsAString str_value; const PRUnichar *value; nsAString_Init(&str_value, NULL); - get_style_attr_nsval(This, sid, &str_value); + get_nsstyle_attr_nsval(nsstyle, sid, &str_value); nsAString_GetData(&str_value, &value); *p = *value ? SysAllocString(value) : NULL; @@ -221,6 +221,11 @@ static HRESULT get_style_attr(HTMLStyle *This, styleid_t sid, BSTR *p) return S_OK; } +static inline HRESULT get_style_attr(HTMLStyle *This, styleid_t sid, BSTR *p) +{ + return get_nsstyle_attr(This->nsstyle, sid, p); +} + static HRESULT check_style_attr_value(HTMLStyle *This, styleid_t sid, LPCWSTR exval, VARIANT_BOOL *p) { nsAString str_value; @@ -228,7 +233,7 @@ static HRESULT check_style_attr_value(HTMLStyle *This, styleid_t sid, LPCWSTR ex nsAString_Init(&str_value, NULL); - get_style_attr_nsval(This, sid, &str_value); + get_nsstyle_attr_nsval(This->nsstyle, sid, &str_value); nsAString_GetData(&str_value, &value); *p = strcmpW(value, exval) ? VARIANT_FALSE : VARIANT_TRUE; diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index 1295ab6..f12e072 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -51,3 +51,5 @@ typedef enum { } styleid_t; void HTMLStyle2_Init(HTMLStyle*); + +HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration*,styleid_t,BSTR*); diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 0753d15..689020c 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -1986,8 +1986,16 @@ static void test_navigator(IHTMLDocument2 *doc) static void test_current_style(IHTMLCurrentStyle *current_style) { + BSTR str; + HRESULT hres; + test_disp((IUnknown*)current_style, &DIID_DispHTMLCurrentStyle); test_ifaces((IUnknown*)current_style, cstyle_iids); + + hres = IHTMLCurrentStyle_get_display(current_style, &str); + ok(hres == S_OK, "get_display failed: %08x\n", hres); + ok(!strcmp_wa(str, "block"), "get_display returned %s\n", dbgstr_w(str)); + SysFreeString(str); } static void test_default_style(IHTMLStyle *style)
1
0
0
0
Jacek Caban : mshtml: Store nsIDOMCSSStyleDeclaration in HTMLCurrentStyle.
by Alexandre Julliard
07 Oct '08
07 Oct '08
Module: wine Branch: master Commit: 72fc799d18d67b8a83fb9fdef7cc88221b06e850 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=72fc799d18d67b8a83fb9fdef…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Oct 6 09:49:00 2008 -0500 mshtml: Store nsIDOMCSSStyleDeclaration in HTMLCurrentStyle. --- dlls/mshtml/htmlcurstyle.c | 57 +++++++++++++++++++++++++++++++++++++++-- dlls/mshtml/htmlelem2.c | 2 +- dlls/mshtml/mshtml_private.h | 2 +- dlls/mshtml/nsiface.idl | 35 +++++++++++++++++++++++++- 4 files changed, 90 insertions(+), 6 deletions(-) diff --git a/dlls/mshtml/htmlcurstyle.c b/dlls/mshtml/htmlcurstyle.c index 4568087..ffce224 100644 --- a/dlls/mshtml/htmlcurstyle.c +++ b/dlls/mshtml/htmlcurstyle.c @@ -37,6 +37,8 @@ typedef struct { const IHTMLCurrentStyleVtbl *lpIHTMLCurrentStyleVtbl; LONG ref; + + nsIDOMCSSStyleDeclaration *nsstyle; } HTMLCurrentStyle; #define HTMLCURSTYLE(x) ((IHTMLCurrentStyle*) &(x)->lpIHTMLCurrentStyleVtbl) @@ -85,8 +87,11 @@ static ULONG WINAPI HTMLCurrentStyle_Release(IHTMLCurrentStyle *iface) TRACE("(%p) ref=%d\n", This, ref); - if(!ref) + if(!ref) { + if(This->nsstyle) + nsIDOMCSSStyleDeclaration_Release(This->nsstyle); heap_free(This); + } return ref; } @@ -875,16 +880,62 @@ static dispex_static_data_t HTMLCurrentStyle_dispex = { HTMLCurrentStyle_iface_tids }; -HRESULT HTMLCurrentStyle_Create(IHTMLCurrentStyle **p) +HRESULT HTMLCurrentStyle_Create(HTMLElement *elem, IHTMLCurrentStyle **p) { + nsIDOMCSSStyleDeclaration *nsstyle; + nsIDOMDocumentView *nsdocview; + nsIDOMAbstractView *nsview; + nsIDOMViewCSS *nsviewcss; + nsIDOMDocument *nsdoc; + nsAString nsempty_str; HTMLCurrentStyle *ret; + nsresult nsres; + + nsres = nsIWebNavigation_GetDocument(elem->node.doc->nscontainer->navigation, &nsdoc); + if(NS_FAILED(nsres)) { + ERR("GetDocument failed: %08x\n", nsres); + return E_FAIL; + } + + nsres = nsIDOMDocument_QueryInterface(nsdoc, &IID_nsIDOMDocumentView, (void**)&nsdocview); + nsIDOMDocument_Release(nsdoc); + if(NS_FAILED(nsres)) { + ERR("Could not get nsIDOMDocumentView: %08x\n", nsres); + return E_FAIL; + } + + nsres = nsIDOMDocumentView_GetDefaultView(nsdocview, &nsview); + nsIDOMDocumentView_Release(nsdocview); + if(NS_FAILED(nsres)) { + ERR("GetDefaultView failed: %08x\n", nsres); + return E_FAIL; + } + + nsres = nsIDOMAbstractView_QueryInterface(nsview, &IID_nsIDOMViewCSS, (void**)&nsviewcss); + nsIDOMAbstractView_Release(nsview); + if(NS_FAILED(nsres)) { + ERR("Could not get nsIDOMViewCSS: %08x\n", nsres); + return E_FAIL; + } + + nsAString_Init(&nsempty_str, NULL); + nsres = nsIDOMViewCSS_GetComputedStyle(nsviewcss, (nsIDOMElement*)elem->nselem, &nsempty_str, &nsstyle); + nsIDOMViewCSS_Release(nsviewcss); + nsAString_Finish(&nsempty_str); + if(NS_FAILED(nsres)) { + ERR("GetComputedStyle failed: %08x\n", nsres); + return E_FAIL; + } ret = heap_alloc_zero(sizeof(HTMLCurrentStyle)); - if(!ret) + if(!ret) { + nsIDOMCSSStyleDeclaration_Release(nsstyle); return E_OUTOFMEMORY; + } ret->lpIHTMLCurrentStyleVtbl = &HTMLCurrentStyleVtbl; ret->ref = 1; + ret->nsstyle = nsstyle; init_dispex(&ret->dispex, (IUnknown*)HTMLCURSTYLE(ret), &HTMLCurrentStyle_dispex); diff --git a/dlls/mshtml/htmlelem2.c b/dlls/mshtml/htmlelem2.c index 36676c6..1465086 100644 --- a/dlls/mshtml/htmlelem2.c +++ b/dlls/mshtml/htmlelem2.c @@ -321,7 +321,7 @@ static HRESULT WINAPI HTMLElement2_get_currentStyle(IHTMLElement2 *iface, IHTMLC TRACE("(%p)->(%p)\n", This, p); - return HTMLCurrentStyle_Create(p); + return HTMLCurrentStyle_Create(This, p); } static HRESULT WINAPI HTMLElement2_put_onpropertychange(IHTMLElement2 *iface, VARIANT v) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 4df7efe..626cb8b 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -474,7 +474,7 @@ void HTMLDocument_Window_Init(HTMLDocument*); void HTMLDocument_Service_Init(HTMLDocument*); void HTMLDocument_Hlink_Init(HTMLDocument*); -HRESULT HTMLCurrentStyle_Create(IHTMLCurrentStyle**); +HRESULT HTMLCurrentStyle_Create(HTMLElement*,IHTMLCurrentStyle**); void ConnectionPoint_Init(ConnectionPoint*,ConnectionPointContainer*,REFIID); void ConnectionPointContainer_Init(ConnectionPointContainer*,IUnknown*); diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl index bedac82..93e25f1 100644 --- a/dlls/mshtml/nsiface.idl +++ b/dlls/mshtml/nsiface.idl @@ -82,6 +82,7 @@ interface nsIEditorObserver; interface nsIEditActionListener; interface nsIDocumentStateListener; interface nsIDOMCSSStyleSheet; +interface nsIDOMDocumentView; interface IMoniker; @@ -100,7 +101,6 @@ interface nsISupports /* Currently we don't need a full declaration of these interfaces */ typedef nsISupports nsISHistory; typedef nsISupports nsIWidget; -typedef nsISupports nsIDOMAbstractView; typedef nsISupports nsIHttpHeaderVisitor; typedef nsISupports nsIDOMBarProp; typedef nsISupports nsIDOMWindowCollection; @@ -887,6 +887,28 @@ interface nsIDOMDocumentFragment : nsIDOMNode [ object, + uuid(f51ebade-8b1a-11d3-aae7-0010830123b4), + local + /* FROZEN */ +] +interface nsIDOMAbstractView : nsISupports +{ + nsresult GetDocument(nsIDOMDocumentView **aDocument); +} + +[ + object, + uuid(0b9341f3-95d4-4fa4-adcd-e119e0db2889), + local + /* NOT_FROZEN */ +] +interface nsIDOMViewCSS : nsIDOMAbstractView +{ + nsresult GetComputedStyle(nsIDOMElement *elt, const nsAString *pseudoElt, nsIDOMCSSStyleDeclaration **_retval); +} + +[ + object, uuid(a6cf9075-15b3-11d2-932e-00805f8add32), local /* FROZEN */ @@ -1003,6 +1025,17 @@ interface nsIDOMDocumentStyle : nsISupports [ object, + uuid(1acdb2ba-1dd2-11b2-95bc-9542495d2569), + local + /* FROZEN */ +] +interface nsIDOMDocumentView : nsISupports +{ + nsresult GetDefaultView(nsIDOMAbstractView **aDefaultView); +} + +[ + object, uuid(a6cf90ce-15b3-11d2-932e-00805f8add32), local /* FROZEN */
1
0
0
0
Jacek Caban : mshtml: Use IDs instead of strings in HTMLStyle implementation.
by Alexandre Julliard
07 Oct '08
07 Oct '08
Module: wine Branch: master Commit: e9475aab4adc6a69a8b0444ca92a69545fcb5965 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e9475aab4adc6a69a8b0444ca…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Oct 6 09:48:25 2008 -0500 mshtml: Use IDs instead of strings in HTMLStyle implementation. --- dlls/mshtml/htmlstyle.c | 108 ++++++++++++++++++++++++++++------------------- dlls/mshtml/htmlstyle.h | 21 +++++++++ 2 files changed, 85 insertions(+), 44 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=e9475aab4adc6a69a8b04…
1
0
0
0
Jacek Caban : mshtml: Moved HTMLStyle to separated header file.
by Alexandre Julliard
07 Oct '08
07 Oct '08
Module: wine Branch: master Commit: 596206f05468d3d54914331adc20d8bd5a404ab9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=596206f05468d3d54914331ad…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Oct 6 09:47:58 2008 -0500 mshtml: Moved HTMLStyle to separated header file. --- dlls/mshtml/htmlstyle.c | 5 +++-- dlls/mshtml/htmlstyle.h | 32 ++++++++++++++++++++++++++++++++ dlls/mshtml/htmlstyle2.c | 5 +++-- dlls/mshtml/mshtml_private.h | 14 -------------- 4 files changed, 38 insertions(+), 18 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 1d2ea9f..83cdea7 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -25,11 +25,12 @@ #include "winuser.h" #include "ole2.h" +#include "mshtml_private.h" +#include "htmlstyle.h" + #include "wine/debug.h" #include "wine/unicode.h" -#include "mshtml_private.h" - WINE_DEFAULT_DEBUG_CHANNEL(mshtml); static const WCHAR attrBackground[] = diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h new file mode 100644 index 0000000..3e0ecc3 --- /dev/null +++ b/dlls/mshtml/htmlstyle.h @@ -0,0 +1,32 @@ +/* + * Copyright 2008 Jacek Caban for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +typedef struct { + DispatchEx dispex; + const IHTMLStyleVtbl *lpHTMLStyleVtbl; + const IHTMLStyle2Vtbl *lpHTMLStyle2Vtbl; + + LONG ref; + + nsIDOMCSSStyleDeclaration *nsstyle; +} HTMLStyle; + +#define HTMLSTYLE(x) ((IHTMLStyle*) &(x)->lpHTMLStyleVtbl) +#define HTMLSTYLE2(x) ((IHTMLStyle2*) &(x)->lpHTMLStyle2Vtbl) + +void HTMLStyle2_Init(HTMLStyle*); diff --git a/dlls/mshtml/htmlstyle2.c b/dlls/mshtml/htmlstyle2.c index c25ce62..f900f7d 100644 --- a/dlls/mshtml/htmlstyle2.c +++ b/dlls/mshtml/htmlstyle2.c @@ -25,11 +25,12 @@ #include "winuser.h" #include "ole2.h" +#include "mshtml_private.h" +#include "htmlstyle.h" + #include "wine/debug.h" #include "wine/unicode.h" -#include "mshtml_private.h" - WINE_DEFAULT_DEBUG_CHANNEL(mshtml); #define HTMLSTYLE2_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle2, iface) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 5a1dfc3..4df7efe 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -393,16 +393,6 @@ typedef struct { ConnectionPoint cp; } HTMLTextContainer; -typedef struct { - DispatchEx dispex; - const IHTMLStyleVtbl *lpHTMLStyleVtbl; - const IHTMLStyle2Vtbl *lpHTMLStyle2Vtbl; - - LONG ref; - - nsIDOMCSSStyleDeclaration *nsstyle; -} HTMLStyle; - #define HTMLWINDOW2(x) ((IHTMLWindow2*) &(x)->lpHTMLWindow2Vtbl) #define HTMLWINDOW3(x) ((IHTMLWindow3*) &(x)->lpHTMLWindow3Vtbl) @@ -459,9 +449,6 @@ typedef struct { #define HTMLOPTFACTORY(x) ((IHTMLOptionElementFactory*) &(x)->lpHTMLOptionElementFactoryVtbl) #define HTMLLOCATION(x) ((IHTMLLocation*) &(x)->lpHTMLLocationVtbl) -#define HTMLSTYLE(x) ((IHTMLStyle*) &(x)->lpHTMLStyleVtbl) -#define HTMLSTYLE2(x) ((IHTMLStyle2*) &(x)->lpHTMLStyle2Vtbl) - #define DISPATCHEX(x) ((IDispatchEx*) &(x)->lpIDispatchExVtbl) #define DEFINE_THIS2(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,ifc))) @@ -487,7 +474,6 @@ void HTMLDocument_Window_Init(HTMLDocument*); void HTMLDocument_Service_Init(HTMLDocument*); void HTMLDocument_Hlink_Init(HTMLDocument*); -void HTMLStyle2_Init(HTMLStyle*); HRESULT HTMLCurrentStyle_Create(IHTMLCurrentStyle**); void ConnectionPoint_Init(ConnectionPoint*,ConnectionPointContainer*,REFIID);
1
0
0
0
← Newer
1
...
101
102
103
104
105
106
107
...
122
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Results per page:
10
25
50
100
200