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