mshtml: Added IHTMLStyle::put_pixelWidth implementation.
This commit is contained in:
parent
f63da13c28
commit
d898f27af4
|
@ -594,6 +594,15 @@ static inline HRESULT set_style_pos(HTMLStyle *This, styleid_t sid, float value)
|
|||
return set_style_attr(This, sid, szValue, 0);
|
||||
}
|
||||
|
||||
static HRESULT set_style_pxattr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, LONG value)
|
||||
{
|
||||
WCHAR value_str[16];
|
||||
|
||||
sprintfW(value_str, px_formatW, value);
|
||||
|
||||
return set_nsstyle_attr(nsstyle, sid, value_str, 0);
|
||||
}
|
||||
|
||||
static HRESULT get_nsstyle_pos(HTMLStyle *This, styleid_t sid, float *p)
|
||||
{
|
||||
nsAString str_value;
|
||||
|
@ -2376,8 +2385,10 @@ static HRESULT WINAPI HTMLStyle_get_pixelLeft(IHTMLStyle *iface, LONG *p)
|
|||
static HRESULT WINAPI HTMLStyle_put_pixelWidth(IHTMLStyle *iface, LONG v)
|
||||
{
|
||||
HTMLStyle *This = impl_from_IHTMLStyle(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
|
||||
TRACE("(%p)->()\n", This);
|
||||
|
||||
return set_style_pxattr(This->nsstyle, STYLEID_WIDTH, v);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLStyle_get_pixelWidth(IHTMLStyle *iface, LONG *p)
|
||||
|
|
|
@ -826,6 +826,16 @@ static void test_body_style(IHTMLStyle *style)
|
|||
ok(!strcmp_wa(V_BSTR(&v), "100px"), "V_BSTR(v)=%s\n", wine_dbgstr_w(V_BSTR(&v)));
|
||||
VariantClear(&v);
|
||||
|
||||
hres = IHTMLStyle_put_pixelWidth(style, 50);
|
||||
ok(hres == S_OK, "put_pixelWidth failed: %08x\n", hres);
|
||||
|
||||
V_VT(&v) = VT_EMPTY;
|
||||
hres = IHTMLStyle_get_width(style, &v);
|
||||
ok(hres == S_OK, "get_width failed: %08x\n", hres);
|
||||
ok(V_VT(&v) == VT_BSTR, "V_VT(v)=%d\n", V_VT(&v));
|
||||
ok(!strcmp_wa(V_BSTR(&v), "50px"), "V_BSTR(v)=%s\n", wine_dbgstr_w(V_BSTR(&v)));
|
||||
VariantClear(&v);
|
||||
|
||||
/* margin tests */
|
||||
str = (void*)0xdeadbeef;
|
||||
hres = IHTMLStyle_get_margin(style, &str);
|
||||
|
|
Loading…
Reference in New Issue