Jacek Caban : mshtml: Added IHTMLStyle::put_pixelLeft implementation.

Alexandre Julliard julliard at winehq.org
Mon Jan 7 13:42:22 CST 2013


Module: wine
Branch: master
Commit: 0f60681a5ab0081ba765cddf2621eb7f559d755b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0f60681a5ab0081ba765cddf2621eb7f559d755b

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Jan  7 14:33:12 2013 +0100

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 2496077..efa3d5b 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 bcfd0e4..8ec69a6 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);




More information about the wine-cvs mailing list