Commit cfcc38a4 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

mshtml: Implement IHTMLStyle_get_paddingLeft.

parent 74ac0d30
......@@ -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)
......
......@@ -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)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment