2006-03-06 22:35:56 +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:35:56 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
2012-06-28 11:20:28 +02:00
|
|
|
#include <assert.h>
|
2012-07-13 14:45:46 +02:00
|
|
|
#include <limits.h>
|
2006-03-06 22:35:56 +01:00
|
|
|
|
|
|
|
#define COBJMACROS
|
|
|
|
|
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "winuser.h"
|
|
|
|
#include "ole2.h"
|
|
|
|
|
|
|
|
#include "wine/debug.h"
|
|
|
|
|
|
|
|
#include "mshtml_private.h"
|
2009-10-13 00:42:22 +02:00
|
|
|
#include "htmlevent.h"
|
2006-03-06 22:35:56 +01:00
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
|
|
|
|
|
2017-04-14 14:36:00 +02:00
|
|
|
struct HTMLInputElement {
|
2007-09-15 16:06:36 +02:00
|
|
|
HTMLElement element;
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
IHTMLInputElement IHTMLInputElement_iface;
|
2010-12-06 23:32:30 +01:00
|
|
|
IHTMLInputTextElement IHTMLInputTextElement_iface;
|
2017-06-15 14:55:11 +02:00
|
|
|
IHTMLInputTextElement2 IHTMLInputTextElement2_iface;
|
2006-03-06 22:35:56 +01:00
|
|
|
|
|
|
|
nsIDOMHTMLInputElement *nsinput;
|
2017-04-14 14:36:00 +02:00
|
|
|
};
|
2006-03-06 22:35:56 +01:00
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
static inline HTMLInputElement *impl_from_IHTMLInputElement(IHTMLInputElement *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLInputElement, IHTMLInputElement_iface);
|
|
|
|
}
|
2010-12-06 23:32:30 +01:00
|
|
|
|
|
|
|
static inline HTMLInputElement *impl_from_IHTMLInputTextElement(IHTMLInputTextElement *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLInputElement, IHTMLInputTextElement_iface);
|
|
|
|
}
|
2006-03-06 22:35:56 +01:00
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_QueryInterface(IHTMLInputElement *iface,
|
|
|
|
REFIID riid, void **ppv)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
|
2010-12-30 01:39:16 +01:00
|
|
|
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI HTMLInputElement_AddRef(IHTMLInputElement *iface)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
|
2010-12-30 01:39:16 +01:00
|
|
|
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI HTMLInputElement_Release(IHTMLInputElement *iface)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
|
2010-12-30 01:39:16 +01:00
|
|
|
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_GetTypeInfoCount(IHTMLInputElement *iface, UINT *pctinfo)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2008-06-19 00:10:48 +02:00
|
|
|
|
2015-05-14 13:24:19 +02:00
|
|
|
return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo);
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_GetTypeInfo(IHTMLInputElement *iface, UINT iTInfo,
|
|
|
|
LCID lcid, ITypeInfo **ppTInfo)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2008-06-19 00:10:48 +02:00
|
|
|
|
2015-05-14 13:24:19 +02:00
|
|
|
return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid,
|
2010-12-31 11:07:33 +01:00
|
|
|
ppTInfo);
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_GetIDsOfNames(IHTMLInputElement *iface, REFIID riid,
|
|
|
|
LPOLESTR *rgszNames, UINT cNames,
|
|
|
|
LCID lcid, DISPID *rgDispId)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2008-06-19 00:10:48 +02:00
|
|
|
|
2015-05-14 13:24:19 +02:00
|
|
|
return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames,
|
2008-06-19 00:10:48 +02:00
|
|
|
cNames, lcid, rgDispId);
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_Invoke(IHTMLInputElement *iface, DISPID dispIdMember,
|
|
|
|
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
|
|
|
|
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2008-06-19 00:10:48 +02:00
|
|
|
|
2015-05-14 13:24:19 +02:00
|
|
|
return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid,
|
2010-12-31 11:07:33 +01:00
|
|
|
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_type(IHTMLInputElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2010-05-07 15:20:56 +02:00
|
|
|
nsAString type_str;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
/*
|
|
|
|
* FIXME:
|
|
|
|
* On IE setting type works only on dynamically created elements before adding them to DOM tree.
|
|
|
|
*/
|
|
|
|
nsAString_InitDepend(&type_str, v);
|
|
|
|
nsres = nsIDOMHTMLInputElement_SetType(This->nsinput, &type_str);
|
|
|
|
nsAString_Finish(&type_str);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("SetType failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_type(IHTMLInputElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-07 23:10:45 +01:00
|
|
|
nsAString type_str;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsAString_Init(&type_str, NULL);
|
|
|
|
nsres = nsIDOMHTMLInputElement_GetType(This->nsinput, &type_str);
|
2012-04-13 12:20:25 +02:00
|
|
|
return return_nsstr(nsres, &type_str, p);
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_value(IHTMLInputElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2008-06-19 00:10:15 +02:00
|
|
|
nsAString val_str;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
2010-01-28 23:56:31 +01:00
|
|
|
nsAString_InitDepend(&val_str, v);
|
2008-06-19 00:10:15 +02:00
|
|
|
nsres = nsIDOMHTMLInputElement_SetValue(This->nsinput, &val_str);
|
|
|
|
nsAString_Finish(&val_str);
|
|
|
|
if(NS_FAILED(nsres))
|
|
|
|
ERR("SetValue failed: %08x\n", nsres);
|
|
|
|
|
|
|
|
return S_OK;
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_value(IHTMLInputElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-07 23:10:45 +01:00
|
|
|
nsAString value_str;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsAString_Init(&value_str, NULL);
|
|
|
|
nsres = nsIDOMHTMLInputElement_GetValue(This->nsinput, &value_str);
|
2011-02-28 13:12:22 +01:00
|
|
|
return return_nsstr(nsres, &value_str, p);
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_name(IHTMLInputElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2010-05-07 15:21:41 +02:00
|
|
|
nsAString name_str;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
nsAString_InitDepend(&name_str, v);
|
|
|
|
nsres = nsIDOMHTMLInputElement_SetName(This->nsinput, &name_str);
|
|
|
|
nsAString_Finish(&name_str);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("SetName failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_name(IHTMLInputElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-07 23:10:45 +01:00
|
|
|
nsAString name_str;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsAString_Init(&name_str, NULL);
|
|
|
|
nsres = nsIDOMHTMLInputElement_GetName(This->nsinput, &name_str);
|
2012-04-13 12:20:25 +02:00
|
|
|
return return_nsstr(nsres, &name_str, p);
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_status(IHTMLInputElement *iface, VARIANT_BOOL v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%x)\n", This, v);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_status(IHTMLInputElement *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_disabled(IHTMLInputElement *iface, VARIANT_BOOL v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2008-06-24 22:24:42 +02:00
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%x)\n", This, v);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLInputElement_SetDisabled(This->nsinput, v != VARIANT_FALSE);
|
|
|
|
if(NS_FAILED(nsres))
|
|
|
|
ERR("SetDisabled failed: %08x\n", nsres);
|
|
|
|
|
|
|
|
return S_OK;
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_disabled(IHTMLInputElement *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2012-03-15 11:55:01 +01:00
|
|
|
cpp_bool disabled = FALSE;
|
2008-04-28 11:57:25 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsIDOMHTMLInputElement_GetDisabled(This->nsinput, &disabled);
|
|
|
|
|
2017-11-02 16:47:45 +01:00
|
|
|
*p = variant_bool(disabled);
|
2008-04-28 11:57:25 +02:00
|
|
|
return S_OK;
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_form(IHTMLInputElement *iface, IHTMLFormElement **p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2014-08-18 11:03:19 +02:00
|
|
|
nsIDOMHTMLFormElement *nsform;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLInputElement_GetForm(This->nsinput, &nsform);
|
2018-02-20 13:25:44 +01:00
|
|
|
return return_nsform(nsres, nsform, p);
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLInputElement_put_size(IHTMLInputElement *iface, LONG v)
|
2006-03-06 22:35:56 +01:00
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2014-08-18 11:03:06 +02:00
|
|
|
UINT32 val = v;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%d)\n", This, v);
|
|
|
|
if (v <= 0)
|
|
|
|
return CTL_E_INVALIDPROPERTYVALUE;
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLInputElement_SetSize(This->nsinput, val);
|
|
|
|
if (NS_FAILED(nsres)) {
|
|
|
|
ERR("Set Size(%u) failed: %08x\n", val, nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
return S_OK;
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLInputElement_get_size(IHTMLInputElement *iface, LONG *p)
|
2006-03-06 22:35:56 +01:00
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2014-08-18 11:03:06 +02:00
|
|
|
UINT32 val;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
if (p == NULL)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLInputElement_GetSize(This->nsinput, &val);
|
|
|
|
if (NS_FAILED(nsres)) {
|
|
|
|
ERR("Get Size failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
*p = val;
|
|
|
|
return S_OK;
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLInputElement_put_maxLength(IHTMLInputElement *iface, LONG v)
|
2006-03-06 22:35:56 +01:00
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2012-07-13 14:45:46 +02:00
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%d)\n", This, v);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLInputElement_SetMaxLength(This->nsinput, v);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
/* FIXME: Gecko throws an error on negative values, while MSHTML should accept them */
|
|
|
|
FIXME("SetMaxLength failed\n");
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLInputElement_get_maxLength(IHTMLInputElement *iface, LONG *p)
|
2006-03-06 22:35:56 +01:00
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2013-01-18 14:05:50 +01:00
|
|
|
LONG max_length;
|
2012-07-13 14:45:46 +02:00
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLInputElement_GetMaxLength(This->nsinput, &max_length);
|
|
|
|
assert(nsres == NS_OK);
|
|
|
|
|
|
|
|
/* Gecko reports -1 as default value, while MSHTML uses INT_MAX */
|
|
|
|
*p = max_length == -1 ? INT_MAX : max_length;
|
|
|
|
return S_OK;
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_select(IHTMLInputElement *iface)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2008-10-10 22:48:58 +02:00
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)\n", This);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLInputElement_Select(This->nsinput);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("Select failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_onchange(IHTMLInputElement *iface, VARIANT v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2012-07-13 14:45:19 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->()\n", This);
|
|
|
|
|
|
|
|
return set_node_event(&This->element.node, EVENTID_CHANGE, &v);
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_onchange(IHTMLInputElement *iface, VARIANT *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2012-07-13 14:45:19 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
return get_node_event(&This->element.node, EVENTID_CHANGE, p);
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_onselect(IHTMLInputElement *iface, VARIANT v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_onselect(IHTMLInputElement *iface, VARIANT *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_defaultValue(IHTMLInputElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2012-11-28 16:57:24 +01:00
|
|
|
nsAString nsstr;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
nsAString_InitDepend(&nsstr, v);
|
|
|
|
nsres = nsIDOMHTMLInputElement_SetDefaultValue(This->nsinput, &nsstr);
|
|
|
|
nsAString_Finish(&nsstr);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("SetValue failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_defaultValue(IHTMLInputElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2012-11-28 16:57:24 +01:00
|
|
|
nsAString nsstr;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsAString_Init(&nsstr, NULL);
|
|
|
|
nsres = nsIDOMHTMLInputElement_GetDefaultValue(This->nsinput, &nsstr);
|
|
|
|
return return_nsstr(nsres, &nsstr, p);
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_readOnly(IHTMLInputElement *iface, VARIANT_BOOL v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2014-08-18 11:03:14 +02:00
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%x)\n", This, v);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLInputElement_SetReadOnly(This->nsinput, v != VARIANT_FALSE);
|
|
|
|
if (NS_FAILED(nsres)) {
|
|
|
|
ERR("Set ReadOnly Failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
return S_OK;
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_readOnly(IHTMLInputElement *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2014-08-18 11:03:14 +02:00
|
|
|
nsresult nsres;
|
|
|
|
cpp_bool b;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLInputElement_GetReadOnly(This->nsinput, &b);
|
|
|
|
if (NS_FAILED(nsres)) {
|
|
|
|
ERR("Get ReadOnly Failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
2017-11-02 16:47:45 +01:00
|
|
|
|
|
|
|
*p = variant_bool(b);
|
2014-08-18 11:03:14 +02:00
|
|
|
return S_OK;
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_createTextRange(IHTMLInputElement *iface, IHTMLTxtRange **range)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, range);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_indeterminate(IHTMLInputElement *iface, VARIANT_BOOL v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%x)\n", This, v);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_indeterminate(IHTMLInputElement *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_defaultChecked(IHTMLInputElement *iface, VARIANT_BOOL v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2008-10-16 22:27:59 +02:00
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%x)\n", This, v);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLInputElement_SetDefaultChecked(This->nsinput, v != VARIANT_FALSE);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("SetDefaultChecked failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_defaultChecked(IHTMLInputElement *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2012-03-15 11:55:01 +01:00
|
|
|
cpp_bool default_checked = FALSE;
|
2008-10-16 22:27:59 +02:00
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLInputElement_GetDefaultChecked(This->nsinput, &default_checked);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("GetDefaultChecked failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
2017-11-02 16:47:45 +01:00
|
|
|
*p = variant_bool(default_checked);
|
2008-10-16 22:27:59 +02:00
|
|
|
return S_OK;
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_checked(IHTMLInputElement *iface, VARIANT_BOOL v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2008-10-16 22:28:08 +02:00
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%x)\n", This, v);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLInputElement_SetChecked(This->nsinput, v != VARIANT_FALSE);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("SetChecked failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_checked(IHTMLInputElement *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2012-03-15 11:55:01 +01:00
|
|
|
cpp_bool checked;
|
2006-03-07 23:10:45 +01:00
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLInputElement_GetChecked(This->nsinput, &checked);
|
|
|
|
if(NS_FAILED(nsres)) {
|
2006-10-05 23:50:39 +02:00
|
|
|
ERR("GetChecked failed: %08x\n", nsres);
|
2006-03-07 23:10:45 +01:00
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
2017-11-02 16:47:45 +01:00
|
|
|
*p = variant_bool(checked);
|
2006-03-07 23:10:45 +01:00
|
|
|
TRACE("checked=%x\n", *p);
|
|
|
|
return S_OK;
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_border(IHTMLInputElement *iface, VARIANT v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_border(IHTMLInputElement *iface, VARIANT *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLInputElement_put_vspace(IHTMLInputElement *iface, LONG v)
|
2006-03-06 22:35:56 +01:00
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2009-03-12 01:43:18 +01:00
|
|
|
FIXME("(%p)->(%d)\n", This, v);
|
2006-03-06 22:35:56 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLInputElement_get_vspace(IHTMLInputElement *iface, LONG *p)
|
2006-03-06 22:35:56 +01:00
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLInputElement_put_hspace(IHTMLInputElement *iface, LONG v)
|
2006-03-06 22:35:56 +01:00
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2009-03-12 01:43:18 +01:00
|
|
|
FIXME("(%p)->(%d)\n", This, v);
|
2006-03-06 22:35:56 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLInputElement_get_hspace(IHTMLInputElement *iface, LONG *p)
|
2006-03-06 22:35:56 +01:00
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_alt(IHTMLInputElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_alt(IHTMLInputElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_src(IHTMLInputElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2009-09-14 00:36:09 +02:00
|
|
|
nsAString nsstr;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
2010-01-28 23:56:31 +01:00
|
|
|
nsAString_InitDepend(&nsstr, v);
|
2009-09-14 00:36:09 +02:00
|
|
|
nsres = nsIDOMHTMLInputElement_SetSrc(This->nsinput, &nsstr);
|
|
|
|
nsAString_Finish(&nsstr);
|
|
|
|
if(NS_FAILED(nsres))
|
|
|
|
ERR("SetSrc failed: %08x\n", nsres);
|
|
|
|
|
|
|
|
return S_OK;
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_src(IHTMLInputElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2009-09-14 00:36:09 +02:00
|
|
|
const PRUnichar *src;
|
|
|
|
nsAString src_str;
|
|
|
|
nsresult nsres;
|
|
|
|
HRESULT hres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsAString_Init(&src_str, NULL);
|
|
|
|
nsres = nsIDOMHTMLInputElement_GetSrc(This->nsinput, &src_str);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("GetSrc failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsAString_GetData(&src_str, &src);
|
|
|
|
hres = nsuri_to_url(src, FALSE, p);
|
|
|
|
nsAString_Finish(&src_str);
|
|
|
|
|
|
|
|
return hres;
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_lowsrc(IHTMLInputElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_lowsrc(IHTMLInputElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_vrml(IHTMLInputElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_vrml(IHTMLInputElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_dynsrc(IHTMLInputElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_dynsrc(IHTMLInputElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_readyState(IHTMLInputElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_complete(IHTMLInputElement *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_loop(IHTMLInputElement *iface, VARIANT v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_loop(IHTMLInputElement *iface, VARIANT *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_align(IHTMLInputElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_align(IHTMLInputElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_onload(IHTMLInputElement *iface, VARIANT v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_onload(IHTMLInputElement *iface, VARIANT *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_onerror(IHTMLInputElement *iface, VARIANT v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_onerror(IHTMLInputElement *iface, VARIANT *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_onabort(IHTMLInputElement *iface, VARIANT v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_onabort(IHTMLInputElement *iface, VARIANT *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLInputElement_put_width(IHTMLInputElement *iface, LONG v)
|
2006-03-06 22:35:56 +01:00
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2009-03-12 01:43:18 +01:00
|
|
|
FIXME("(%p)->(%d)\n", This, v);
|
2006-03-06 22:35:56 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLInputElement_get_width(IHTMLInputElement *iface, LONG *p)
|
2006-03-06 22:35:56 +01:00
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLInputElement_put_height(IHTMLInputElement *iface, LONG v)
|
2006-03-06 22:35:56 +01:00
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2009-03-12 01:43:18 +01:00
|
|
|
FIXME("(%p)->(%d)\n", This, v);
|
2006-03-06 22:35:56 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLInputElement_get_height(IHTMLInputElement *iface, LONG *p)
|
2006-03-06 22:35:56 +01:00
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_put_start(IHTMLInputElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputElement_get_start(IHTMLInputElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:32:25 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
|
2006-03-06 22:35:56 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IHTMLInputElementVtbl HTMLInputElementVtbl = {
|
|
|
|
HTMLInputElement_QueryInterface,
|
|
|
|
HTMLInputElement_AddRef,
|
|
|
|
HTMLInputElement_Release,
|
|
|
|
HTMLInputElement_GetTypeInfoCount,
|
|
|
|
HTMLInputElement_GetTypeInfo,
|
|
|
|
HTMLInputElement_GetIDsOfNames,
|
|
|
|
HTMLInputElement_Invoke,
|
|
|
|
HTMLInputElement_put_type,
|
|
|
|
HTMLInputElement_get_type,
|
|
|
|
HTMLInputElement_put_value,
|
|
|
|
HTMLInputElement_get_value,
|
|
|
|
HTMLInputElement_put_name,
|
|
|
|
HTMLInputElement_get_name,
|
|
|
|
HTMLInputElement_put_status,
|
|
|
|
HTMLInputElement_get_status,
|
|
|
|
HTMLInputElement_put_disabled,
|
|
|
|
HTMLInputElement_get_disabled,
|
|
|
|
HTMLInputElement_get_form,
|
|
|
|
HTMLInputElement_put_size,
|
|
|
|
HTMLInputElement_get_size,
|
|
|
|
HTMLInputElement_put_maxLength,
|
|
|
|
HTMLInputElement_get_maxLength,
|
|
|
|
HTMLInputElement_select,
|
|
|
|
HTMLInputElement_put_onchange,
|
|
|
|
HTMLInputElement_get_onchange,
|
|
|
|
HTMLInputElement_put_onselect,
|
|
|
|
HTMLInputElement_get_onselect,
|
|
|
|
HTMLInputElement_put_defaultValue,
|
|
|
|
HTMLInputElement_get_defaultValue,
|
|
|
|
HTMLInputElement_put_readOnly,
|
|
|
|
HTMLInputElement_get_readOnly,
|
|
|
|
HTMLInputElement_createTextRange,
|
|
|
|
HTMLInputElement_put_indeterminate,
|
|
|
|
HTMLInputElement_get_indeterminate,
|
|
|
|
HTMLInputElement_put_defaultChecked,
|
|
|
|
HTMLInputElement_get_defaultChecked,
|
|
|
|
HTMLInputElement_put_checked,
|
|
|
|
HTMLInputElement_get_checked,
|
|
|
|
HTMLInputElement_put_border,
|
|
|
|
HTMLInputElement_get_border,
|
|
|
|
HTMLInputElement_put_vspace,
|
|
|
|
HTMLInputElement_get_vspace,
|
|
|
|
HTMLInputElement_put_hspace,
|
|
|
|
HTMLInputElement_get_hspace,
|
|
|
|
HTMLInputElement_put_alt,
|
|
|
|
HTMLInputElement_get_alt,
|
|
|
|
HTMLInputElement_put_src,
|
|
|
|
HTMLInputElement_get_src,
|
|
|
|
HTMLInputElement_put_lowsrc,
|
|
|
|
HTMLInputElement_get_lowsrc,
|
|
|
|
HTMLInputElement_put_vrml,
|
|
|
|
HTMLInputElement_get_vrml,
|
|
|
|
HTMLInputElement_put_dynsrc,
|
|
|
|
HTMLInputElement_get_dynsrc,
|
|
|
|
HTMLInputElement_get_readyState,
|
|
|
|
HTMLInputElement_get_complete,
|
|
|
|
HTMLInputElement_put_loop,
|
|
|
|
HTMLInputElement_get_loop,
|
|
|
|
HTMLInputElement_put_align,
|
|
|
|
HTMLInputElement_get_align,
|
|
|
|
HTMLInputElement_put_onload,
|
|
|
|
HTMLInputElement_get_onload,
|
|
|
|
HTMLInputElement_put_onerror,
|
|
|
|
HTMLInputElement_get_onerror,
|
|
|
|
HTMLInputElement_put_onabort,
|
|
|
|
HTMLInputElement_get_onabort,
|
|
|
|
HTMLInputElement_put_width,
|
|
|
|
HTMLInputElement_get_width,
|
|
|
|
HTMLInputElement_put_height,
|
|
|
|
HTMLInputElement_get_height,
|
|
|
|
HTMLInputElement_put_start,
|
|
|
|
HTMLInputElement_get_start
|
|
|
|
};
|
|
|
|
|
2007-10-04 02:16:05 +02:00
|
|
|
static HRESULT WINAPI HTMLInputTextElement_QueryInterface(IHTMLInputTextElement *iface,
|
|
|
|
REFIID riid, void **ppv)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
2010-12-30 01:39:16 +01:00
|
|
|
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI HTMLInputTextElement_AddRef(IHTMLInputTextElement *iface)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
2010-12-30 01:39:16 +01:00
|
|
|
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI HTMLInputTextElement_Release(IHTMLInputTextElement *iface)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
2010-12-30 01:39:16 +01:00
|
|
|
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_GetTypeInfoCount(IHTMLInputTextElement *iface, UINT *pctinfo)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2015-05-14 13:24:19 +02:00
|
|
|
return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_GetTypeInfo(IHTMLInputTextElement *iface, UINT iTInfo,
|
|
|
|
LCID lcid, ITypeInfo **ppTInfo)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2015-05-14 13:24:19 +02:00
|
|
|
return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid,
|
2010-12-31 11:07:33 +01:00
|
|
|
ppTInfo);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_GetIDsOfNames(IHTMLInputTextElement *iface, REFIID riid,
|
|
|
|
LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2015-05-14 13:24:19 +02:00
|
|
|
return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames,
|
2010-12-31 11:07:33 +01:00
|
|
|
cNames, lcid, rgDispId);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_Invoke(IHTMLInputTextElement *iface, DISPID dispIdMember,
|
|
|
|
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
|
|
|
|
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2015-05-14 13:24:19 +02:00
|
|
|
return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid,
|
2010-12-31 11:07:33 +01:00
|
|
|
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_get_type(IHTMLInputTextElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_get_type(&This->IHTMLInputElement_iface, p);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_put_value(IHTMLInputTextElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_put_value(&This->IHTMLInputElement_iface, v);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_get_value(IHTMLInputTextElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_get_value(&This->IHTMLInputElement_iface, p);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_put_name(IHTMLInputTextElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_put_name(&This->IHTMLInputElement_iface, v);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_get_name(IHTMLInputTextElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_get_name(&This->IHTMLInputElement_iface, p);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_put_status(IHTMLInputTextElement *iface, VARIANT v)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2012-03-28 14:27:20 +02:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
|
2007-10-04 02:16:05 +02:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_get_status(IHTMLInputTextElement *iface, VARIANT *p)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2012-03-28 14:27:20 +02:00
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
2007-10-04 02:16:05 +02:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_put_disabled(IHTMLInputTextElement *iface, VARIANT_BOOL v)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%x)\n", This, v);
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_put_disabled(&This->IHTMLInputElement_iface, v);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_get_disabled(IHTMLInputTextElement *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_get_disabled(&This->IHTMLInputElement_iface, p);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_get_form(IHTMLInputTextElement *iface, IHTMLFormElement **p)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_get_form(&This->IHTMLInputElement_iface, p);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_put_defaultValue(IHTMLInputTextElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_put_defaultValue(&This->IHTMLInputElement_iface, v);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_get_defaultValue(IHTMLInputTextElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_get_defaultValue(&This->IHTMLInputElement_iface, p);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLInputTextElement_put_size(IHTMLInputTextElement *iface, LONG v)
|
2007-10-04 02:16:05 +02:00
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
TRACE("(%p)->(%d)\n", This, v);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_put_size(&This->IHTMLInputElement_iface, v);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLInputTextElement_get_size(IHTMLInputTextElement *iface, LONG *p)
|
2007-10-04 02:16:05 +02:00
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_get_size(&This->IHTMLInputElement_iface, p);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLInputTextElement_put_maxLength(IHTMLInputTextElement *iface, LONG v)
|
2007-10-04 02:16:05 +02:00
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
TRACE("(%p)->(%d)\n", This, v);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_put_maxLength(&This->IHTMLInputElement_iface, v);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLInputTextElement_get_maxLength(IHTMLInputTextElement *iface, LONG *p)
|
2007-10-04 02:16:05 +02:00
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_get_maxLength(&This->IHTMLInputElement_iface, p);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_select(IHTMLInputTextElement *iface)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)\n", This);
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_select(&This->IHTMLInputElement_iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_put_onchange(IHTMLInputTextElement *iface, VARIANT v)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->()\n", This);
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_put_onchange(&This->IHTMLInputElement_iface, v);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_get_onchange(IHTMLInputTextElement *iface, VARIANT *p)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_get_onchange(&This->IHTMLInputElement_iface, p);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_put_onselect(IHTMLInputTextElement *iface, VARIANT v)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->()\n", This);
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_put_onselect(&This->IHTMLInputElement_iface, v);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_get_onselect(IHTMLInputTextElement *iface, VARIANT *p)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_get_onselect(&This->IHTMLInputElement_iface, p);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_put_readOnly(IHTMLInputTextElement *iface, VARIANT_BOOL v)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%x)\n", This, v);
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_put_readOnly(&This->IHTMLInputElement_iface, v);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_get_readOnly(IHTMLInputTextElement *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_get_readOnly(&This->IHTMLInputElement_iface, p);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement_createTextRange(IHTMLInputTextElement *iface, IHTMLTxtRange **range)
|
|
|
|
{
|
2010-12-06 23:32:30 +01:00
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
|
2007-10-04 02:16:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, range);
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_createTextRange(&This->IHTMLInputElement_iface, range);
|
2007-10-04 02:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static const IHTMLInputTextElementVtbl HTMLInputTextElementVtbl = {
|
|
|
|
HTMLInputTextElement_QueryInterface,
|
|
|
|
HTMLInputTextElement_AddRef,
|
|
|
|
HTMLInputTextElement_Release,
|
|
|
|
HTMLInputTextElement_GetTypeInfoCount,
|
|
|
|
HTMLInputTextElement_GetTypeInfo,
|
|
|
|
HTMLInputTextElement_GetIDsOfNames,
|
|
|
|
HTMLInputTextElement_Invoke,
|
|
|
|
HTMLInputTextElement_get_type,
|
|
|
|
HTMLInputTextElement_put_value,
|
|
|
|
HTMLInputTextElement_get_value,
|
|
|
|
HTMLInputTextElement_put_name,
|
|
|
|
HTMLInputTextElement_get_name,
|
|
|
|
HTMLInputTextElement_put_status,
|
|
|
|
HTMLInputTextElement_get_status,
|
|
|
|
HTMLInputTextElement_put_disabled,
|
|
|
|
HTMLInputTextElement_get_disabled,
|
|
|
|
HTMLInputTextElement_get_form,
|
|
|
|
HTMLInputTextElement_put_defaultValue,
|
|
|
|
HTMLInputTextElement_get_defaultValue,
|
|
|
|
HTMLInputTextElement_put_size,
|
|
|
|
HTMLInputTextElement_get_size,
|
|
|
|
HTMLInputTextElement_put_maxLength,
|
|
|
|
HTMLInputTextElement_get_maxLength,
|
|
|
|
HTMLInputTextElement_select,
|
|
|
|
HTMLInputTextElement_put_onchange,
|
|
|
|
HTMLInputTextElement_get_onchange,
|
|
|
|
HTMLInputTextElement_put_onselect,
|
|
|
|
HTMLInputTextElement_get_onselect,
|
|
|
|
HTMLInputTextElement_put_readOnly,
|
|
|
|
HTMLInputTextElement_get_readOnly,
|
|
|
|
HTMLInputTextElement_createTextRange
|
|
|
|
};
|
|
|
|
|
2017-06-15 14:55:11 +02:00
|
|
|
static inline HTMLInputElement *impl_from_IHTMLInputTextElement2(IHTMLInputTextElement2 *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLInputElement, IHTMLInputTextElement2_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement2_QueryInterface(IHTMLInputTextElement2 *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface);
|
|
|
|
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI HTMLInputTextElement2_AddRef(IHTMLInputTextElement2 *iface)
|
|
|
|
{
|
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface);
|
|
|
|
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI HTMLInputTextElement2_Release(IHTMLInputTextElement2 *iface)
|
|
|
|
{
|
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface);
|
|
|
|
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement2_GetTypeInfoCount(IHTMLInputTextElement2 *iface, UINT *pctinfo)
|
|
|
|
{
|
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface);
|
|
|
|
return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement2_GetTypeInfo(IHTMLInputTextElement2 *iface, UINT iTInfo,
|
|
|
|
LCID lcid, ITypeInfo **ppTInfo)
|
|
|
|
{
|
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface);
|
|
|
|
return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement2_GetIDsOfNames(IHTMLInputTextElement2 *iface, REFIID riid,
|
|
|
|
LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
|
|
|
|
{
|
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface);
|
|
|
|
return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames,
|
|
|
|
cNames, lcid, rgDispId);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement2_Invoke(IHTMLInputTextElement2 *iface, DISPID dispIdMember,
|
|
|
|
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
|
|
|
|
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
|
|
|
{
|
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface);
|
|
|
|
return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid,
|
|
|
|
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement2_put_selectionStart(IHTMLInputTextElement2 *iface, LONG v)
|
|
|
|
{
|
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface);
|
2017-06-15 13:47:37 +02:00
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%d)\n", This, v);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLInputElement_SetSelectionStart(This->nsinput, v);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("SetSelectionStart failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
return S_OK;
|
2017-06-15 14:55:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement2_get_selectionStart(IHTMLInputTextElement2 *iface, LONG *p)
|
|
|
|
{
|
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface);
|
2017-06-15 13:47:37 +02:00
|
|
|
INT32 selection_start;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLInputElement_GetSelectionStart(This->nsinput, &selection_start);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("GetSelectionStart failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
*p = selection_start;
|
|
|
|
return S_OK;
|
2017-06-15 14:55:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement2_put_selectionEnd(IHTMLInputTextElement2 *iface, LONG v)
|
|
|
|
{
|
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface);
|
2017-06-15 13:47:47 +02:00
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%d)\n", This, v);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLInputElement_SetSelectionEnd(This->nsinput, v);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("SetSelectionEnd failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
return S_OK;
|
2017-06-15 14:55:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement2_get_selectionEnd(IHTMLInputTextElement2 *iface, LONG *p)
|
|
|
|
{
|
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface);
|
2017-06-15 13:47:47 +02:00
|
|
|
INT32 selection_end;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLInputElement_GetSelectionEnd(This->nsinput, &selection_end);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("GetSelectionEnd failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
*p = selection_end;
|
|
|
|
return S_OK;
|
2017-06-15 14:55:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLInputTextElement2_setSelectionRange(IHTMLInputTextElement2 *iface, LONG start, LONG end)
|
|
|
|
{
|
|
|
|
HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface);
|
2017-06-15 13:47:57 +02:00
|
|
|
nsAString none_str;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%d %d)\n", This, start, end);
|
|
|
|
|
2020-11-24 00:49:05 +01:00
|
|
|
nsAString_InitDepend(&none_str, L"none");
|
2017-06-15 13:47:57 +02:00
|
|
|
nsres = nsIDOMHTMLInputElement_SetSelectionRange(This->nsinput, start, end, &none_str);
|
|
|
|
nsAString_Finish(&none_str);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("SetSelectionRange failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
return S_OK;
|
2017-06-15 14:55:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static const IHTMLInputTextElement2Vtbl HTMLInputTextElement2Vtbl = {
|
|
|
|
HTMLInputTextElement2_QueryInterface,
|
|
|
|
HTMLInputTextElement2_AddRef,
|
|
|
|
HTMLInputTextElement2_Release,
|
|
|
|
HTMLInputTextElement2_GetTypeInfoCount,
|
|
|
|
HTMLInputTextElement2_GetTypeInfo,
|
|
|
|
HTMLInputTextElement2_GetIDsOfNames,
|
|
|
|
HTMLInputTextElement2_Invoke,
|
|
|
|
HTMLInputTextElement2_put_selectionStart,
|
|
|
|
HTMLInputTextElement2_get_selectionStart,
|
|
|
|
HTMLInputTextElement2_put_selectionEnd,
|
|
|
|
HTMLInputTextElement2_get_selectionEnd,
|
|
|
|
HTMLInputTextElement2_setSelectionRange
|
|
|
|
};
|
|
|
|
|
2010-12-27 20:13:09 +01:00
|
|
|
static inline HTMLInputElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLInputElement, element.node);
|
|
|
|
}
|
2007-10-04 02:08:56 +02:00
|
|
|
|
2007-10-04 02:10:36 +02:00
|
|
|
static HRESULT HTMLInputElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
2010-12-27 20:13:09 +01:00
|
|
|
HTMLInputElement *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:25 +01:00
|
|
|
*ppv = &This->IHTMLInputElement_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:25 +01:00
|
|
|
*ppv = &This->IHTMLInputElement_iface;
|
2007-10-04 02:10:36 +02:00
|
|
|
}else if(IsEqualGUID(&IID_IHTMLInputElement, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IHTMLInputElement %p)\n", This, ppv);
|
2010-12-06 23:32:25 +01:00
|
|
|
*ppv = &This->IHTMLInputElement_iface;
|
2007-10-04 02:16:05 +02:00
|
|
|
}else if(IsEqualGUID(&IID_IHTMLInputTextElement, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IHTMLInputTextElement %p)\n", This, ppv);
|
2010-12-06 23:32:30 +01:00
|
|
|
*ppv = &This->IHTMLInputTextElement_iface;
|
2017-06-15 14:55:11 +02:00
|
|
|
}else if(IsEqualGUID(&IID_IHTMLInputTextElement2, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IHTMLInputTextElement2 %p)\n", This, ppv);
|
|
|
|
*ppv = &This->IHTMLInputTextElement2_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 HTMLInputElementImpl_put_disabled(HTMLDOMNode *iface, VARIANT_BOOL v)
|
|
|
|
{
|
2010-12-27 20:13:09 +01:00
|
|
|
HTMLInputElement *This = impl_from_HTMLDOMNode(iface);
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_put_disabled(&This->IHTMLInputElement_iface, v);
|
2008-10-09 22:26:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT HTMLInputElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
2010-12-27 20:13:09 +01:00
|
|
|
HTMLInputElement *This = impl_from_HTMLDOMNode(iface);
|
2010-12-06 23:32:25 +01:00
|
|
|
return IHTMLInputElement_get_disabled(&This->IHTMLInputElement_iface, p);
|
2008-10-09 22:26:41 +02:00
|
|
|
}
|
|
|
|
|
2014-12-21 19:29:46 +01:00
|
|
|
static BOOL HTMLInputElement_is_text_edit(HTMLDOMNode *iface)
|
|
|
|
{
|
|
|
|
HTMLInputElement *This = impl_from_HTMLDOMNode(iface);
|
|
|
|
const PRUnichar *type;
|
|
|
|
nsAString nsstr;
|
|
|
|
nsresult nsres;
|
|
|
|
BOOL ret = FALSE;
|
|
|
|
|
|
|
|
nsAString_Init(&nsstr, NULL);
|
|
|
|
nsres = nsIDOMHTMLInputElement_GetType(This->nsinput, &nsstr);
|
|
|
|
if(NS_SUCCEEDED(nsres)) {
|
|
|
|
nsAString_GetData(&nsstr, &type);
|
2020-11-24 00:49:05 +01:00
|
|
|
ret = !wcscmp(type, L"button") || !wcscmp(type, L"hidden") || !wcscmp(type, L"password")
|
|
|
|
|| !wcscmp(type, L"reset") || !wcscmp(type, L"submit") || !wcscmp(type, L"text");
|
2014-12-21 19:29:46 +01:00
|
|
|
}
|
|
|
|
nsAString_Finish(&nsstr);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2014-09-24 16:05:18 +02:00
|
|
|
static void HTMLInputElement_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb)
|
|
|
|
{
|
|
|
|
HTMLInputElement *This = impl_from_HTMLDOMNode(iface);
|
|
|
|
|
|
|
|
if(This->nsinput)
|
|
|
|
note_cc_edge((nsISupports*)This->nsinput, "This->nsinput", cb);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void HTMLInputElement_unlink(HTMLDOMNode *iface)
|
|
|
|
{
|
|
|
|
HTMLInputElement *This = impl_from_HTMLDOMNode(iface);
|
|
|
|
|
|
|
|
if(This->nsinput) {
|
|
|
|
nsIDOMHTMLInputElement *nsinput = This->nsinput;
|
|
|
|
|
|
|
|
This->nsinput = NULL;
|
|
|
|
nsIDOMHTMLInputElement_Release(nsinput);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-10-04 02:09:48 +02:00
|
|
|
static const NodeImplVtbl HTMLInputElementImplVtbl = {
|
2017-04-21 13:50:49 +02:00
|
|
|
&CLSID_HTMLInputElement,
|
2007-10-04 02:10:36 +02:00
|
|
|
HTMLInputElement_QI,
|
2012-06-28 11:20:28 +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,
|
2008-10-09 22:26:41 +02:00
|
|
|
HTMLInputElementImpl_put_disabled,
|
|
|
|
HTMLInputElementImpl_get_disabled,
|
2014-09-24 16:05:18 +02:00
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
HTMLInputElement_traverse,
|
2014-12-21 19:29:46 +01:00
|
|
|
HTMLInputElement_unlink,
|
|
|
|
HTMLInputElement_is_text_edit
|
2007-10-04 02:09:48 +02:00
|
|
|
};
|
|
|
|
|
2008-05-06 16:04:58 +02:00
|
|
|
static const tid_t HTMLInputElement_iface_tids[] = {
|
2010-01-28 02:09:02 +01:00
|
|
|
HTMLELEMENT_TIDS,
|
2008-05-06 16:04:58 +02:00
|
|
|
IHTMLInputElement_tid,
|
2017-06-15 13:48:06 +02:00
|
|
|
IHTMLInputTextElement2_tid,
|
2008-05-06 16:04:58 +02:00
|
|
|
0
|
|
|
|
};
|
2008-04-29 01:39:09 +02:00
|
|
|
static dispex_static_data_t HTMLInputElement_dispex = {
|
|
|
|
NULL,
|
|
|
|
DispHTMLInputElement_tid,
|
2016-07-07 12:50:18 +02:00
|
|
|
HTMLInputElement_iface_tids,
|
|
|
|
HTMLElement_init_dispex_info
|
2008-04-29 01:39:09 +02:00
|
|
|
};
|
|
|
|
|
2018-02-12 01:29:41 +01:00
|
|
|
HRESULT HTMLInputElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
|
2006-03-06 22:35:56 +01:00
|
|
|
{
|
2010-12-01 22:43:14 +01:00
|
|
|
HTMLInputElement *ret;
|
2006-03-06 22:35:56 +01:00
|
|
|
nsresult nsres;
|
|
|
|
|
2010-12-01 22:43:14 +01:00
|
|
|
ret = heap_alloc_zero(sizeof(HTMLInputElement));
|
|
|
|
if(!ret)
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
2010-12-06 23:32:25 +01:00
|
|
|
ret->IHTMLInputElement_iface.lpVtbl = &HTMLInputElementVtbl;
|
2010-12-06 23:32:30 +01:00
|
|
|
ret->IHTMLInputTextElement_iface.lpVtbl = &HTMLInputTextElementVtbl;
|
2017-06-15 14:55:11 +02:00
|
|
|
ret->IHTMLInputTextElement2_iface.lpVtbl = &HTMLInputTextElement2Vtbl;
|
2007-10-04 02:09:48 +02:00
|
|
|
ret->element.node.vtbl = &HTMLInputElementImplVtbl;
|
2006-03-06 22:35:56 +01:00
|
|
|
|
2012-06-28 11:20:28 +02:00
|
|
|
HTMLElement_Init(&ret->element, doc, nselem, &HTMLInputElement_dispex);
|
|
|
|
|
2018-02-12 01:29:41 +01:00
|
|
|
nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLInputElement, (void**)&ret->nsinput);
|
2014-09-24 16:05:18 +02:00
|
|
|
assert(nsres == NS_OK);
|
2010-12-01 22:43:14 +01:00
|
|
|
|
|
|
|
*elem = &ret->element;
|
|
|
|
return S_OK;
|
2006-03-06 22:35:56 +01:00
|
|
|
}
|
2013-02-28 13:15:15 +01:00
|
|
|
|
2017-04-14 14:35:40 +02:00
|
|
|
struct HTMLLabelElement {
|
2013-02-28 13:15:15 +01:00
|
|
|
HTMLElement element;
|
|
|
|
|
|
|
|
IHTMLLabelElement IHTMLLabelElement_iface;
|
2017-04-14 14:35:40 +02:00
|
|
|
};
|
2013-02-28 13:15:15 +01:00
|
|
|
|
|
|
|
static inline HTMLLabelElement *impl_from_IHTMLLabelElement(IHTMLLabelElement *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLLabelElement, IHTMLLabelElement_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLLabelElement_QueryInterface(IHTMLLabelElement *iface,
|
|
|
|
REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
|
|
|
|
|
|
|
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI HTMLLabelElement_AddRef(IHTMLLabelElement *iface)
|
|
|
|
{
|
|
|
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
|
|
|
|
|
|
|
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI HTMLLabelElement_Release(IHTMLLabelElement *iface)
|
|
|
|
{
|
|
|
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
|
|
|
|
|
|
|
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLLabelElement_GetTypeInfoCount(IHTMLLabelElement *iface, UINT *pctinfo)
|
|
|
|
{
|
|
|
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
|
|
|
|
2015-05-14 13:24:19 +02:00
|
|
|
return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo);
|
2013-02-28 13:15:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLLabelElement_GetTypeInfo(IHTMLLabelElement *iface, UINT iTInfo,
|
|
|
|
LCID lcid, ITypeInfo **ppTInfo)
|
|
|
|
{
|
|
|
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
|
|
|
|
2015-05-14 13:24:19 +02:00
|
|
|
return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
|
2013-02-28 13:15:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLLabelElement_GetIDsOfNames(IHTMLLabelElement *iface, REFIID riid,
|
|
|
|
LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
|
|
|
|
{
|
|
|
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
|
|
|
|
2015-05-14 13:24:19 +02:00
|
|
|
return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames,
|
2013-02-28 13:15:15 +01:00
|
|
|
cNames, lcid, rgDispId);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLLabelElement_Invoke(IHTMLLabelElement *iface, DISPID dispIdMember,
|
|
|
|
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
|
|
|
|
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
|
|
|
{
|
|
|
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
|
|
|
|
2015-05-14 13:24:19 +02:00
|
|
|
return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid,
|
2013-02-28 13:15:15 +01:00
|
|
|
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLLabelElement_put_htmlFor(IHTMLLabelElement *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
2013-08-22 17:13:56 +02:00
|
|
|
nsAString for_str, val_str;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
2020-11-24 00:49:05 +01:00
|
|
|
nsAString_InitDepend(&for_str, L"for");
|
2013-08-22 17:13:56 +02:00
|
|
|
nsAString_InitDepend(&val_str, v);
|
2018-02-12 23:28:15 +01:00
|
|
|
nsres = nsIDOMElement_SetAttribute(This->element.dom_element, &for_str, &val_str);
|
2013-08-22 17:13:56 +02:00
|
|
|
nsAString_Finish(&for_str);
|
|
|
|
nsAString_Finish(&val_str);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("SetAttribute failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2013-02-28 13:15:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLLabelElement_get_htmlFor(IHTMLLabelElement *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
2013-08-22 17:13:56 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2020-11-24 00:49:05 +01:00
|
|
|
return elem_string_attr_getter(&This->element, L"for", FALSE, p);
|
2013-02-28 13:15:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLLabelElement_put_accessKey(IHTMLLabelElement *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLLabelElement_get_accessKey(IHTMLLabelElement *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IHTMLLabelElementVtbl HTMLLabelElementVtbl = {
|
|
|
|
HTMLLabelElement_QueryInterface,
|
|
|
|
HTMLLabelElement_AddRef,
|
|
|
|
HTMLLabelElement_Release,
|
|
|
|
HTMLLabelElement_GetTypeInfoCount,
|
|
|
|
HTMLLabelElement_GetTypeInfo,
|
|
|
|
HTMLLabelElement_GetIDsOfNames,
|
|
|
|
HTMLLabelElement_Invoke,
|
|
|
|
HTMLLabelElement_put_htmlFor,
|
|
|
|
HTMLLabelElement_get_htmlFor,
|
|
|
|
HTMLLabelElement_put_accessKey,
|
|
|
|
HTMLLabelElement_get_accessKey
|
|
|
|
};
|
|
|
|
|
|
|
|
static inline HTMLLabelElement *label_from_HTMLDOMNode(HTMLDOMNode *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLLabelElement, element.node);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT HTMLLabelElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
HTMLLabelElement *This = label_from_HTMLDOMNode(iface);
|
|
|
|
|
|
|
|
*ppv = NULL;
|
|
|
|
|
|
|
|
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
|
|
|
*ppv = &This->IHTMLLabelElement_iface;
|
|
|
|
}else if(IsEqualGUID(&IID_IHTMLLabelElement, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IHTMLLabelElement %p)\n", This, ppv);
|
|
|
|
*ppv = &This->IHTMLLabelElement_iface;
|
|
|
|
}else {
|
|
|
|
return HTMLElement_QI(&This->element.node, riid, ppv);
|
|
|
|
}
|
|
|
|
|
|
|
|
IUnknown_AddRef((IUnknown*)*ppv);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const NodeImplVtbl HTMLLabelElementImplVtbl = {
|
2017-04-21 13:50:49 +02:00
|
|
|
&CLSID_HTMLLabelElement,
|
2013-02-28 13:15:15 +01:00
|
|
|
HTMLLabelElement_QI,
|
|
|
|
HTMLElement_destructor,
|
2013-03-15 15:01:53 +01:00
|
|
|
HTMLElement_cpc,
|
2013-02-28 13:15:15 +01:00
|
|
|
HTMLElement_clone,
|
|
|
|
HTMLElement_handle_event,
|
|
|
|
HTMLElement_get_attr_col,
|
|
|
|
};
|
|
|
|
|
|
|
|
static const tid_t HTMLLabelElement_iface_tids[] = {
|
|
|
|
HTMLELEMENT_TIDS,
|
|
|
|
IHTMLLabelElement_tid,
|
|
|
|
0
|
|
|
|
};
|
|
|
|
|
|
|
|
static dispex_static_data_t HTMLLabelElement_dispex = {
|
|
|
|
NULL,
|
|
|
|
DispHTMLLabelElement_tid,
|
2016-07-07 12:50:18 +02:00
|
|
|
HTMLLabelElement_iface_tids,
|
|
|
|
HTMLElement_init_dispex_info
|
2013-02-28 13:15:15 +01:00
|
|
|
};
|
|
|
|
|
2018-02-12 01:29:41 +01:00
|
|
|
HRESULT HTMLLabelElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
|
2013-02-28 13:15:15 +01:00
|
|
|
{
|
|
|
|
HTMLLabelElement *ret;
|
|
|
|
|
|
|
|
ret = heap_alloc_zero(sizeof(*ret));
|
|
|
|
if(!ret)
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
|
|
|
ret->IHTMLLabelElement_iface.lpVtbl = &HTMLLabelElementVtbl;
|
|
|
|
ret->element.node.vtbl = &HTMLLabelElementImplVtbl;
|
|
|
|
|
|
|
|
HTMLElement_Init(&ret->element, doc, nselem, &HTMLLabelElement_dispex);
|
|
|
|
*elem = &ret->element;
|
|
|
|
return S_OK;
|
|
|
|
}
|
2013-03-14 17:52:34 +01:00
|
|
|
|
2017-04-14 14:36:20 +02:00
|
|
|
struct HTMLButtonElement {
|
2013-03-14 17:52:34 +01:00
|
|
|
HTMLElement element;
|
|
|
|
|
|
|
|
IHTMLButtonElement IHTMLButtonElement_iface;
|
2013-03-18 14:06:10 +01:00
|
|
|
|
|
|
|
nsIDOMHTMLButtonElement *nsbutton;
|
2017-04-14 14:36:20 +02:00
|
|
|
};
|
2013-03-14 17:52:34 +01:00
|
|
|
|
|
|
|
static inline HTMLButtonElement *impl_from_IHTMLButtonElement(IHTMLButtonElement *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLButtonElement, IHTMLButtonElement_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLButtonElement_QueryInterface(IHTMLButtonElement *iface,
|
|
|
|
REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface);
|
|
|
|
|
|
|
|
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI HTMLButtonElement_AddRef(IHTMLButtonElement *iface)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface);
|
|
|
|
|
|
|
|
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI HTMLButtonElement_Release(IHTMLButtonElement *iface)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface);
|
|
|
|
|
|
|
|
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLButtonElement_GetTypeInfoCount(IHTMLButtonElement *iface, UINT *pctinfo)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface);
|
|
|
|
|
2015-05-14 13:24:19 +02:00
|
|
|
return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo);
|
2013-03-14 17:52:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLButtonElement_GetTypeInfo(IHTMLButtonElement *iface, UINT iTInfo,
|
|
|
|
LCID lcid, ITypeInfo **ppTInfo)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface);
|
|
|
|
|
2015-05-14 13:24:19 +02:00
|
|
|
return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
|
2013-03-14 17:52:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLButtonElement_GetIDsOfNames(IHTMLButtonElement *iface, REFIID riid,
|
|
|
|
LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface);
|
|
|
|
|
2015-05-14 13:24:19 +02:00
|
|
|
return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames,
|
2013-03-14 17:52:34 +01:00
|
|
|
cNames, lcid, rgDispId);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLButtonElement_Invoke(IHTMLButtonElement *iface, DISPID dispIdMember,
|
|
|
|
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
|
|
|
|
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface);
|
|
|
|
|
2015-05-14 13:24:19 +02:00
|
|
|
return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid,
|
2013-03-14 17:52:34 +01:00
|
|
|
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLButtonElement_get_type(IHTMLButtonElement *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface);
|
2016-06-16 19:32:34 +02:00
|
|
|
nsAString type_str;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsAString_Init(&type_str, NULL);
|
|
|
|
nsres = nsIDOMHTMLButtonElement_GetType(This->nsbutton, &type_str);
|
|
|
|
return return_nsstr(nsres, &type_str, p);
|
2013-03-14 17:52:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLButtonElement_put_value(IHTMLButtonElement *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface);
|
2016-06-16 19:30:18 +02:00
|
|
|
nsAString nsstr;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
nsAString_InitDepend(&nsstr, v);
|
|
|
|
nsres = nsIDOMHTMLButtonElement_SetValue(This->nsbutton, &nsstr);
|
|
|
|
nsAString_Finish(&nsstr);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("SetValue failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2013-03-14 17:52:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLButtonElement_get_value(IHTMLButtonElement *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface);
|
2016-06-16 19:30:18 +02:00
|
|
|
nsAString value_str;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsAString_Init(&value_str, NULL);
|
|
|
|
nsres = nsIDOMHTMLButtonElement_GetValue(This->nsbutton, &value_str);
|
|
|
|
return return_nsstr(nsres, &value_str, p);
|
2013-03-14 17:52:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLButtonElement_put_name(IHTMLButtonElement *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface);
|
2013-03-18 14:06:10 +01:00
|
|
|
nsAString name_str;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
nsAString_InitDepend(&name_str, v);
|
|
|
|
nsres = nsIDOMHTMLButtonElement_SetName(This->nsbutton, &name_str);
|
|
|
|
nsAString_Finish(&name_str);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("SetName failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2013-03-14 17:52:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLButtonElement_get_name(IHTMLButtonElement *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface);
|
2013-03-18 14:06:10 +01:00
|
|
|
nsAString name_str;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsAString_Init(&name_str, NULL);
|
|
|
|
nsres = nsIDOMHTMLButtonElement_GetName(This->nsbutton, &name_str);
|
|
|
|
return return_nsstr(nsres, &name_str, p);
|
2013-03-14 17:52:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLButtonElement_put_status(IHTMLButtonElement *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLButtonElement_get_status(IHTMLButtonElement *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLButtonElement_put_disabled(IHTMLButtonElement *iface, VARIANT_BOOL v)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface);
|
2013-03-27 13:12:39 +01:00
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%x)\n", This, v);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLButtonElement_SetDisabled(This->nsbutton, !!v);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("SetDisabled failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2013-03-14 17:52:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLButtonElement_get_disabled(IHTMLButtonElement *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface);
|
2013-03-27 13:12:39 +01:00
|
|
|
cpp_bool disabled;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLButtonElement_GetDisabled(This->nsbutton, &disabled);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("GetDisabled failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
2017-11-02 16:47:45 +01:00
|
|
|
*p = variant_bool(disabled);
|
2013-03-27 13:12:39 +01:00
|
|
|
return S_OK;
|
2013-03-14 17:52:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLButtonElement_get_form(IHTMLButtonElement *iface, IHTMLFormElement **p)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface);
|
2016-06-16 19:30:27 +02:00
|
|
|
nsIDOMHTMLFormElement *nsform;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLButtonElement_GetForm(This->nsbutton, &nsform);
|
2018-02-20 13:25:44 +01:00
|
|
|
return return_nsform(nsres, nsform, p);
|
2013-03-14 17:52:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLButtonElement_createTextRange(IHTMLButtonElement *iface, IHTMLTxtRange **range)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, range);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IHTMLButtonElementVtbl HTMLButtonElementVtbl = {
|
|
|
|
HTMLButtonElement_QueryInterface,
|
|
|
|
HTMLButtonElement_AddRef,
|
|
|
|
HTMLButtonElement_Release,
|
|
|
|
HTMLButtonElement_GetTypeInfoCount,
|
|
|
|
HTMLButtonElement_GetTypeInfo,
|
|
|
|
HTMLButtonElement_GetIDsOfNames,
|
|
|
|
HTMLButtonElement_Invoke,
|
|
|
|
HTMLButtonElement_get_type,
|
|
|
|
HTMLButtonElement_put_value,
|
|
|
|
HTMLButtonElement_get_value,
|
|
|
|
HTMLButtonElement_put_name,
|
|
|
|
HTMLButtonElement_get_name,
|
|
|
|
HTMLButtonElement_put_status,
|
|
|
|
HTMLButtonElement_get_status,
|
|
|
|
HTMLButtonElement_put_disabled,
|
|
|
|
HTMLButtonElement_get_disabled,
|
|
|
|
HTMLButtonElement_get_form,
|
|
|
|
HTMLButtonElement_createTextRange
|
|
|
|
};
|
|
|
|
|
|
|
|
static inline HTMLButtonElement *button_from_HTMLDOMNode(HTMLDOMNode *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLButtonElement, element.node);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT HTMLButtonElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = button_from_HTMLDOMNode(iface);
|
|
|
|
|
|
|
|
*ppv = NULL;
|
|
|
|
|
|
|
|
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
|
|
|
*ppv = &This->IHTMLButtonElement_iface;
|
|
|
|
}else if(IsEqualGUID(&IID_IHTMLButtonElement, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IHTMLButtonElement %p)\n", This, ppv);
|
|
|
|
*ppv = &This->IHTMLButtonElement_iface;
|
|
|
|
}else {
|
|
|
|
return HTMLElement_QI(&This->element.node, riid, ppv);
|
|
|
|
}
|
|
|
|
|
|
|
|
IUnknown_AddRef((IUnknown*)*ppv);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2013-03-27 13:12:39 +01:00
|
|
|
static HRESULT HTMLButtonElementImpl_put_disabled(HTMLDOMNode *iface, VARIANT_BOOL v)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = button_from_HTMLDOMNode(iface);
|
|
|
|
return IHTMLButtonElement_put_disabled(&This->IHTMLButtonElement_iface, v);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT HTMLButtonElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = button_from_HTMLDOMNode(iface);
|
|
|
|
return IHTMLButtonElement_get_disabled(&This->IHTMLButtonElement_iface, p);
|
|
|
|
}
|
|
|
|
|
2014-12-21 19:29:46 +01:00
|
|
|
static BOOL HTMLButtonElement_is_text_edit(HTMLDOMNode *iface)
|
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2014-09-26 15:11:48 +02:00
|
|
|
static void HTMLButtonElement_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = button_from_HTMLDOMNode(iface);
|
|
|
|
|
|
|
|
if(This->nsbutton)
|
|
|
|
note_cc_edge((nsISupports*)This->nsbutton, "This->nsbutton", cb);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void HTMLButtonElement_unlink(HTMLDOMNode *iface)
|
|
|
|
{
|
|
|
|
HTMLButtonElement *This = button_from_HTMLDOMNode(iface);
|
|
|
|
|
|
|
|
if(This->nsbutton) {
|
|
|
|
nsIDOMHTMLButtonElement *nsbutton = This->nsbutton;
|
|
|
|
|
|
|
|
This->nsbutton = NULL;
|
|
|
|
nsIDOMHTMLButtonElement_Release(nsbutton);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-03-14 17:52:34 +01:00
|
|
|
static const NodeImplVtbl HTMLButtonElementImplVtbl = {
|
2017-04-21 13:50:49 +02:00
|
|
|
&CLSID_HTMLButtonElement,
|
2013-03-14 17:52:34 +01:00
|
|
|
HTMLButtonElement_QI,
|
|
|
|
HTMLElement_destructor,
|
2013-03-15 15:01:53 +01:00
|
|
|
HTMLElement_cpc,
|
2013-03-14 17:52:34 +01:00
|
|
|
HTMLElement_clone,
|
|
|
|
HTMLElement_handle_event,
|
|
|
|
HTMLElement_get_attr_col,
|
2013-03-27 13:12:39 +01:00
|
|
|
NULL,
|
|
|
|
HTMLButtonElementImpl_put_disabled,
|
2014-09-26 15:11:48 +02:00
|
|
|
HTMLButtonElementImpl_get_disabled,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
HTMLButtonElement_traverse,
|
2014-12-21 19:29:46 +01:00
|
|
|
HTMLButtonElement_unlink,
|
|
|
|
HTMLButtonElement_is_text_edit
|
2013-03-14 17:52:34 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
static const tid_t HTMLButtonElement_iface_tids[] = {
|
|
|
|
HTMLELEMENT_TIDS,
|
|
|
|
IHTMLButtonElement_tid,
|
|
|
|
0
|
|
|
|
};
|
|
|
|
|
|
|
|
static dispex_static_data_t HTMLButtonElement_dispex = {
|
|
|
|
NULL,
|
|
|
|
DispHTMLButtonElement_tid,
|
2016-07-07 12:50:18 +02:00
|
|
|
HTMLButtonElement_iface_tids,
|
|
|
|
HTMLElement_init_dispex_info
|
2013-03-14 17:52:34 +01:00
|
|
|
};
|
|
|
|
|
2018-02-12 01:29:41 +01:00
|
|
|
HRESULT HTMLButtonElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
|
2013-03-14 17:52:34 +01:00
|
|
|
{
|
|
|
|
HTMLButtonElement *ret;
|
2013-03-18 14:06:10 +01:00
|
|
|
nsresult nsres;
|
2013-03-14 17:52:34 +01:00
|
|
|
|
|
|
|
ret = heap_alloc_zero(sizeof(*ret));
|
|
|
|
if(!ret)
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
|
|
|
ret->IHTMLButtonElement_iface.lpVtbl = &HTMLButtonElementVtbl;
|
|
|
|
ret->element.node.vtbl = &HTMLButtonElementImplVtbl;
|
|
|
|
|
|
|
|
HTMLElement_Init(&ret->element, doc, nselem, &HTMLButtonElement_dispex);
|
2013-03-18 14:06:10 +01:00
|
|
|
|
2018-02-12 01:29:41 +01:00
|
|
|
nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLButtonElement, (void**)&ret->nsbutton);
|
2014-09-26 15:11:48 +02:00
|
|
|
assert(nsres == NS_OK);
|
2013-03-18 14:06:10 +01:00
|
|
|
|
2013-03-14 17:52:34 +01:00
|
|
|
*elem = &ret->element;
|
|
|
|
return S_OK;
|
|
|
|
}
|