From 0f60681a5ab0081ba765cddf2621eb7f559d755b Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Mon, 7 Jan 2013 14:33:12 +0100 Subject: [PATCH] mshtml: Added IHTMLStyle::put_pixelLeft implementation. --- dlls/mshtml/htmlstyle.c | 6 ++++-- dlls/mshtml/tests/style.c | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 2496077261e..efa3d5b4323 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -2412,8 +2412,10 @@ static HRESULT WINAPI HTMLStyle_get_pixelTop(IHTMLStyle *iface, LONG *p) static HRESULT WINAPI HTMLStyle_put_pixelLeft(IHTMLStyle *iface, LONG v) { HTMLStyle *This = impl_from_IHTMLStyle(iface); - FIXME("(%p)->()\n", This); - return E_NOTIMPL; + + TRACE("(%p)->(%d)\n", This, v); + + return set_style_pxattr(This->nsstyle, STYLEID_LEFT, v); } static HRESULT WINAPI HTMLStyle_get_pixelLeft(IHTMLStyle *iface, LONG *p) diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c index bcfd0e424d1..8ec69a6a6c1 100644 --- a/dlls/mshtml/tests/style.c +++ b/dlls/mshtml/tests/style.c @@ -984,6 +984,21 @@ static void test_body_style(IHTMLStyle *style) ok(hres == S_OK, "get_pixelLeft failed: %08x\n", hres); ok(!l, "pixelLeft = %d\n", l); + hres = IHTMLStyle_put_pixelLeft(style, 6); + ok(hres == S_OK, "put_pixelLeft failed: %08x\n", hres); + + l = 0xdeadbeef; + hres = IHTMLStyle_get_pixelLeft(style, &l); + ok(hres == S_OK, "get_pixelLeft failed: %08x\n", hres); + ok(l == 6, "pixelLeft = %d\n", l); + + V_VT(&v) = VT_EMPTY; + hres = IHTMLStyle_get_left(style, &v); + ok(hres == S_OK, "get_left failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v)=%d\n", V_VT(&v)); + ok(!strcmp_wa(V_BSTR(&v), "6px"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v))); + VariantClear(&v); + /* Test posTop */ hres = IHTMLStyle_get_posTop(style, NULL); ok(hres == E_POINTER, "get_posTop failed: %08x\n", hres);