mshtml: Implement IHTMLStyle_get_paddingLeft.

This commit is contained in:
Alistair Leslie-Hughes 2009-02-08 20:20:38 +11:00 committed by Alexandre Julliard
parent 74ac0d30bd
commit cfcc38a4b9
2 changed files with 30 additions and 2 deletions

View File

@ -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)

View File

@ -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)) {