2006-03-06 22:38:02 +01:00
|
|
|
/*
|
|
|
|
* Copyright 2006 Jacek Caban for CodeWeavers
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2006-03-06 22:38:02 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
2012-06-28 11:20:05 +02:00
|
|
|
#include <assert.h>
|
2006-03-06 22:38:02 +01:00
|
|
|
|
|
|
|
#define COBJMACROS
|
|
|
|
|
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "winuser.h"
|
|
|
|
#include "ole2.h"
|
|
|
|
|
|
|
|
#include "wine/debug.h"
|
|
|
|
|
|
|
|
#include "mshtml_private.h"
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
|
|
|
|
|
|
|
|
typedef struct {
|
2007-09-15 16:07:26 +02:00
|
|
|
HTMLElement element;
|
|
|
|
|
2010-12-06 23:32:05 +01:00
|
|
|
IHTMLTextAreaElement IHTMLTextAreaElement_iface;
|
2006-03-06 22:38:02 +01:00
|
|
|
|
|
|
|
nsIDOMHTMLTextAreaElement *nstextarea;
|
|
|
|
} HTMLTextAreaElement;
|
|
|
|
|
2010-12-06 23:32:05 +01:00
|
|
|
static inline HTMLTextAreaElement *impl_from_IHTMLTextAreaElement(IHTMLTextAreaElement *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLTextAreaElement, IHTMLTextAreaElement_iface);
|
|
|
|
}
|
2006-03-06 22:38:02 +01:00
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_QueryInterface(IHTMLTextAreaElement *iface,
|
|
|
|
REFIID riid, void **ppv)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 22:38:02 +01:00
|
|
|
|
2010-12-30 01:39:16 +01:00
|
|
|
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI HTMLTextAreaElement_AddRef(IHTMLTextAreaElement *iface)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 22:38:02 +01:00
|
|
|
|
2010-12-30 01:39:16 +01:00
|
|
|
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI HTMLTextAreaElement_Release(IHTMLTextAreaElement *iface)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 22:38:02 +01:00
|
|
|
|
2010-12-30 01:39:16 +01:00
|
|
|
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_GetTypeInfoCount(IHTMLTextAreaElement *iface, UINT *pctinfo)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2010-12-31 11:07:33 +01:00
|
|
|
return IDispatchEx_GetTypeInfoCount(&This->element.node.dispex.IDispatchEx_iface, pctinfo);
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_GetTypeInfo(IHTMLTextAreaElement *iface, UINT iTInfo,
|
|
|
|
LCID lcid, ITypeInfo **ppTInfo)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2010-12-31 11:07:33 +01:00
|
|
|
return IDispatchEx_GetTypeInfo(&This->element.node.dispex.IDispatchEx_iface, iTInfo, lcid,
|
|
|
|
ppTInfo);
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_GetIDsOfNames(IHTMLTextAreaElement *iface, REFIID riid,
|
|
|
|
LPOLESTR *rgszNames, UINT cNames,
|
|
|
|
LCID lcid, DISPID *rgDispId)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2010-12-31 11:07:33 +01:00
|
|
|
return IDispatchEx_GetIDsOfNames(&This->element.node.dispex.IDispatchEx_iface, riid, rgszNames,
|
|
|
|
cNames, lcid, rgDispId);
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_Invoke(IHTMLTextAreaElement *iface, DISPID dispIdMember,
|
|
|
|
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
|
|
|
|
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2010-12-31 11:07:33 +01:00
|
|
|
return IDispatchEx_Invoke(&This->element.node.dispex.IDispatchEx_iface, dispIdMember, riid,
|
|
|
|
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_type(IHTMLTextAreaElement *iface, BSTR *p)
|
|
|
|
{
|
2010-10-28 00:30:55 +02:00
|
|
|
static const WCHAR textareaW[] = {'t','e','x','t','a','r','e','a',0};
|
|
|
|
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2010-10-28 00:30:55 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
*p = SysAllocString(textareaW);
|
|
|
|
if(!*p)
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
return S_OK;
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_value(IHTMLTextAreaElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2010-05-11 17:56:58 +02:00
|
|
|
nsAString value_str;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
nsAString_InitDepend(&value_str, v);
|
|
|
|
nsres = nsIDOMHTMLTextAreaElement_SetValue(This->nstextarea, &value_str);
|
|
|
|
nsAString_Finish(&value_str);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("SetValue failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_value(IHTMLTextAreaElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-07 23:11:09 +01:00
|
|
|
nsAString value_str;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsAString_Init(&value_str, NULL);
|
|
|
|
nsres = nsIDOMHTMLTextAreaElement_GetValue(This->nstextarea, &value_str);
|
2012-04-13 12:20:25 +02:00
|
|
|
return return_nsstr(nsres, &value_str, p);
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_name(IHTMLTextAreaElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 22:38:02 +01:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_name(IHTMLTextAreaElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-07 23:11:09 +01:00
|
|
|
nsAString name_str;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsAString_Init(&name_str, NULL);
|
|
|
|
nsres = nsIDOMHTMLTextAreaElement_GetName(This->nstextarea, &name_str);
|
2012-04-13 12:20:25 +02:00
|
|
|
return return_nsstr(nsres, &name_str, p);
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_status(IHTMLTextAreaElement *iface, VARIANT v)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 22:38:02 +01:00
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_status(IHTMLTextAreaElement *iface, VARIANT *p)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 22:38:02 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_disabled(IHTMLTextAreaElement *iface, VARIANT_BOOL v)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 22:38:02 +01:00
|
|
|
FIXME("(%p)->(%x)\n", This, v);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_disabled(IHTMLTextAreaElement *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 22:38:02 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_form(IHTMLTextAreaElement *iface, IHTMLFormElement **p)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2014-10-15 11:43:20 +02:00
|
|
|
nsIDOMHTMLFormElement *nsform;
|
|
|
|
nsIDOMNode *nsnode;
|
|
|
|
HTMLDOMNode *node;
|
|
|
|
nsresult nsres;
|
|
|
|
HRESULT hres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLTextAreaElement_GetForm(This->nstextarea, &nsform);
|
|
|
|
assert(nsres == NS_OK);
|
|
|
|
|
|
|
|
if(!nsform) {
|
|
|
|
*p = NULL;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLFormElement_QueryInterface(nsform, &IID_nsIDOMNode, (void**)&nsnode);
|
|
|
|
nsIDOMHTMLFormElement_Release(nsform);
|
|
|
|
assert(nsres == NS_OK);
|
|
|
|
|
|
|
|
hres = get_node(This->element.node.doc, nsnode, TRUE, &node);
|
|
|
|
nsIDOMNode_Release(nsnode);
|
|
|
|
if(FAILED(hres))
|
|
|
|
return hres;
|
|
|
|
|
|
|
|
hres = IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface, &IID_IHTMLFormElement, (void**)p);
|
|
|
|
IHTMLDOMNode_Release(&node->IHTMLDOMNode_iface);
|
|
|
|
return hres;
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_defaultValue(IHTMLTextAreaElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2015-03-13 13:07:25 +01:00
|
|
|
nsAString nsstr;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
nsAString_InitDepend(&nsstr, v);
|
|
|
|
nsres = nsIDOMHTMLTextAreaElement_SetDefaultValue(This->nstextarea, &nsstr);
|
|
|
|
nsAString_Finish(&nsstr);
|
|
|
|
return NS_SUCCEEDED(nsres) ? S_OK : E_FAIL;
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_defaultValue(IHTMLTextAreaElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2015-03-13 13:07:25 +01:00
|
|
|
nsAString nsstr;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsAString_Init(&nsstr, NULL);
|
|
|
|
nsres = nsIDOMHTMLTextAreaElement_GetDefaultValue(This->nstextarea, &nsstr);
|
|
|
|
return return_nsstr(nsres, &nsstr, p);
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_select(IHTMLTextAreaElement *iface)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 22:38:02 +01:00
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_onchange(IHTMLTextAreaElement *iface, VARIANT v)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 22:38:02 +01:00
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_onchange(IHTMLTextAreaElement *iface, VARIANT *p)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 22:38:02 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_onselect(IHTMLTextAreaElement *iface, VARIANT v)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 22:38:02 +01:00
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_onselect(IHTMLTextAreaElement *iface, VARIANT *p)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 22:38:02 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_readOnly(IHTMLTextAreaElement *iface, VARIANT_BOOL v)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2010-05-11 17:58:40 +02:00
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%x)\n", This, v);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLTextAreaElement_SetReadOnly(This->nstextarea, v != VARIANT_FALSE);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("SetReadOnly failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_readOnly(IHTMLTextAreaElement *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2012-03-15 11:55:01 +01:00
|
|
|
cpp_bool b;
|
2010-05-11 17:58:40 +02:00
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLTextAreaElement_GetReadOnly(This->nstextarea, &b);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("GetReadOnly failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
*p = b ? VARIANT_TRUE : VARIANT_FALSE;
|
|
|
|
return S_OK;
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_rows(IHTMLTextAreaElement *iface, LONG v)
|
2006-03-06 22:38:02 +01:00
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2009-03-12 01:43:18 +01:00
|
|
|
FIXME("(%p)->(%d)\n", This, v);
|
2006-03-06 22:38:02 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_rows(IHTMLTextAreaElement *iface, LONG *p)
|
2006-03-06 22:38:02 +01:00
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 22:38:02 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_cols(IHTMLTextAreaElement *iface, LONG v)
|
2006-03-06 22:38:02 +01:00
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2009-03-12 01:43:18 +01:00
|
|
|
FIXME("(%p)->(%d)\n", This, v);
|
2006-03-06 22:38:02 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_cols(IHTMLTextAreaElement *iface, LONG *p)
|
2006-03-06 22:38:02 +01:00
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 22:38:02 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_wrap(IHTMLTextAreaElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 22:38:02 +01:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_wrap(IHTMLTextAreaElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 22:38:02 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_createTextRange(IHTMLTextAreaElement *iface,
|
|
|
|
IHTMLTxtRange **range)
|
|
|
|
{
|
2010-12-06 23:32:05 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 22:38:02 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, range);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IHTMLTextAreaElementVtbl HTMLTextAreaElementVtbl = {
|
|
|
|
HTMLTextAreaElement_QueryInterface,
|
|
|
|
HTMLTextAreaElement_AddRef,
|
|
|
|
HTMLTextAreaElement_Release,
|
|
|
|
HTMLTextAreaElement_GetTypeInfoCount,
|
|
|
|
HTMLTextAreaElement_GetTypeInfo,
|
|
|
|
HTMLTextAreaElement_GetIDsOfNames,
|
|
|
|
HTMLTextAreaElement_Invoke,
|
|
|
|
HTMLTextAreaElement_get_type,
|
|
|
|
HTMLTextAreaElement_put_value,
|
|
|
|
HTMLTextAreaElement_get_value,
|
|
|
|
HTMLTextAreaElement_put_name,
|
|
|
|
HTMLTextAreaElement_get_name,
|
|
|
|
HTMLTextAreaElement_put_status,
|
|
|
|
HTMLTextAreaElement_get_status,
|
|
|
|
HTMLTextAreaElement_put_disabled,
|
|
|
|
HTMLTextAreaElement_get_disabled,
|
|
|
|
HTMLTextAreaElement_get_form,
|
|
|
|
HTMLTextAreaElement_put_defaultValue,
|
|
|
|
HTMLTextAreaElement_get_defaultValue,
|
|
|
|
HTMLTextAreaElement_select,
|
|
|
|
HTMLTextAreaElement_put_onchange,
|
|
|
|
HTMLTextAreaElement_get_onchange,
|
|
|
|
HTMLTextAreaElement_put_onselect,
|
|
|
|
HTMLTextAreaElement_get_onselect,
|
|
|
|
HTMLTextAreaElement_put_readOnly,
|
|
|
|
HTMLTextAreaElement_get_readOnly,
|
|
|
|
HTMLTextAreaElement_put_rows,
|
|
|
|
HTMLTextAreaElement_get_rows,
|
|
|
|
HTMLTextAreaElement_put_cols,
|
|
|
|
HTMLTextAreaElement_get_cols,
|
|
|
|
HTMLTextAreaElement_put_wrap,
|
|
|
|
HTMLTextAreaElement_get_wrap,
|
|
|
|
HTMLTextAreaElement_createTextRange
|
|
|
|
};
|
|
|
|
|
2010-12-27 20:13:09 +01:00
|
|
|
static inline HTMLTextAreaElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLTextAreaElement, element.node);
|
|
|
|
}
|
2007-10-04 02:08:56 +02:00
|
|
|
|
2007-10-04 02:10:36 +02:00
|
|
|
static HRESULT HTMLTextAreaElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
2010-12-27 20:13:09 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_HTMLDOMNode(iface);
|
2007-10-04 02:10:36 +02:00
|
|
|
|
|
|
|
*ppv = NULL;
|
|
|
|
|
|
|
|
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
2010-12-06 23:32:05 +01:00
|
|
|
*ppv = &This->IHTMLTextAreaElement_iface;
|
2007-10-04 02:10:36 +02:00
|
|
|
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
|
2010-12-06 23:32:05 +01:00
|
|
|
*ppv = &This->IHTMLTextAreaElement_iface;
|
2007-10-04 02:10:36 +02:00
|
|
|
}else if(IsEqualGUID(&IID_IHTMLTextAreaElement, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IHTMLTextAreaElement %p)\n", This, ppv);
|
2010-12-06 23:32:05 +01:00
|
|
|
*ppv = &This->IHTMLTextAreaElement_iface;
|
2007-10-04 02:10:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if(*ppv) {
|
|
|
|
IUnknown_AddRef((IUnknown*)*ppv);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
return HTMLElement_QI(&This->element.node, riid, ppv);
|
|
|
|
}
|
|
|
|
|
2008-10-09 22:26:41 +02:00
|
|
|
static HRESULT HTMLTextAreaElementImpl_put_disabled(HTMLDOMNode *iface, VARIANT_BOOL v)
|
|
|
|
{
|
2010-12-27 20:13:09 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_HTMLDOMNode(iface);
|
2010-12-06 23:32:05 +01:00
|
|
|
return IHTMLTextAreaElement_put_disabled(&This->IHTMLTextAreaElement_iface, v);
|
2008-10-09 22:26:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT HTMLTextAreaElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
2010-12-27 20:13:09 +01:00
|
|
|
HTMLTextAreaElement *This = impl_from_HTMLDOMNode(iface);
|
2010-12-06 23:32:05 +01:00
|
|
|
return IHTMLTextAreaElement_get_disabled(&This->IHTMLTextAreaElement_iface, p);
|
2008-10-09 22:26:41 +02:00
|
|
|
}
|
|
|
|
|
2014-12-21 19:29:46 +01:00
|
|
|
static BOOL HTMLTextAreaElement_is_text_edit(HTMLDOMNode *iface)
|
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2014-09-25 12:11:32 +02:00
|
|
|
static void HTMLTextAreaElement_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = impl_from_HTMLDOMNode(iface);
|
|
|
|
|
|
|
|
if(This->nstextarea)
|
|
|
|
note_cc_edge((nsISupports*)This->nstextarea, "This->nstextarea", cb);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void HTMLTextAreaElement_unlink(HTMLDOMNode *iface)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = impl_from_HTMLDOMNode(iface);
|
|
|
|
|
|
|
|
if(This->nstextarea) {
|
|
|
|
nsIDOMHTMLTextAreaElement *nstextarea = This->nstextarea;
|
|
|
|
|
|
|
|
This->nstextarea = NULL;
|
|
|
|
nsIDOMHTMLTextAreaElement_Release(nstextarea);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-10-04 02:09:48 +02:00
|
|
|
static const NodeImplVtbl HTMLTextAreaElementImplVtbl = {
|
2007-10-04 02:10:36 +02:00
|
|
|
HTMLTextAreaElement_QI,
|
2012-06-28 11:20:05 +02:00
|
|
|
HTMLElement_destructor,
|
2013-03-15 15:01:53 +01:00
|
|
|
HTMLElement_cpc,
|
2010-11-14 14:41:39 +01:00
|
|
|
HTMLElement_clone,
|
2012-09-04 13:58:58 +02:00
|
|
|
HTMLElement_handle_event,
|
2011-08-25 15:23:35 +02:00
|
|
|
HTMLElement_get_attr_col,
|
2009-09-08 22:29:39 +02:00
|
|
|
NULL,
|
2009-10-13 00:42:22 +02:00
|
|
|
NULL,
|
2008-10-09 22:26:41 +02:00
|
|
|
HTMLTextAreaElementImpl_put_disabled,
|
2014-09-25 12:11:32 +02:00
|
|
|
HTMLTextAreaElementImpl_get_disabled,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
HTMLTextAreaElement_traverse,
|
2014-12-21 19:29:46 +01:00
|
|
|
HTMLTextAreaElement_unlink,
|
|
|
|
HTMLTextAreaElement_is_text_edit
|
2007-10-04 02:09:48 +02:00
|
|
|
};
|
|
|
|
|
2010-01-28 23:53:55 +01:00
|
|
|
static const tid_t HTMLTextAreaElement_iface_tids[] = {
|
|
|
|
HTMLELEMENT_TIDS,
|
|
|
|
IHTMLTextAreaElement_tid,
|
|
|
|
0
|
|
|
|
};
|
|
|
|
|
|
|
|
static dispex_static_data_t HTMLTextAreaElement_dispex = {
|
|
|
|
NULL,
|
|
|
|
DispHTMLTextAreaElement_tid,
|
|
|
|
NULL,
|
|
|
|
HTMLTextAreaElement_iface_tids
|
|
|
|
};
|
|
|
|
|
2010-12-01 22:43:14 +01:00
|
|
|
HRESULT HTMLTextAreaElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
2006-03-06 22:38:02 +01:00
|
|
|
{
|
2010-12-01 22:43:14 +01:00
|
|
|
HTMLTextAreaElement *ret;
|
2006-03-06 22:38:02 +01:00
|
|
|
nsresult nsres;
|
|
|
|
|
2010-12-01 22:43:14 +01:00
|
|
|
ret = heap_alloc_zero(sizeof(HTMLTextAreaElement));
|
|
|
|
if(!ret)
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
2010-12-06 23:32:05 +01:00
|
|
|
ret->IHTMLTextAreaElement_iface.lpVtbl = &HTMLTextAreaElementVtbl;
|
2007-10-04 02:09:48 +02:00
|
|
|
ret->element.node.vtbl = &HTMLTextAreaElementImplVtbl;
|
2006-03-06 22:38:02 +01:00
|
|
|
|
2012-06-28 11:20:05 +02:00
|
|
|
HTMLElement_Init(&ret->element, doc, nselem, &HTMLTextAreaElement_dispex);
|
|
|
|
|
2014-09-25 12:11:32 +02:00
|
|
|
nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLTextAreaElement, (void**)&ret->nstextarea);
|
|
|
|
assert(nsres == NS_OK);
|
2010-12-01 22:43:14 +01:00
|
|
|
|
|
|
|
*elem = &ret->element;
|
|
|
|
return S_OK;
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|