mshtml: Added IHTMLStyle::marginTop implementation.

This commit is contained in:
Jacek Caban 2009-12-14 01:03:15 +01:00 committed by Alexandre Julliard
parent 9178a94868
commit 0f940bccd4
2 changed files with 26 additions and 4 deletions

View File

@ -1219,15 +1219,19 @@ static HRESULT WINAPI HTMLStyle_get_lineHeight(IHTMLStyle *iface, VARIANT *p)
static HRESULT WINAPI HTMLStyle_put_marginTop(IHTMLStyle *iface, VARIANT v)
{
HTMLStyle *This = HTMLSTYLE_THIS(iface);
FIXME("(%p)->(v%d)\n", This, V_VT(&v));
return E_NOTIMPL;
TRACE("(%p)->(v%d)\n", This, V_VT(&v));
return set_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_TOP, &v, 0);
}
static HRESULT WINAPI HTMLStyle_get_marginTop(IHTMLStyle *iface, VARIANT *p)
{
HTMLStyle *This = HTMLSTYLE_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_MARGIN_TOP, p, 0);
}
static HRESULT WINAPI HTMLStyle_put_marginRight(IHTMLStyle *iface, VARIANT v)

View File

@ -3802,6 +3802,24 @@ static void test_default_style(IHTMLStyle *style)
hres = IHTMLStyle_put_margin(style, NULL);
ok(hres == S_OK, "put_margin failed: %08x\n", hres);
str = (void*)0xdeadbeef;
hres = IHTMLStyle_get_marginTop(style, &v);
ok(hres == S_OK, "get_marginTop failed: %08x\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(marginTop) = %d\n", V_VT(&v));
ok(!V_BSTR(&v), "V_BSTR(marginTop) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
V_VT(&v) = VT_BSTR;
V_BSTR(&v) = a2bstr("6px");
hres = IHTMLStyle_put_marginTop(style, v);
SysFreeString(V_BSTR(&v));
ok(hres == S_OK, "put_marginTop failed: %08x\n", hres);
str = (void*)0xdeadbeef;
hres = IHTMLStyle_get_marginTop(style, &v);
ok(hres == S_OK, "get_marginTop failed: %08x\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(marginTop) = %d\n", V_VT(&v));
ok(!strcmp_wa(V_BSTR(&v), "6px"), "V_BSTR(marginTop) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
str = NULL;
hres = IHTMLStyle_get_border(style, &str);
ok(hres == S_OK, "get_border failed: %08x\n", hres);