mshtml: Added IHTMLStyle::marginTop implementation.
This commit is contained in:
parent
9178a94868
commit
0f940bccd4
|
@ -1219,15 +1219,19 @@ static HRESULT WINAPI HTMLStyle_get_lineHeight(IHTMLStyle *iface, VARIANT *p)
|
||||||
static HRESULT WINAPI HTMLStyle_put_marginTop(IHTMLStyle *iface, VARIANT v)
|
static HRESULT WINAPI HTMLStyle_put_marginTop(IHTMLStyle *iface, VARIANT v)
|
||||||
{
|
{
|
||||||
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
||||||
FIXME("(%p)->(v%d)\n", This, V_VT(&v));
|
|
||||||
return E_NOTIMPL;
|
TRACE("(%p)->(v%d)\n", This, V_VT(&v));
|
||||||
|
|
||||||
|
return set_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_TOP, &v, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLStyle_get_marginTop(IHTMLStyle *iface, VARIANT *p)
|
static HRESULT WINAPI HTMLStyle_get_marginTop(IHTMLStyle *iface, VARIANT *p)
|
||||||
{
|
{
|
||||||
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, p);
|
|
||||||
return E_NOTIMPL;
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
|
return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_TOP, p, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLStyle_put_marginRight(IHTMLStyle *iface, VARIANT v)
|
static HRESULT WINAPI HTMLStyle_put_marginRight(IHTMLStyle *iface, VARIANT v)
|
||||||
|
|
|
@ -3802,6 +3802,24 @@ static void test_default_style(IHTMLStyle *style)
|
||||||
hres = IHTMLStyle_put_margin(style, NULL);
|
hres = IHTMLStyle_put_margin(style, NULL);
|
||||||
ok(hres == S_OK, "put_margin failed: %08x\n", hres);
|
ok(hres == S_OK, "put_margin failed: %08x\n", hres);
|
||||||
|
|
||||||
|
str = (void*)0xdeadbeef;
|
||||||
|
hres = IHTMLStyle_get_marginTop(style, &v);
|
||||||
|
ok(hres == S_OK, "get_marginTop failed: %08x\n", hres);
|
||||||
|
ok(V_VT(&v) == VT_BSTR, "V_VT(marginTop) = %d\n", V_VT(&v));
|
||||||
|
ok(!V_BSTR(&v), "V_BSTR(marginTop) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
|
||||||
|
|
||||||
|
V_VT(&v) = VT_BSTR;
|
||||||
|
V_BSTR(&v) = a2bstr("6px");
|
||||||
|
hres = IHTMLStyle_put_marginTop(style, v);
|
||||||
|
SysFreeString(V_BSTR(&v));
|
||||||
|
ok(hres == S_OK, "put_marginTop failed: %08x\n", hres);
|
||||||
|
|
||||||
|
str = (void*)0xdeadbeef;
|
||||||
|
hres = IHTMLStyle_get_marginTop(style, &v);
|
||||||
|
ok(hres == S_OK, "get_marginTop failed: %08x\n", hres);
|
||||||
|
ok(V_VT(&v) == VT_BSTR, "V_VT(marginTop) = %d\n", V_VT(&v));
|
||||||
|
ok(!strcmp_wa(V_BSTR(&v), "6px"), "V_BSTR(marginTop) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
|
||||||
|
|
||||||
str = NULL;
|
str = NULL;
|
||||||
hres = IHTMLStyle_get_border(style, &str);
|
hres = IHTMLStyle_get_border(style, &str);
|
||||||
ok(hres == S_OK, "get_border failed: %08x\n", hres);
|
ok(hres == S_OK, "get_border failed: %08x\n", hres);
|
||||||
|
|
Loading…
Reference in New Issue