Jacek Caban : mshtml: Added IHTMLImgElement::height property implementation .
Alexandre Julliard
julliard at winehq.org
Tue Feb 9 10:37:55 CST 2010
Module: wine
Branch: master
Commit: a3ff647c1e8741b4e2ea1c67d66b497ff1277121
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a3ff647c1e8741b4e2ea1c67d66b497ff1277121
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Feb 8 21:47:57 2010 +0100
mshtml: Added IHTMLImgElement::height property implementation.
---
dlls/mshtml/htmlimg.c | 28 ++++++++++++++++++++++++----
dlls/mshtml/tests/dom.c | 6 +++---
2 files changed, 27 insertions(+), 7 deletions(-)
diff --git a/dlls/mshtml/htmlimg.c b/dlls/mshtml/htmlimg.c
index 8fbfcae..17b6cce 100644
--- a/dlls/mshtml/htmlimg.c
+++ b/dlls/mshtml/htmlimg.c
@@ -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)
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index db16b99..ba8f7bd 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -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);
}
More information about the wine-cvs
mailing list