mshtml: Added IHTMLStyle::clear property implementation.

This commit is contained in:
Jacek Caban 2012-10-23 13:41:13 +02:00 committed by Alexandre Julliard
parent f950f41bfe
commit 04c97d08eb
3 changed files with 27 additions and 4 deletions

View file

@ -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)

View file

@ -61,6 +61,7 @@ typedef enum {
STYLEID_BORDER_TOP_WIDTH,
STYLEID_BORDER_WIDTH,
STYLEID_BOTTOM,
STYLEID_CLEAR,
STYLEID_CLIP,
STYLEID_COLOR,
STYLEID_CURSOR,

View file

@ -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);