Commit a3ff647c authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added IHTMLImgElement::height property implementation.

parent 11ec75c1
......@@ -494,15 +494,35 @@ static HRESULT WINAPI HTMLImgElement_get_width(IHTMLImgElement *iface, LONG *p)
static HRESULT WINAPI HTMLImgElement_put_height(IHTMLImgElement *iface, LONG v)
{
HTMLImgElement *This = HTMLIMG_THIS(iface);
FIXME("(%p)->(%d)\n", This, v);
return E_NOTIMPL;
nsresult nsres;
TRACE("(%p)->(%d)\n", This, v);
nsres = nsIDOMHTMLImageElement_SetHeight(This->nsimg, v);
if(NS_FAILED(nsres)) {
ERR("SetHeight failed: %08x\n", nsres);
return E_FAIL;
}
return S_OK;
}
static HRESULT WINAPI HTMLImgElement_get_height(IHTMLImgElement *iface, LONG *p)
{
HTMLImgElement *This = HTMLIMG_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
PRInt32 height;
nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
nsres = nsIDOMHTMLImageElement_GetHeight(This->nsimg, &height);
if(NS_FAILED(nsres)) {
ERR("GetHeight failed: %08x\n", nsres);
return E_FAIL;
}
*p = height;
return S_OK;
}
static HRESULT WINAPI HTMLImgElement_put_start(IHTMLImgElement *iface, BSTR v)
......
......@@ -1167,8 +1167,8 @@ static void _test_img_height(unsigned line, IHTMLImgElement *img, const long exp
HRESULT hres;
hres = IHTMLImgElement_get_height(img, &found);
todo_wine ok_(__FILE__,line) (hres == S_OK, "get_height failed: %08x\n", hres);
todo_wine ok_(__FILE__,line) (found == exp, "height=%d\n", found);
ok_(__FILE__,line) (hres == S_OK, "get_height failed: %08x\n", hres);
ok_(__FILE__,line) (found == exp, "height=%d\n", found);
}
#define test_img_put_height(o,w) _test_img_put_height(__LINE__,o,w)
......@@ -1177,7 +1177,7 @@ static void _test_img_put_height(unsigned line, IHTMLImgElement *img, const long
HRESULT hres;
hres = IHTMLImgElement_put_height(img, height);
todo_wine ok(hres == S_OK, "put_height failed: %08x\n", hres);
ok(hres == S_OK, "put_height failed: %08x\n", hres);
_test_img_height(line, img, height);
}
......
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