mshtml: Added IHTMLImgElement::height property implementation.

This commit is contained in:
Jacek Caban 2010-02-08 21:47:57 +01:00 committed by Alexandre Julliard
parent 11ec75c18b
commit a3ff647c1e
2 changed files with 27 additions and 7 deletions

View file

@ -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)

View file

@ -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);
}