>From 609d680204b6a42667fe54af1db36e23a5bf73e2 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Fri, 18 Sep 2009 20:18:45 +1000 Subject: [PATCH] Implement IHTMLCurrentStyle_get_lineHeight To: wine-patches --- dlls/mshtml/htmlcurstyle.c | 4 ++-- dlls/mshtml/htmlstyle.c | 3 +++ dlls/mshtml/htmlstyle.h | 1 + dlls/mshtml/tests/dom.c | 5 +++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlcurstyle.c b/dlls/mshtml/htmlcurstyle.c index a17fc48..737d1c9 100644 --- a/dlls/mshtml/htmlcurstyle.c +++ b/dlls/mshtml/htmlcurstyle.c @@ -410,8 +410,8 @@ static HRESULT WINAPI HTMLCurrentStyle_get_letterSpacing(IHTMLCurrentStyle *ifac static HRESULT WINAPI HTMLCurrentStyle_get_lineHeight(IHTMLCurrentStyle *iface, VARIANT *p) { HTMLCurrentStyle *This = HTMLCURSTYLE_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_LINE_HEIGHT, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_textIndent(IHTMLCurrentStyle *iface, VARIANT *p) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 4d3d9b1..9d9ca56 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -107,6 +107,8 @@ static const WCHAR attrLeft[] = {'l','e','f','t',0}; static const WCHAR attrLetterSpacing[] = {'l','e','t','t','e','r','-','s','p','a','c','i','n','g',0}; +static const WCHAR attrLineHeight[] = + {'l','i','n','e','-','h','e','i','g','h','t',0}; static const WCHAR attrMargin[] = {'m','a','r','g','i','n',0}; static const WCHAR attrMarginBottom[] = @@ -192,6 +194,7 @@ static const struct{ {attrHeight, DISPID_IHTMLSTYLE_HEIGHT}, {attrLeft, DISPID_IHTMLSTYLE_LEFT}, {attrLetterSpacing, DISPID_IHTMLSTYLE_LETTERSPACING}, + {attrLineHeight, DISPID_IHTMLSTYLE_LINEHEIGHT}, {attrMargin, DISPID_IHTMLSTYLE_MARGIN}, {attrMarginBottom, DISPID_IHTMLSTYLE_MARGINBOTTOM}, {attrMarginLeft, DISPID_IHTMLSTYLE_MARGINLEFT}, diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index dbe2970..994906e 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -71,6 +71,7 @@ typedef enum { STYLEID_HEIGHT, STYLEID_LEFT, STYLEID_LETTER_SPACING, + STYLEID_LINE_HEIGHT, STYLEID_MARGIN, STYLEID_MARGIN_BOTTOM, STYLEID_MARGIN_LEFT, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 158c108..c91c7d8 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2821,6 +2821,11 @@ static void test_current_style(IHTMLCurrentStyle *current_style) ok(hres == S_OK, "get_bottom failed: %08x\n", hres); ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v)); VariantClear(&v); + + hres = IHTMLCurrentStyle_get_lineHeight(current_style, &v); + ok(hres == S_OK, "get_lineHeight failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v)); + VariantClear(&v); } static void test_style2(IHTMLStyle2 *style2) -- 1.6.2.5