Commit 7152077b authored by Jactry Zeng's avatar Jactry Zeng Committed by Alexandre Julliard

mshtml: Add IHTMLStyle::get_pixelWidth implementation.

parent 387257dd
......@@ -2501,8 +2501,10 @@ static HRESULT WINAPI HTMLStyle_put_pixelWidth(IHTMLStyle *iface, LONG v)
static HRESULT WINAPI HTMLStyle_get_pixelWidth(IHTMLStyle *iface, LONG *p)
{
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)
......
......@@ -963,6 +963,11 @@ static void test_body_style(IHTMLStyle *style)
f == 2.2f, /* IE8 */
"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_BSTR(&v) = a2bstr("auto");
hres = IHTMLStyle_put_width(style, v);
......@@ -981,6 +986,11 @@ static void test_body_style(IHTMLStyle *style)
hres = IHTMLStyle_put_width(style, v);
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;
hres = IHTMLStyle_get_width(style, &v);
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);
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;
hres = IHTMLStyle_get_width(style, &v);
ok(hres == S_OK, "get_width failed: %08x\n", hres);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment