From 18c7f48865b150984e9263bee96365724cf191dc Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Sun, 22 Feb 2009 19:50:09 +1100 Subject: [PATCH] mshtml: Implement IHTMLCurrentStyle_get_zIndex. --- dlls/mshtml/htmlcurstyle.c | 4 ++-- dlls/mshtml/tests/dom.c | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlcurstyle.c b/dlls/mshtml/htmlcurstyle.c index 01909bfe043..f297b0491b4 100644 --- a/dlls/mshtml/htmlcurstyle.c +++ b/dlls/mshtml/htmlcurstyle.c @@ -393,8 +393,8 @@ static HRESULT WINAPI HTMLCurrentStyle_get_visibility(IHTMLCurrentStyle *iface, static HRESULT WINAPI HTMLCurrentStyle_get_zIndex(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_Z_INDEX, p, ATTR_STR_TO_INT); } static HRESULT WINAPI HTMLCurrentStyle_get_letterSpacing(IHTMLCurrentStyle *iface, VARIANT *p) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 2c6cdcb5e16..222d93acb62 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2475,6 +2475,12 @@ static void test_current_style(IHTMLCurrentStyle *current_style) ok(hres == S_OK, "get_paddingLeft failed: %08x\n", hres); ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v)); VariantClear(&v); + + hres = IHTMLCurrentStyle_get_zIndex(current_style, &v); + ok(hres == S_OK, "get_zIndex failed: %08x\n", hres); + ok(V_VT(&v) == VT_I4, "V_VT(v) = %d\n", V_VT(&v)); + ok( V_I4(&v) == 1, "expect 1 got (%d)\n", V_I4(&v)); + VariantClear(&v); } static void test_style2(IHTMLStyle2 *style2)