mshtml: Use set_nsstyle_attr_var in IHTMLStyle::put_left implementation.
This commit is contained in:
parent
6cf4060aff
commit
53d6b6616e
|
@ -1625,15 +1625,7 @@ static HRESULT WINAPI HTMLStyle_put_left(IHTMLStyle *iface, VARIANT v)
|
|||
|
||||
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
|
||||
|
||||
switch(V_VT(&v)) {
|
||||
case VT_BSTR:
|
||||
return set_style_attr(This, STYLEID_LEFT, V_BSTR(&v), 0);
|
||||
default:
|
||||
FIXME("unimplemented vt %d\n", V_VT(&v));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
return set_nsstyle_attr_var(This->nsstyle, STYLEID_LEFT, &v, 0);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLStyle_get_left(IHTMLStyle *iface, VARIANT *p)
|
||||
|
|
|
@ -2339,6 +2339,17 @@ static void test_default_style(IHTMLStyle *style)
|
|||
ok(!strcmp_wa(V_BSTR(&v), "3px"), "V_BSTR(v) = %s\n", dbgstr_w(V_BSTR(&v)));
|
||||
VariantClear(&v);
|
||||
|
||||
V_VT(&v) = VT_NULL;
|
||||
hres = IHTMLStyle_put_left(style, v);
|
||||
ok(hres == S_OK, "put_left failed: %08x\n", hres);
|
||||
|
||||
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(!V_BSTR(&v), "V_BSTR(v) != NULL\n");
|
||||
VariantClear(&v);
|
||||
|
||||
V_VT(&v) = VT_EMPTY;
|
||||
hres = IHTMLStyle_get_top(style, &v);
|
||||
ok(hres == S_OK, "get_top failed: %08x\n", hres);
|
||||
|
|
Loading…
Reference in New Issue