mshtml: Add IHTMLStyle::get_pixelWidth implementation.
This commit is contained in:
parent
387257dd2c
commit
7152077b05
|
@ -2501,8 +2501,10 @@ static HRESULT WINAPI HTMLStyle_put_pixelWidth(IHTMLStyle *iface, LONG v)
|
||||||
static HRESULT WINAPI HTMLStyle_get_pixelWidth(IHTMLStyle *iface, LONG *p)
|
static HRESULT WINAPI HTMLStyle_get_pixelWidth(IHTMLStyle *iface, LONG *p)
|
||||||
{
|
{
|
||||||
HTMLStyle *This = impl_from_IHTMLStyle(iface);
|
HTMLStyle *This = impl_from_IHTMLStyle(iface);
|
||||||
FIXME("(%p)->()\n", This);
|
|
||||||
return E_NOTIMPL;
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
|
return get_nsstyle_pixel_val(This, STYLEID_WIDTH, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLStyle_put_pixelHeight(IHTMLStyle *iface, LONG v)
|
static HRESULT WINAPI HTMLStyle_put_pixelHeight(IHTMLStyle *iface, LONG v)
|
||||||
|
|
|
@ -963,6 +963,11 @@ static void test_body_style(IHTMLStyle *style)
|
||||||
f == 2.2f, /* IE8 */
|
f == 2.2f, /* IE8 */
|
||||||
"f = %f\n", f);
|
"f = %f\n", f);
|
||||||
|
|
||||||
|
l = 0xdeadbeef;
|
||||||
|
hres = IHTMLStyle_get_pixelWidth(style, &l);
|
||||||
|
ok(hres == S_OK, "get_pixelWidth failed: %08x\n", hres);
|
||||||
|
ok(l == 2, "pixelWidth = %d\n", l);
|
||||||
|
|
||||||
V_VT(&v) = VT_BSTR;
|
V_VT(&v) = VT_BSTR;
|
||||||
V_BSTR(&v) = a2bstr("auto");
|
V_BSTR(&v) = a2bstr("auto");
|
||||||
hres = IHTMLStyle_put_width(style, v);
|
hres = IHTMLStyle_put_width(style, v);
|
||||||
|
@ -981,6 +986,11 @@ static void test_body_style(IHTMLStyle *style)
|
||||||
hres = IHTMLStyle_put_width(style, v);
|
hres = IHTMLStyle_put_width(style, v);
|
||||||
ok(hres == S_OK, "put_width failed: %08x\n", hres);
|
ok(hres == S_OK, "put_width failed: %08x\n", hres);
|
||||||
|
|
||||||
|
l = 0xdeadbeef;
|
||||||
|
hres = IHTMLStyle_get_pixelWidth(style, &l);
|
||||||
|
ok(hres == S_OK, "get_pixelWidth failed: %08x\n", hres);
|
||||||
|
ok(l == 100, "pixelWidth = %d\n", l);
|
||||||
|
|
||||||
V_VT(&v) = VT_EMPTY;
|
V_VT(&v) = VT_EMPTY;
|
||||||
hres = IHTMLStyle_get_width(style, &v);
|
hres = IHTMLStyle_get_width(style, &v);
|
||||||
ok(hres == S_OK, "get_width failed: %08x\n", hres);
|
ok(hres == S_OK, "get_width failed: %08x\n", hres);
|
||||||
|
@ -991,6 +1001,14 @@ static void test_body_style(IHTMLStyle *style)
|
||||||
hres = IHTMLStyle_put_pixelWidth(style, 50);
|
hres = IHTMLStyle_put_pixelWidth(style, 50);
|
||||||
ok(hres == S_OK, "put_pixelWidth failed: %08x\n", hres);
|
ok(hres == S_OK, "put_pixelWidth failed: %08x\n", hres);
|
||||||
|
|
||||||
|
l = 0xdeadbeef;
|
||||||
|
hres = IHTMLStyle_get_pixelWidth(style, &l);
|
||||||
|
ok(hres == S_OK, "get_pixelWidth failed: %08x\n", hres);
|
||||||
|
ok(l == 50, "pixelWidth = %d\n", l);
|
||||||
|
|
||||||
|
hres = IHTMLStyle_get_pixelWidth(style, NULL);
|
||||||
|
ok(hres == E_POINTER, "get_pixelWidth failed: %08x\n", hres);
|
||||||
|
|
||||||
V_VT(&v) = VT_EMPTY;
|
V_VT(&v) = VT_EMPTY;
|
||||||
hres = IHTMLStyle_get_width(style, &v);
|
hres = IHTMLStyle_get_width(style, &v);
|
||||||
ok(hres == S_OK, "get_width failed: %08x\n", hres);
|
ok(hres == S_OK, "get_width failed: %08x\n", hres);
|
||||||
|
|
Loading…
Reference in New Issue