mshtml: Added IHTMLStyleElement::lineHeight property.

This commit is contained in:
Zhenbo Li 2014-08-11 11:08:04 +08:00 committed by Alexandre Julliard
parent aa41321f49
commit ed9b0f758a
2 changed files with 30 additions and 4 deletions

View File

@ -1507,15 +1507,19 @@ static HRESULT WINAPI HTMLStyle_get_textIndent(IHTMLStyle *iface, VARIANT *p)
static HRESULT WINAPI HTMLStyle_put_lineHeight(IHTMLStyle *iface, VARIANT v)
{
HTMLStyle *This = impl_from_IHTMLStyle(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
return set_nsstyle_attr_var(This->nsstyle, STYLEID_LINE_HEIGHT, &v, 0);
}
static HRESULT WINAPI HTMLStyle_get_lineHeight(IHTMLStyle *iface, VARIANT *p)
{
HTMLStyle *This = impl_from_IHTMLStyle(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_LINE_HEIGHT, p, 0);
}
static HRESULT WINAPI HTMLStyle_put_marginTop(IHTMLStyle *iface, VARIANT v)

View File

@ -742,6 +742,28 @@ static void test_body_style(IHTMLStyle *style)
todo_wine
ok(!strcmp_wa(V_BSTR(&v), "#00fdfd"), "V_BSTR(color) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
V_VT(&v) = VT_I4;
V_I4(&v) = 3;
hres = IHTMLStyle_put_lineHeight(style, v);
ok(hres == S_OK, "put_lineHeight failed: %08x\n", hres);
hres = IHTMLStyle_get_lineHeight(style, &v);
ok(hres == S_OK, "get_lineHeight failed: %08x\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(lineHeight) = %d, expect VT_BSTR\n", V_VT(&v));
ok(!strcmp_wa(V_BSTR(&v), "3"), "V_BSTR(lineHeight) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
V_VT(&v) = VT_BSTR;
V_BSTR(&v) = a2bstr("300%");
hres = IHTMLStyle_put_lineHeight(style, v);
ok(hres == S_OK, "put_lineHeight failed: %08x\n", hres);
VariantClear(&v);
hres = IHTMLStyle_get_lineHeight(style, &v);
ok(hres == S_OK, "get_lineHeight failed: %08x\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(lineHeight) = %d, expect VT_BSTR\n", V_VT(&v));
ok(!strcmp_wa(V_BSTR(&v), "300%"), "V_BSTR(lineHeight) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
VariantClear(&v);
b = 0xfefe;
hres = IHTMLStyle_get_textDecorationUnderline(style, &b);
ok(hres == S_OK, "get_textDecorationUnderline failed: %08x\n", hres);