Jacek Caban : mshtml: Added IHTMLSelectElement:: selectedIndex property implementation.
Alexandre Julliard
julliard at winehq.org
Mon Oct 15 11:27:58 CDT 2007
Module: wine
Branch: master
Commit: a468ec5747d9b6e0ef4521ade5bf9cb703f27092
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a468ec5747d9b6e0ef4521ade5bf9cb703f27092
Author: Jacek Caban <jacek at codeweavers.com>
Date: Sun Oct 14 00:11:48 2007 +0200
mshtml: Added IHTMLSelectElement::selectedIndex property implementation.
---
dlls/mshtml/htmlselect.c | 24 ++++++++++++++++++++----
1 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmlselect.c b/dlls/mshtml/htmlselect.c
index 00d0f6f..d1ae86d 100644
--- a/dlls/mshtml/htmlselect.c
+++ b/dlls/mshtml/htmlselect.c
@@ -195,15 +195,31 @@ static HRESULT WINAPI HTMLSelectElement_get_onchange(IHTMLSelectElement *iface,
static HRESULT WINAPI HTMLSelectElement_put_selectedIndex(IHTMLSelectElement *iface, long v)
{
HTMLSelectElement *This = HTMLSELECT_THIS(iface);
- FIXME("(%p)->(%ld)\n", This, v);
- return E_NOTIMPL;
+ nsresult nsres;
+
+ TRACE("(%p)->(%ld)\n", This, v);
+
+ nsres = nsIDOMHTMLSelectElement_SetSelectedIndex(This->nsselect, v);
+ if(NS_FAILED(nsres))
+ ERR("SetSelectedIndex failed: %08x\n", nsres);
+
+ return S_OK;
}
static HRESULT WINAPI HTMLSelectElement_get_selectedIndex(IHTMLSelectElement *iface, long *p)
{
HTMLSelectElement *This = HTMLSELECT_THIS(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ PRInt32 idx = 0;
+ nsresult nsres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ nsres = nsIDOMHTMLSelectElement_GetSelectedIndex(This->nsselect, &idx);
+ if(NS_FAILED(nsres))
+ ERR("GetSelectedIndex failed: %08x\n", nsres);
+
+ *p = idx;
+ return S_OK;
}
static HRESULT WINAPI HTMLSelectElement_get_type(IHTMLSelectElement *iface, BSTR *p)
More information about the wine-cvs
mailing list