Jacek Caban : mshtml: Added IHTMLStyle::clear property implementation.
Alexandre Julliard
julliard at winehq.org
Tue Oct 23 13:37:18 CDT 2012
Module: wine
Branch: master
Commit: 04c97d08ebcd6762346bde625a882e1dc75f58b6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=04c97d08ebcd6762346bde625a882e1dc75f58b6
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Oct 23 13:41:13 2012 +0200
mshtml: Added IHTMLStyle::clear property implementation.
---
dlls/mshtml/htmlstyle.c | 15 +++++++++++----
dlls/mshtml/htmlstyle.h | 1 +
dlls/mshtml/tests/style.c | 15 +++++++++++++++
3 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index cb164dc..6427bee 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -91,6 +91,8 @@ static const WCHAR attrBorderWidth[] =
{'b','o','r','d','e','r','-','w','i','d','t','h',0};
static const WCHAR attrBottom[] =
{'b','o','t','t','o','m',0};
+static const WCHAR attrClear[] =
+ {'c','l','e','a','r',0};
static const WCHAR attrClip[] =
{'c','l','i','p',0};
static const WCHAR attrColor[] =
@@ -212,6 +214,7 @@ static const style_tbl_entry_t style_tbl[] = {
{attrBorderTopWidth, DISPID_IHTMLSTYLE_BORDERTOPWIDTH},
{attrBorderWidth, DISPID_IHTMLSTYLE_BORDERWIDTH},
{attrBottom, DISPID_IHTMLSTYLE2_BOTTOM},
+ {attrClear, DISPID_IHTMLSTYLE_CLEAR},
{attrClip, DISPID_IHTMLSTYLE_CLIP},
{attrColor, DISPID_IHTMLSTYLE_COLOR},
{attrCursor, DISPID_IHTMLSTYLE_CURSOR},
@@ -2063,15 +2066,19 @@ static HRESULT WINAPI HTMLStyle_get_styleFloat(IHTMLStyle *iface, BSTR *p)
static HRESULT WINAPI HTMLStyle_put_clear(IHTMLStyle *iface, BSTR v)
{
HTMLStyle *This = impl_from_IHTMLStyle(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_CLEAR, v, 0);
}
static HRESULT WINAPI HTMLStyle_get_clear(IHTMLStyle *iface, BSTR *p)
{
HTMLStyle *This = impl_from_IHTMLStyle(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ return get_style_attr(This, STYLEID_CLEAR, p);
}
static HRESULT WINAPI HTMLStyle_put_display(IHTMLStyle *iface, BSTR v)
diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h
index 571931b..0a45e05 100644
--- a/dlls/mshtml/htmlstyle.h
+++ b/dlls/mshtml/htmlstyle.h
@@ -61,6 +61,7 @@ typedef enum {
STYLEID_BORDER_TOP_WIDTH,
STYLEID_BORDER_WIDTH,
STYLEID_BOTTOM,
+ STYLEID_CLEAR,
STYLEID_CLIP,
STYLEID_COLOR,
STYLEID_CURSOR,
diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c
index 0584ef4..fd0f78e 100644
--- a/dlls/mshtml/tests/style.c
+++ b/dlls/mshtml/tests/style.c
@@ -1910,6 +1910,21 @@ static void test_body_style(IHTMLStyle *style)
ok(!strcmp_wa(str, "rect(0px 1px 500px 505px)"), "clip = %s\n", wine_dbgstr_w(str));
SysFreeString(str);
+ /* clear */
+ hres = IHTMLStyle_get_clear(style, &str);
+ ok(hres == S_OK, "get_clear failed: %08x\n", hres);
+ ok(!str, "clear = %s\n", wine_dbgstr_w(str));
+
+ str = a2bstr("both");
+ hres = IHTMLStyle_put_clear(style, str);
+ ok(hres == S_OK, "put_clear failed: %08x\n", hres);
+ SysFreeString(str);
+
+ hres = IHTMLStyle_get_clear(style, &str);
+ ok(hres == S_OK, "get_clear failed: %08x\n", hres);
+ ok(!strcmp_wa(str, "both"), "clear = %s\n", wine_dbgstr_w(str));
+ SysFreeString(str);
+
/* pageBreakAfter */
hres = IHTMLStyle_get_pageBreakAfter(style, &str);
ok(hres == S_OK, "get_pageBreakAfter failed: %08x\n", hres);
More information about the wine-cvs
mailing list