Alistair Leslie-Hughes : mshtml: Implement IHTMLStyle_get_paddingLeft.
Alexandre Julliard
julliard at winehq.org
Thu Feb 12 11:14:46 CST 2009
Module: wine
Branch: master
Commit: cfcc38a4b97a3ceaa03cb4b15ce94659b5594a4e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=cfcc38a4b97a3ceaa03cb4b15ce94659b5594a4e
Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date: Sun Feb 8 20:20:38 2009 +1100
mshtml: Implement IHTMLStyle_get_paddingLeft.
---
dlls/mshtml/htmlstyle.c | 14 ++++++++++++--
dlls/mshtml/tests/dom.c | 18 ++++++++++++++++++
2 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index 2e9be16..084dd35 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -1253,8 +1253,18 @@ static HRESULT WINAPI HTMLStyle_put_paddingLeft(IHTMLStyle *iface, VARIANT v)
static HRESULT WINAPI HTMLStyle_get_paddingLeft(IHTMLStyle *iface, VARIANT *p)
{
HTMLStyle *This = HTMLSTYLE_THIS(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ BSTR ret;
+ HRESULT hres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ hres = get_style_attr(This, STYLEID_PADDING_LEFT, &ret);
+ if(FAILED(hres))
+ return hres;
+
+ V_VT(p) = VT_BSTR;
+ V_BSTR(p) = ret;
+ return S_OK;
}
static HRESULT WINAPI HTMLStyle_put_padding(IHTMLStyle *iface, BSTR v)
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index ae24bcf..a1d1e15 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -2413,6 +2413,7 @@ static void test_default_style(IHTMLStyle *style)
float f;
BSTR sOverflowDefault;
BSTR sDefault;
+ VARIANT vDefault;
test_disp((IUnknown*)style, &DIID_DispHTMLStyle);
test_ifaces((IUnknown*)style, style_iids);
@@ -2988,6 +2989,23 @@ static void test_default_style(IHTMLStyle *style)
ok(!V_BSTR(&v), "str=%s\n", dbgstr_w(V_BSTR(&v)));
VariantClear(&v);
+ /* PaddingLeft */
+ hres = IHTMLStyle_get_paddingLeft(style, &vDefault);
+ ok(hres == S_OK, "get_paddingLeft: %08x\n", hres);
+
+ V_VT(&v) = VT_BSTR;
+ V_BSTR(&v) = a2bstr("10");
+ hres = IHTMLStyle_put_paddingLeft(style, v);
+ ok(hres == S_OK, "get_paddingLeft: %08x\n", hres);
+ VariantClear(&v);
+
+ hres = IHTMLStyle_get_paddingLeft(style, &v);
+ ok(hres == S_OK, "get_paddingLeft: %08x\n", hres);
+ ok(!strcmp_wa(V_BSTR(&v), "10px"), "expecte 10 = %s\n", dbgstr_w(V_BSTR(&v)));
+
+ hres = IHTMLStyle_put_paddingLeft(style, vDefault);
+ ok(hres == S_OK, "get_paddingLeft: %08x\n", hres);
+
hres = IHTMLStyle_QueryInterface(style, &IID_IHTMLStyle2, (void**)&style2);
ok(hres == S_OK, "Could not get IHTMLStyle2 iface: %08x\n", hres);
if(SUCCEEDED(hres)) {
More information about the wine-cvs
mailing list