Zhenbo Li : mshtml: Added IHTMLStyleElement::lineHeight property.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Aug 11 17:03:46 CDT 2014
Module: wine
Branch: master
Commit: ed9b0f758ae6bdde28b87109eee4fdd120689f07
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ed9b0f758ae6bdde28b87109eee4fdd120689f07
Author: Zhenbo Li <litimetal at gmail.com>
Date: Mon Aug 11 11:08:04 2014 +0800
mshtml: Added IHTMLStyleElement::lineHeight property.
---
dlls/mshtml/htmlstyle.c | 12 ++++++++----
dlls/mshtml/tests/style.c | 22 ++++++++++++++++++++++
2 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index 6731149..2635c8b 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -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)
diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c
index bd4b200..9327f28 100644
--- a/dlls/mshtml/tests/style.c
+++ b/dlls/mshtml/tests/style.c
@@ -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);
More information about the wine-cvs
mailing list