2 * Copyright 2006 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
30 #include "wine/debug.h"
32 #include "mshtml_private.h"
33 #include "htmlevent.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(mshtml
);
40 IHTMLInputElement IHTMLInputElement_iface
;
41 IHTMLInputTextElement IHTMLInputTextElement_iface
;
43 nsIDOMHTMLInputElement
*nsinput
;
46 static inline HTMLInputElement
*impl_from_IHTMLInputElement(IHTMLInputElement
*iface
)
48 return CONTAINING_RECORD(iface
, HTMLInputElement
, IHTMLInputElement_iface
);
51 static inline HTMLInputElement
*impl_from_IHTMLInputTextElement(IHTMLInputTextElement
*iface
)
53 return CONTAINING_RECORD(iface
, HTMLInputElement
, IHTMLInputTextElement_iface
);
56 static HRESULT WINAPI
HTMLInputElement_QueryInterface(IHTMLInputElement
*iface
,
57 REFIID riid
, void **ppv
)
59 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
61 return IHTMLDOMNode_QueryInterface(&This
->element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
64 static ULONG WINAPI
HTMLInputElement_AddRef(IHTMLInputElement
*iface
)
66 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
68 return IHTMLDOMNode_AddRef(&This
->element
.node
.IHTMLDOMNode_iface
);
71 static ULONG WINAPI
HTMLInputElement_Release(IHTMLInputElement
*iface
)
73 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
75 return IHTMLDOMNode_Release(&This
->element
.node
.IHTMLDOMNode_iface
);
78 static HRESULT WINAPI
HTMLInputElement_GetTypeInfoCount(IHTMLInputElement
*iface
, UINT
*pctinfo
)
80 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
82 return IDispatchEx_GetTypeInfoCount(&This
->element
.node
.dispex
.IDispatchEx_iface
, pctinfo
);
85 static HRESULT WINAPI
HTMLInputElement_GetTypeInfo(IHTMLInputElement
*iface
, UINT iTInfo
,
86 LCID lcid
, ITypeInfo
**ppTInfo
)
88 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
90 return IDispatchEx_GetTypeInfo(&This
->element
.node
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
94 static HRESULT WINAPI
HTMLInputElement_GetIDsOfNames(IHTMLInputElement
*iface
, REFIID riid
,
95 LPOLESTR
*rgszNames
, UINT cNames
,
96 LCID lcid
, DISPID
*rgDispId
)
98 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
100 return IDispatchEx_GetIDsOfNames(&This
->element
.node
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
101 cNames
, lcid
, rgDispId
);
104 static HRESULT WINAPI
HTMLInputElement_Invoke(IHTMLInputElement
*iface
, DISPID dispIdMember
,
105 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
106 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
108 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
110 return IDispatchEx_Invoke(&This
->element
.node
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
111 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
114 static HRESULT WINAPI
HTMLInputElement_put_type(IHTMLInputElement
*iface
, BSTR v
)
116 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
120 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
124 * On IE setting type works only on dynamically created elements before adding them to DOM tree.
126 nsAString_InitDepend(&type_str
, v
);
127 nsres
= nsIDOMHTMLInputElement_SetType(This
->nsinput
, &type_str
);
128 nsAString_Finish(&type_str
);
129 if(NS_FAILED(nsres
)) {
130 ERR("SetType failed: %08x\n", nsres
);
137 static HRESULT WINAPI
HTMLInputElement_get_type(IHTMLInputElement
*iface
, BSTR
*p
)
139 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
143 TRACE("(%p)->(%p)\n", This
, p
);
145 nsAString_Init(&type_str
, NULL
);
146 nsres
= nsIDOMHTMLInputElement_GetType(This
->nsinput
, &type_str
);
147 return return_nsstr(nsres
, &type_str
, p
);
150 static HRESULT WINAPI
HTMLInputElement_put_value(IHTMLInputElement
*iface
, BSTR v
)
152 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
156 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
158 nsAString_InitDepend(&val_str
, v
);
159 nsres
= nsIDOMHTMLInputElement_SetValue(This
->nsinput
, &val_str
);
160 nsAString_Finish(&val_str
);
162 ERR("SetValue failed: %08x\n", nsres
);
167 static HRESULT WINAPI
HTMLInputElement_get_value(IHTMLInputElement
*iface
, BSTR
*p
)
169 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
173 TRACE("(%p)->(%p)\n", This
, p
);
175 nsAString_Init(&value_str
, NULL
);
176 nsres
= nsIDOMHTMLInputElement_GetValue(This
->nsinput
, &value_str
);
177 return return_nsstr(nsres
, &value_str
, p
);
180 static HRESULT WINAPI
HTMLInputElement_put_name(IHTMLInputElement
*iface
, BSTR v
)
182 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
186 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
188 nsAString_InitDepend(&name_str
, v
);
189 nsres
= nsIDOMHTMLInputElement_SetName(This
->nsinput
, &name_str
);
190 nsAString_Finish(&name_str
);
191 if(NS_FAILED(nsres
)) {
192 ERR("SetName failed: %08x\n", nsres
);
199 static HRESULT WINAPI
HTMLInputElement_get_name(IHTMLInputElement
*iface
, BSTR
*p
)
201 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
205 TRACE("(%p)->(%p)\n", This
, p
);
207 nsAString_Init(&name_str
, NULL
);
208 nsres
= nsIDOMHTMLInputElement_GetName(This
->nsinput
, &name_str
);
209 return return_nsstr(nsres
, &name_str
, p
);
212 static HRESULT WINAPI
HTMLInputElement_put_status(IHTMLInputElement
*iface
, VARIANT_BOOL v
)
214 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
215 FIXME("(%p)->(%x)\n", This
, v
);
219 static HRESULT WINAPI
HTMLInputElement_get_status(IHTMLInputElement
*iface
, VARIANT_BOOL
*p
)
221 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
222 FIXME("(%p)->(%p)\n", This
, p
);
226 static HRESULT WINAPI
HTMLInputElement_put_disabled(IHTMLInputElement
*iface
, VARIANT_BOOL v
)
228 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
231 TRACE("(%p)->(%x)\n", This
, v
);
233 nsres
= nsIDOMHTMLInputElement_SetDisabled(This
->nsinput
, v
!= VARIANT_FALSE
);
235 ERR("SetDisabled failed: %08x\n", nsres
);
240 static HRESULT WINAPI
HTMLInputElement_get_disabled(IHTMLInputElement
*iface
, VARIANT_BOOL
*p
)
242 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
243 cpp_bool disabled
= FALSE
;
245 TRACE("(%p)->(%p)\n", This
, p
);
247 nsIDOMHTMLInputElement_GetDisabled(This
->nsinput
, &disabled
);
249 *p
= disabled
? VARIANT_TRUE
: VARIANT_FALSE
;
253 static HRESULT WINAPI
HTMLInputElement_get_form(IHTMLInputElement
*iface
, IHTMLFormElement
**p
)
255 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
256 FIXME("(%p)->(%p)\n", This
, p
);
260 static HRESULT WINAPI
HTMLInputElement_put_size(IHTMLInputElement
*iface
, LONG v
)
262 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
263 FIXME("(%p)->(%d)\n", This
, v
);
267 static HRESULT WINAPI
HTMLInputElement_get_size(IHTMLInputElement
*iface
, LONG
*p
)
269 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
270 FIXME("(%p)->(%p)\n", This
, p
);
274 static HRESULT WINAPI
HTMLInputElement_put_maxLength(IHTMLInputElement
*iface
, LONG v
)
276 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
279 TRACE("(%p)->(%d)\n", This
, v
);
281 nsres
= nsIDOMHTMLInputElement_SetMaxLength(This
->nsinput
, v
);
282 if(NS_FAILED(nsres
)) {
283 /* FIXME: Gecko throws an error on negative values, while MSHTML should accept them */
284 FIXME("SetMaxLength failed\n");
291 static HRESULT WINAPI
HTMLInputElement_get_maxLength(IHTMLInputElement
*iface
, LONG
*p
)
293 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
297 TRACE("(%p)->(%p)\n", This
, p
);
299 nsres
= nsIDOMHTMLInputElement_GetMaxLength(This
->nsinput
, &max_length
);
300 assert(nsres
== NS_OK
);
302 /* Gecko reports -1 as default value, while MSHTML uses INT_MAX */
303 *p
= max_length
== -1 ? INT_MAX
: max_length
;
307 static HRESULT WINAPI
HTMLInputElement_select(IHTMLInputElement
*iface
)
309 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
312 TRACE("(%p)\n", This
);
314 nsres
= nsIDOMHTMLInputElement_Select(This
->nsinput
);
315 if(NS_FAILED(nsres
)) {
316 ERR("Select failed: %08x\n", nsres
);
323 static HRESULT WINAPI
HTMLInputElement_put_onchange(IHTMLInputElement
*iface
, VARIANT v
)
325 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
327 TRACE("(%p)->()\n", This
);
329 return set_node_event(&This
->element
.node
, EVENTID_CHANGE
, &v
);
332 static HRESULT WINAPI
HTMLInputElement_get_onchange(IHTMLInputElement
*iface
, VARIANT
*p
)
334 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
336 TRACE("(%p)->(%p)\n", This
, p
);
338 return get_node_event(&This
->element
.node
, EVENTID_CHANGE
, p
);
341 static HRESULT WINAPI
HTMLInputElement_put_onselect(IHTMLInputElement
*iface
, VARIANT v
)
343 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
344 FIXME("(%p)->()\n", This
);
348 static HRESULT WINAPI
HTMLInputElement_get_onselect(IHTMLInputElement
*iface
, VARIANT
*p
)
350 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
351 FIXME("(%p)->(%p)\n", This
, p
);
355 static HRESULT WINAPI
HTMLInputElement_put_defaultValue(IHTMLInputElement
*iface
, BSTR v
)
357 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
361 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
363 nsAString_InitDepend(&nsstr
, v
);
364 nsres
= nsIDOMHTMLInputElement_SetDefaultValue(This
->nsinput
, &nsstr
);
365 nsAString_Finish(&nsstr
);
366 if(NS_FAILED(nsres
)) {
367 ERR("SetValue failed: %08x\n", nsres
);
374 static HRESULT WINAPI
HTMLInputElement_get_defaultValue(IHTMLInputElement
*iface
, BSTR
*p
)
376 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
380 TRACE("(%p)->(%p)\n", This
, p
);
382 nsAString_Init(&nsstr
, NULL
);
383 nsres
= nsIDOMHTMLInputElement_GetDefaultValue(This
->nsinput
, &nsstr
);
384 return return_nsstr(nsres
, &nsstr
, p
);
387 static HRESULT WINAPI
HTMLInputElement_put_readOnly(IHTMLInputElement
*iface
, VARIANT_BOOL v
)
389 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
390 FIXME("(%p)->(%x)\n", This
, v
);
394 static HRESULT WINAPI
HTMLInputElement_get_readOnly(IHTMLInputElement
*iface
, VARIANT_BOOL
*p
)
396 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
397 FIXME("(%p)->(%p)\n", This
, p
);
401 static HRESULT WINAPI
HTMLInputElement_createTextRange(IHTMLInputElement
*iface
, IHTMLTxtRange
**range
)
403 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
404 FIXME("(%p)->(%p)\n", This
, range
);
408 static HRESULT WINAPI
HTMLInputElement_put_indeterminate(IHTMLInputElement
*iface
, VARIANT_BOOL v
)
410 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
411 FIXME("(%p)->(%x)\n", This
, v
);
415 static HRESULT WINAPI
HTMLInputElement_get_indeterminate(IHTMLInputElement
*iface
, VARIANT_BOOL
*p
)
417 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
418 FIXME("(%p)->(%p)\n", This
, p
);
422 static HRESULT WINAPI
HTMLInputElement_put_defaultChecked(IHTMLInputElement
*iface
, VARIANT_BOOL v
)
424 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
427 TRACE("(%p)->(%x)\n", This
, v
);
429 nsres
= nsIDOMHTMLInputElement_SetDefaultChecked(This
->nsinput
, v
!= VARIANT_FALSE
);
430 if(NS_FAILED(nsres
)) {
431 ERR("SetDefaultChecked failed: %08x\n", nsres
);
438 static HRESULT WINAPI
HTMLInputElement_get_defaultChecked(IHTMLInputElement
*iface
, VARIANT_BOOL
*p
)
440 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
441 cpp_bool default_checked
= FALSE
;
444 TRACE("(%p)->(%p)\n", This
, p
);
446 nsres
= nsIDOMHTMLInputElement_GetDefaultChecked(This
->nsinput
, &default_checked
);
447 if(NS_FAILED(nsres
)) {
448 ERR("GetDefaultChecked failed: %08x\n", nsres
);
452 *p
= default_checked
? VARIANT_TRUE
: VARIANT_FALSE
;
456 static HRESULT WINAPI
HTMLInputElement_put_checked(IHTMLInputElement
*iface
, VARIANT_BOOL v
)
458 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
461 TRACE("(%p)->(%x)\n", This
, v
);
463 nsres
= nsIDOMHTMLInputElement_SetChecked(This
->nsinput
, v
!= VARIANT_FALSE
);
464 if(NS_FAILED(nsres
)) {
465 ERR("SetChecked failed: %08x\n", nsres
);
472 static HRESULT WINAPI
HTMLInputElement_get_checked(IHTMLInputElement
*iface
, VARIANT_BOOL
*p
)
474 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
478 TRACE("(%p)->(%p)\n", This
, p
);
480 nsres
= nsIDOMHTMLInputElement_GetChecked(This
->nsinput
, &checked
);
481 if(NS_FAILED(nsres
)) {
482 ERR("GetChecked failed: %08x\n", nsres
);
486 *p
= checked
? VARIANT_TRUE
: VARIANT_FALSE
;
487 TRACE("checked=%x\n", *p
);
491 static HRESULT WINAPI
HTMLInputElement_put_border(IHTMLInputElement
*iface
, VARIANT v
)
493 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
494 FIXME("(%p)->()\n", This
);
498 static HRESULT WINAPI
HTMLInputElement_get_border(IHTMLInputElement
*iface
, VARIANT
*p
)
500 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
501 FIXME("(%p)->(%p)\n", This
, p
);
505 static HRESULT WINAPI
HTMLInputElement_put_vspace(IHTMLInputElement
*iface
, LONG v
)
507 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
508 FIXME("(%p)->(%d)\n", This
, v
);
512 static HRESULT WINAPI
HTMLInputElement_get_vspace(IHTMLInputElement
*iface
, LONG
*p
)
514 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
515 FIXME("(%p)->(%p)\n", This
, p
);
519 static HRESULT WINAPI
HTMLInputElement_put_hspace(IHTMLInputElement
*iface
, LONG v
)
521 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
522 FIXME("(%p)->(%d)\n", This
, v
);
526 static HRESULT WINAPI
HTMLInputElement_get_hspace(IHTMLInputElement
*iface
, LONG
*p
)
528 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
529 FIXME("(%p)->(%p)\n", This
, p
);
533 static HRESULT WINAPI
HTMLInputElement_put_alt(IHTMLInputElement
*iface
, BSTR v
)
535 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
536 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
540 static HRESULT WINAPI
HTMLInputElement_get_alt(IHTMLInputElement
*iface
, BSTR
*p
)
542 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
543 FIXME("(%p)->(%p)\n", This
, p
);
547 static HRESULT WINAPI
HTMLInputElement_put_src(IHTMLInputElement
*iface
, BSTR v
)
549 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
553 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
555 nsAString_InitDepend(&nsstr
, v
);
556 nsres
= nsIDOMHTMLInputElement_SetSrc(This
->nsinput
, &nsstr
);
557 nsAString_Finish(&nsstr
);
559 ERR("SetSrc failed: %08x\n", nsres
);
564 static HRESULT WINAPI
HTMLInputElement_get_src(IHTMLInputElement
*iface
, BSTR
*p
)
566 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
567 const PRUnichar
*src
;
572 TRACE("(%p)->(%p)\n", This
, p
);
574 nsAString_Init(&src_str
, NULL
);
575 nsres
= nsIDOMHTMLInputElement_GetSrc(This
->nsinput
, &src_str
);
576 if(NS_FAILED(nsres
)) {
577 ERR("GetSrc failed: %08x\n", nsres
);
581 nsAString_GetData(&src_str
, &src
);
582 hres
= nsuri_to_url(src
, FALSE
, p
);
583 nsAString_Finish(&src_str
);
588 static HRESULT WINAPI
HTMLInputElement_put_lowsrc(IHTMLInputElement
*iface
, BSTR v
)
590 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
591 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
595 static HRESULT WINAPI
HTMLInputElement_get_lowsrc(IHTMLInputElement
*iface
, BSTR
*p
)
597 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
598 FIXME("(%p)->(%p)\n", This
, p
);
602 static HRESULT WINAPI
HTMLInputElement_put_vrml(IHTMLInputElement
*iface
, BSTR v
)
604 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
605 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
609 static HRESULT WINAPI
HTMLInputElement_get_vrml(IHTMLInputElement
*iface
, BSTR
*p
)
611 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
612 FIXME("(%p)->(%p)\n", This
, p
);
616 static HRESULT WINAPI
HTMLInputElement_put_dynsrc(IHTMLInputElement
*iface
, BSTR v
)
618 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
619 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
623 static HRESULT WINAPI
HTMLInputElement_get_dynsrc(IHTMLInputElement
*iface
, BSTR
*p
)
625 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
626 FIXME("(%p)->(%p)\n", This
, p
);
630 static HRESULT WINAPI
HTMLInputElement_get_readyState(IHTMLInputElement
*iface
, BSTR
*p
)
632 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
633 FIXME("(%p)->(%p)\n", This
, p
);
637 static HRESULT WINAPI
HTMLInputElement_get_complete(IHTMLInputElement
*iface
, VARIANT_BOOL
*p
)
639 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
640 FIXME("(%p)->(%p)\n", This
, p
);
644 static HRESULT WINAPI
HTMLInputElement_put_loop(IHTMLInputElement
*iface
, VARIANT v
)
646 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
647 FIXME("(%p)->()\n", This
);
651 static HRESULT WINAPI
HTMLInputElement_get_loop(IHTMLInputElement
*iface
, VARIANT
*p
)
653 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
654 FIXME("(%p)->(%p)\n", This
, p
);
658 static HRESULT WINAPI
HTMLInputElement_put_align(IHTMLInputElement
*iface
, BSTR v
)
660 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
661 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
665 static HRESULT WINAPI
HTMLInputElement_get_align(IHTMLInputElement
*iface
, BSTR
*p
)
667 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
668 FIXME("(%p)->(%p)\n", This
, p
);
672 static HRESULT WINAPI
HTMLInputElement_put_onload(IHTMLInputElement
*iface
, VARIANT v
)
674 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
675 FIXME("(%p)->()\n", This
);
679 static HRESULT WINAPI
HTMLInputElement_get_onload(IHTMLInputElement
*iface
, VARIANT
*p
)
681 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
682 FIXME("(%p)->(%p)\n", This
, p
);
686 static HRESULT WINAPI
HTMLInputElement_put_onerror(IHTMLInputElement
*iface
, VARIANT v
)
688 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
689 FIXME("(%p)->()\n", This
);
693 static HRESULT WINAPI
HTMLInputElement_get_onerror(IHTMLInputElement
*iface
, VARIANT
*p
)
695 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
696 FIXME("(%p)->(%p)\n", This
, p
);
700 static HRESULT WINAPI
HTMLInputElement_put_onabort(IHTMLInputElement
*iface
, VARIANT v
)
702 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
703 FIXME("(%p)->()\n", This
);
707 static HRESULT WINAPI
HTMLInputElement_get_onabort(IHTMLInputElement
*iface
, VARIANT
*p
)
709 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
710 FIXME("(%p)->(%p)\n", This
, p
);
714 static HRESULT WINAPI
HTMLInputElement_put_width(IHTMLInputElement
*iface
, LONG v
)
716 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
717 FIXME("(%p)->(%d)\n", This
, v
);
721 static HRESULT WINAPI
HTMLInputElement_get_width(IHTMLInputElement
*iface
, LONG
*p
)
723 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
724 FIXME("(%p)->(%p)\n", This
, p
);
728 static HRESULT WINAPI
HTMLInputElement_put_height(IHTMLInputElement
*iface
, LONG v
)
730 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
731 FIXME("(%p)->(%d)\n", This
, v
);
735 static HRESULT WINAPI
HTMLInputElement_get_height(IHTMLInputElement
*iface
, LONG
*p
)
737 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
738 FIXME("(%p)->(%p)\n", This
, p
);
742 static HRESULT WINAPI
HTMLInputElement_put_start(IHTMLInputElement
*iface
, BSTR v
)
744 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
745 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
749 static HRESULT WINAPI
HTMLInputElement_get_start(IHTMLInputElement
*iface
, BSTR
*p
)
751 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
752 FIXME("(%p)->(%p)\n", This
, p
);
756 static const IHTMLInputElementVtbl HTMLInputElementVtbl
= {
757 HTMLInputElement_QueryInterface
,
758 HTMLInputElement_AddRef
,
759 HTMLInputElement_Release
,
760 HTMLInputElement_GetTypeInfoCount
,
761 HTMLInputElement_GetTypeInfo
,
762 HTMLInputElement_GetIDsOfNames
,
763 HTMLInputElement_Invoke
,
764 HTMLInputElement_put_type
,
765 HTMLInputElement_get_type
,
766 HTMLInputElement_put_value
,
767 HTMLInputElement_get_value
,
768 HTMLInputElement_put_name
,
769 HTMLInputElement_get_name
,
770 HTMLInputElement_put_status
,
771 HTMLInputElement_get_status
,
772 HTMLInputElement_put_disabled
,
773 HTMLInputElement_get_disabled
,
774 HTMLInputElement_get_form
,
775 HTMLInputElement_put_size
,
776 HTMLInputElement_get_size
,
777 HTMLInputElement_put_maxLength
,
778 HTMLInputElement_get_maxLength
,
779 HTMLInputElement_select
,
780 HTMLInputElement_put_onchange
,
781 HTMLInputElement_get_onchange
,
782 HTMLInputElement_put_onselect
,
783 HTMLInputElement_get_onselect
,
784 HTMLInputElement_put_defaultValue
,
785 HTMLInputElement_get_defaultValue
,
786 HTMLInputElement_put_readOnly
,
787 HTMLInputElement_get_readOnly
,
788 HTMLInputElement_createTextRange
,
789 HTMLInputElement_put_indeterminate
,
790 HTMLInputElement_get_indeterminate
,
791 HTMLInputElement_put_defaultChecked
,
792 HTMLInputElement_get_defaultChecked
,
793 HTMLInputElement_put_checked
,
794 HTMLInputElement_get_checked
,
795 HTMLInputElement_put_border
,
796 HTMLInputElement_get_border
,
797 HTMLInputElement_put_vspace
,
798 HTMLInputElement_get_vspace
,
799 HTMLInputElement_put_hspace
,
800 HTMLInputElement_get_hspace
,
801 HTMLInputElement_put_alt
,
802 HTMLInputElement_get_alt
,
803 HTMLInputElement_put_src
,
804 HTMLInputElement_get_src
,
805 HTMLInputElement_put_lowsrc
,
806 HTMLInputElement_get_lowsrc
,
807 HTMLInputElement_put_vrml
,
808 HTMLInputElement_get_vrml
,
809 HTMLInputElement_put_dynsrc
,
810 HTMLInputElement_get_dynsrc
,
811 HTMLInputElement_get_readyState
,
812 HTMLInputElement_get_complete
,
813 HTMLInputElement_put_loop
,
814 HTMLInputElement_get_loop
,
815 HTMLInputElement_put_align
,
816 HTMLInputElement_get_align
,
817 HTMLInputElement_put_onload
,
818 HTMLInputElement_get_onload
,
819 HTMLInputElement_put_onerror
,
820 HTMLInputElement_get_onerror
,
821 HTMLInputElement_put_onabort
,
822 HTMLInputElement_get_onabort
,
823 HTMLInputElement_put_width
,
824 HTMLInputElement_get_width
,
825 HTMLInputElement_put_height
,
826 HTMLInputElement_get_height
,
827 HTMLInputElement_put_start
,
828 HTMLInputElement_get_start
831 static HRESULT WINAPI
HTMLInputTextElement_QueryInterface(IHTMLInputTextElement
*iface
,
832 REFIID riid
, void **ppv
)
834 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
836 return IHTMLDOMNode_QueryInterface(&This
->element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
839 static ULONG WINAPI
HTMLInputTextElement_AddRef(IHTMLInputTextElement
*iface
)
841 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
843 return IHTMLDOMNode_AddRef(&This
->element
.node
.IHTMLDOMNode_iface
);
846 static ULONG WINAPI
HTMLInputTextElement_Release(IHTMLInputTextElement
*iface
)
848 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
850 return IHTMLDOMNode_Release(&This
->element
.node
.IHTMLDOMNode_iface
);
853 static HRESULT WINAPI
HTMLInputTextElement_GetTypeInfoCount(IHTMLInputTextElement
*iface
, UINT
*pctinfo
)
855 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
856 return IDispatchEx_GetTypeInfoCount(&This
->element
.node
.dispex
.IDispatchEx_iface
, pctinfo
);
859 static HRESULT WINAPI
HTMLInputTextElement_GetTypeInfo(IHTMLInputTextElement
*iface
, UINT iTInfo
,
860 LCID lcid
, ITypeInfo
**ppTInfo
)
862 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
863 return IDispatchEx_GetTypeInfo(&This
->element
.node
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
867 static HRESULT WINAPI
HTMLInputTextElement_GetIDsOfNames(IHTMLInputTextElement
*iface
, REFIID riid
,
868 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
870 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
871 return IDispatchEx_GetIDsOfNames(&This
->element
.node
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
872 cNames
, lcid
, rgDispId
);
875 static HRESULT WINAPI
HTMLInputTextElement_Invoke(IHTMLInputTextElement
*iface
, DISPID dispIdMember
,
876 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
877 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
879 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
880 return IDispatchEx_Invoke(&This
->element
.node
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
881 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
884 static HRESULT WINAPI
HTMLInputTextElement_get_type(IHTMLInputTextElement
*iface
, BSTR
*p
)
886 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
888 TRACE("(%p)->(%p)\n", This
, p
);
890 return IHTMLInputElement_get_type(&This
->IHTMLInputElement_iface
, p
);
893 static HRESULT WINAPI
HTMLInputTextElement_put_value(IHTMLInputTextElement
*iface
, BSTR v
)
895 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
897 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
899 return IHTMLInputElement_put_value(&This
->IHTMLInputElement_iface
, v
);
902 static HRESULT WINAPI
HTMLInputTextElement_get_value(IHTMLInputTextElement
*iface
, BSTR
*p
)
904 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
906 TRACE("(%p)->(%p)\n", This
, p
);
908 return IHTMLInputElement_get_value(&This
->IHTMLInputElement_iface
, p
);
911 static HRESULT WINAPI
HTMLInputTextElement_put_name(IHTMLInputTextElement
*iface
, BSTR v
)
913 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
915 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
917 return IHTMLInputElement_put_name(&This
->IHTMLInputElement_iface
, v
);
920 static HRESULT WINAPI
HTMLInputTextElement_get_name(IHTMLInputTextElement
*iface
, BSTR
*p
)
922 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
924 TRACE("(%p)->(%p)\n", This
, p
);
926 return IHTMLInputElement_get_name(&This
->IHTMLInputElement_iface
, p
);
929 static HRESULT WINAPI
HTMLInputTextElement_put_status(IHTMLInputTextElement
*iface
, VARIANT v
)
931 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
932 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
936 static HRESULT WINAPI
HTMLInputTextElement_get_status(IHTMLInputTextElement
*iface
, VARIANT
*p
)
938 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
939 TRACE("(%p)->(%p)\n", This
, p
);
943 static HRESULT WINAPI
HTMLInputTextElement_put_disabled(IHTMLInputTextElement
*iface
, VARIANT_BOOL v
)
945 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
947 TRACE("(%p)->(%x)\n", This
, v
);
949 return IHTMLInputElement_put_disabled(&This
->IHTMLInputElement_iface
, v
);
952 static HRESULT WINAPI
HTMLInputTextElement_get_disabled(IHTMLInputTextElement
*iface
, VARIANT_BOOL
*p
)
954 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
956 TRACE("(%p)->(%p)\n", This
, p
);
958 return IHTMLInputElement_get_disabled(&This
->IHTMLInputElement_iface
, p
);
961 static HRESULT WINAPI
HTMLInputTextElement_get_form(IHTMLInputTextElement
*iface
, IHTMLFormElement
**p
)
963 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
965 TRACE("(%p)->(%p)\n", This
, p
);
967 return IHTMLInputElement_get_form(&This
->IHTMLInputElement_iface
, p
);
970 static HRESULT WINAPI
HTMLInputTextElement_put_defaultValue(IHTMLInputTextElement
*iface
, BSTR v
)
972 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
974 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
976 return IHTMLInputElement_put_defaultValue(&This
->IHTMLInputElement_iface
, v
);
979 static HRESULT WINAPI
HTMLInputTextElement_get_defaultValue(IHTMLInputTextElement
*iface
, BSTR
*p
)
981 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
983 TRACE("(%p)->(%p)\n", This
, p
);
985 return IHTMLInputElement_get_defaultValue(&This
->IHTMLInputElement_iface
, p
);
988 static HRESULT WINAPI
HTMLInputTextElement_put_size(IHTMLInputTextElement
*iface
, LONG v
)
990 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
992 TRACE("(%p)->(%d)\n", This
, v
);
994 return IHTMLInputElement_put_size(&This
->IHTMLInputElement_iface
, v
);
997 static HRESULT WINAPI
HTMLInputTextElement_get_size(IHTMLInputTextElement
*iface
, LONG
*p
)
999 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1001 TRACE("(%p)->(%p)\n", This
, p
);
1003 return IHTMLInputElement_get_size(&This
->IHTMLInputElement_iface
, p
);
1006 static HRESULT WINAPI
HTMLInputTextElement_put_maxLength(IHTMLInputTextElement
*iface
, LONG v
)
1008 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1010 TRACE("(%p)->(%d)\n", This
, v
);
1012 return IHTMLInputElement_put_maxLength(&This
->IHTMLInputElement_iface
, v
);
1015 static HRESULT WINAPI
HTMLInputTextElement_get_maxLength(IHTMLInputTextElement
*iface
, LONG
*p
)
1017 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1019 TRACE("(%p)->(%p)\n", This
, p
);
1021 return IHTMLInputElement_get_maxLength(&This
->IHTMLInputElement_iface
, p
);
1024 static HRESULT WINAPI
HTMLInputTextElement_select(IHTMLInputTextElement
*iface
)
1026 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1028 TRACE("(%p)\n", This
);
1030 return IHTMLInputElement_select(&This
->IHTMLInputElement_iface
);
1033 static HRESULT WINAPI
HTMLInputTextElement_put_onchange(IHTMLInputTextElement
*iface
, VARIANT v
)
1035 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1037 TRACE("(%p)->()\n", This
);
1039 return IHTMLInputElement_put_onchange(&This
->IHTMLInputElement_iface
, v
);
1042 static HRESULT WINAPI
HTMLInputTextElement_get_onchange(IHTMLInputTextElement
*iface
, VARIANT
*p
)
1044 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1046 TRACE("(%p)->(%p)\n", This
, p
);
1048 return IHTMLInputElement_get_onchange(&This
->IHTMLInputElement_iface
, p
);
1051 static HRESULT WINAPI
HTMLInputTextElement_put_onselect(IHTMLInputTextElement
*iface
, VARIANT v
)
1053 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1055 TRACE("(%p)->()\n", This
);
1057 return IHTMLInputElement_put_onselect(&This
->IHTMLInputElement_iface
, v
);
1060 static HRESULT WINAPI
HTMLInputTextElement_get_onselect(IHTMLInputTextElement
*iface
, VARIANT
*p
)
1062 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1064 TRACE("(%p)->(%p)\n", This
, p
);
1066 return IHTMLInputElement_get_onselect(&This
->IHTMLInputElement_iface
, p
);
1069 static HRESULT WINAPI
HTMLInputTextElement_put_readOnly(IHTMLInputTextElement
*iface
, VARIANT_BOOL v
)
1071 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1073 TRACE("(%p)->(%x)\n", This
, v
);
1075 return IHTMLInputElement_put_readOnly(&This
->IHTMLInputElement_iface
, v
);
1078 static HRESULT WINAPI
HTMLInputTextElement_get_readOnly(IHTMLInputTextElement
*iface
, VARIANT_BOOL
*p
)
1080 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1082 TRACE("(%p)->(%p)\n", This
, p
);
1084 return IHTMLInputElement_get_readOnly(&This
->IHTMLInputElement_iface
, p
);
1087 static HRESULT WINAPI
HTMLInputTextElement_createTextRange(IHTMLInputTextElement
*iface
, IHTMLTxtRange
**range
)
1089 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1091 TRACE("(%p)->(%p)\n", This
, range
);
1093 return IHTMLInputElement_createTextRange(&This
->IHTMLInputElement_iface
, range
);
1096 static const IHTMLInputTextElementVtbl HTMLInputTextElementVtbl
= {
1097 HTMLInputTextElement_QueryInterface
,
1098 HTMLInputTextElement_AddRef
,
1099 HTMLInputTextElement_Release
,
1100 HTMLInputTextElement_GetTypeInfoCount
,
1101 HTMLInputTextElement_GetTypeInfo
,
1102 HTMLInputTextElement_GetIDsOfNames
,
1103 HTMLInputTextElement_Invoke
,
1104 HTMLInputTextElement_get_type
,
1105 HTMLInputTextElement_put_value
,
1106 HTMLInputTextElement_get_value
,
1107 HTMLInputTextElement_put_name
,
1108 HTMLInputTextElement_get_name
,
1109 HTMLInputTextElement_put_status
,
1110 HTMLInputTextElement_get_status
,
1111 HTMLInputTextElement_put_disabled
,
1112 HTMLInputTextElement_get_disabled
,
1113 HTMLInputTextElement_get_form
,
1114 HTMLInputTextElement_put_defaultValue
,
1115 HTMLInputTextElement_get_defaultValue
,
1116 HTMLInputTextElement_put_size
,
1117 HTMLInputTextElement_get_size
,
1118 HTMLInputTextElement_put_maxLength
,
1119 HTMLInputTextElement_get_maxLength
,
1120 HTMLInputTextElement_select
,
1121 HTMLInputTextElement_put_onchange
,
1122 HTMLInputTextElement_get_onchange
,
1123 HTMLInputTextElement_put_onselect
,
1124 HTMLInputTextElement_get_onselect
,
1125 HTMLInputTextElement_put_readOnly
,
1126 HTMLInputTextElement_get_readOnly
,
1127 HTMLInputTextElement_createTextRange
1130 static inline HTMLInputElement
*impl_from_HTMLDOMNode(HTMLDOMNode
*iface
)
1132 return CONTAINING_RECORD(iface
, HTMLInputElement
, element
.node
);
1135 static HRESULT
HTMLInputElement_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
1137 HTMLInputElement
*This
= impl_from_HTMLDOMNode(iface
);
1141 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
1142 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
1143 *ppv
= &This
->IHTMLInputElement_iface
;
1144 }else if(IsEqualGUID(&IID_IDispatch
, riid
)) {
1145 TRACE("(%p)->(IID_IDispatch %p)\n", This
, ppv
);
1146 *ppv
= &This
->IHTMLInputElement_iface
;
1147 }else if(IsEqualGUID(&IID_IHTMLInputElement
, riid
)) {
1148 TRACE("(%p)->(IID_IHTMLInputElement %p)\n", This
, ppv
);
1149 *ppv
= &This
->IHTMLInputElement_iface
;
1150 }else if(IsEqualGUID(&IID_IHTMLInputTextElement
, riid
)) {
1151 TRACE("(%p)->(IID_IHTMLInputTextElement %p)\n", This
, ppv
);
1152 *ppv
= &This
->IHTMLInputTextElement_iface
;
1156 IUnknown_AddRef((IUnknown
*)*ppv
);
1160 return HTMLElement_QI(&This
->element
.node
, riid
, ppv
);
1163 static HRESULT
HTMLInputElementImpl_fire_event(HTMLDOMNode
*iface
, eventid_t eid
, BOOL
*handled
)
1165 HTMLInputElement
*This
= impl_from_HTMLDOMNode(iface
);
1167 if(eid
== EVENTID_CLICK
) {
1172 nsres
= nsIDOMHTMLInputElement_Click(This
->nsinput
);
1173 if(NS_FAILED(nsres
)) {
1174 ERR("Click failed: %08x\n", nsres
);
1182 static HRESULT
HTMLInputElementImpl_put_disabled(HTMLDOMNode
*iface
, VARIANT_BOOL v
)
1184 HTMLInputElement
*This
= impl_from_HTMLDOMNode(iface
);
1185 return IHTMLInputElement_put_disabled(&This
->IHTMLInputElement_iface
, v
);
1188 static HRESULT
HTMLInputElementImpl_get_disabled(HTMLDOMNode
*iface
, VARIANT_BOOL
*p
)
1190 HTMLInputElement
*This
= impl_from_HTMLDOMNode(iface
);
1191 return IHTMLInputElement_get_disabled(&This
->IHTMLInputElement_iface
, p
);
1194 static const NodeImplVtbl HTMLInputElementImplVtbl
= {
1195 HTMLInputElement_QI
,
1196 HTMLElement_destructor
,
1198 HTMLElement_handle_event
,
1199 HTMLElement_get_attr_col
,
1201 HTMLInputElementImpl_fire_event
,
1202 HTMLInputElementImpl_put_disabled
,
1203 HTMLInputElementImpl_get_disabled
,
1206 static const tid_t HTMLInputElement_iface_tids
[] = {
1208 IHTMLInputElement_tid
,
1211 static dispex_static_data_t HTMLInputElement_dispex
= {
1213 DispHTMLInputElement_tid
,
1215 HTMLInputElement_iface_tids
1218 HRESULT
HTMLInputElement_Create(HTMLDocumentNode
*doc
, nsIDOMHTMLElement
*nselem
, HTMLElement
**elem
)
1220 HTMLInputElement
*ret
;
1223 ret
= heap_alloc_zero(sizeof(HTMLInputElement
));
1225 return E_OUTOFMEMORY
;
1227 ret
->IHTMLInputElement_iface
.lpVtbl
= &HTMLInputElementVtbl
;
1228 ret
->IHTMLInputTextElement_iface
.lpVtbl
= &HTMLInputTextElementVtbl
;
1229 ret
->element
.node
.vtbl
= &HTMLInputElementImplVtbl
;
1231 HTMLElement_Init(&ret
->element
, doc
, nselem
, &HTMLInputElement_dispex
);
1233 nsres
= nsIDOMHTMLElement_QueryInterface(nselem
, &IID_nsIDOMHTMLInputElement
, (void**)&ret
->nsinput
);
1235 /* Share nsinput reference with nsnode */
1236 assert(nsres
== NS_OK
&& (nsIDOMNode
*)ret
->nsinput
== ret
->element
.node
.nsnode
);
1237 nsIDOMNode_Release(ret
->element
.node
.nsnode
);
1239 *elem
= &ret
->element
;