Jacek Caban : mshtml:
Added get_name and get_value implementation of IHTMLTextAreaElement
interface .
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Mar 8 06:08:35 CST 2006
Module: wine
Branch: refs/heads/master
Commit: 6fafc22930e6ecc8978ca249ccbff9335fdcfdce
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=6fafc22930e6ecc8978ca249ccbff9335fdcfdce
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Mar 7 23:11:09 2006 +0100
mshtml: Added get_name and get_value implementation of IHTMLTextAreaElement interface.
---
dlls/mshtml/htmltextarea.c | 44 ++++++++++++++++++++++++++++++++++++++++----
1 files changed, 40 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmltextarea.c b/dlls/mshtml/htmltextarea.c
index 257194a..2c86c88 100644
--- a/dlls/mshtml/htmltextarea.c
+++ b/dlls/mshtml/htmltextarea.c
@@ -149,8 +149,26 @@ static HRESULT WINAPI HTMLTextAreaElemen
static HRESULT WINAPI HTMLTextAreaElement_get_value(IHTMLTextAreaElement *iface, BSTR *p)
{
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ nsAString value_str;
+ const PRUnichar *value;
+ nsresult nsres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ nsAString_Init(&value_str, NULL);
+
+ nsres = nsIDOMHTMLTextAreaElement_GetValue(This->nstextarea, &value_str);
+ if(NS_SUCCEEDED(nsres)) {
+ nsAString_GetData(&value_str, &value, NULL);
+ *p = SysAllocString(value);
+ }else {
+ ERR("GetValue failed: %08lx\n", nsres);
+ }
+
+ nsAString_Finish(&value_str);
+
+ TRACE("%s\n", debugstr_w(*p));
+ return S_OK;
}
static HRESULT WINAPI HTMLTextAreaElement_put_name(IHTMLTextAreaElement *iface, BSTR v)
@@ -163,8 +181,26 @@ static HRESULT WINAPI HTMLTextAreaElemen
static HRESULT WINAPI HTMLTextAreaElement_get_name(IHTMLTextAreaElement *iface, BSTR *p)
{
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ nsAString name_str;
+ const PRUnichar *name;
+ nsresult nsres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ nsAString_Init(&name_str, NULL);
+
+ nsres = nsIDOMHTMLTextAreaElement_GetName(This->nstextarea, &name_str);
+ if(NS_SUCCEEDED(nsres)) {
+ nsAString_GetData(&name_str, &name, NULL);
+ *p = SysAllocString(name);
+ }else {
+ ERR("GetName failed: %08lx\n", nsres);
+ }
+
+ nsAString_Finish(&name_str);
+
+ TRACE("%s\n", debugstr_w(*p));
+ return S_OK;
}
static HRESULT WINAPI HTMLTextAreaElement_put_status(IHTMLTextAreaElement *iface, VARIANT v)
More information about the wine-cvs
mailing list