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
19 #include "mshtml_private.h"
26 IHTMLInputElement IHTMLInputElement_iface
;
27 IHTMLInputTextElement IHTMLInputTextElement_iface
;
29 nsIDOMHTMLInputElement
*nsinput
;
32 static const WCHAR forW
[] = {'f','o','r',0};
34 static inline HTMLInputElement
*impl_from_IHTMLInputElement(IHTMLInputElement
*iface
)
36 return CONTAINING_RECORD(iface
, HTMLInputElement
, IHTMLInputElement_iface
);
39 static inline HTMLInputElement
*impl_from_IHTMLInputTextElement(IHTMLInputTextElement
*iface
)
41 return CONTAINING_RECORD(iface
, HTMLInputElement
, IHTMLInputTextElement_iface
);
44 static HRESULT WINAPI
HTMLInputElement_QueryInterface(IHTMLInputElement
*iface
,
45 REFIID riid
, void **ppv
)
47 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
49 return IHTMLDOMNode_QueryInterface(&This
->element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
52 static ULONG WINAPI
HTMLInputElement_AddRef(IHTMLInputElement
*iface
)
54 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
56 return IHTMLDOMNode_AddRef(&This
->element
.node
.IHTMLDOMNode_iface
);
59 static ULONG WINAPI
HTMLInputElement_Release(IHTMLInputElement
*iface
)
61 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
63 return IHTMLDOMNode_Release(&This
->element
.node
.IHTMLDOMNode_iface
);
66 static HRESULT WINAPI
HTMLInputElement_GetTypeInfoCount(IHTMLInputElement
*iface
, UINT
*pctinfo
)
68 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
70 return IDispatchEx_GetTypeInfoCount(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
73 static HRESULT WINAPI
HTMLInputElement_GetTypeInfo(IHTMLInputElement
*iface
, UINT iTInfo
,
74 LCID lcid
, ITypeInfo
**ppTInfo
)
76 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
78 return IDispatchEx_GetTypeInfo(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
82 static HRESULT WINAPI
HTMLInputElement_GetIDsOfNames(IHTMLInputElement
*iface
, REFIID riid
,
83 LPOLESTR
*rgszNames
, UINT cNames
,
84 LCID lcid
, DISPID
*rgDispId
)
86 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
88 return IDispatchEx_GetIDsOfNames(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
89 cNames
, lcid
, rgDispId
);
92 static HRESULT WINAPI
HTMLInputElement_Invoke(IHTMLInputElement
*iface
, DISPID dispIdMember
,
93 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
94 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
96 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
98 return IDispatchEx_Invoke(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
99 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
102 static HRESULT WINAPI
HTMLInputElement_put_type(IHTMLInputElement
*iface
, BSTR v
)
104 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
108 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
112 * On IE setting type works only on dynamically created elements before adding them to DOM tree.
114 nsAString_InitDepend(&type_str
, v
);
115 nsres
= nsIDOMHTMLInputElement_SetType(This
->nsinput
, &type_str
);
116 nsAString_Finish(&type_str
);
117 if(NS_FAILED(nsres
)) {
118 ERR("SetType failed: %08x\n", nsres
);
125 static HRESULT WINAPI
HTMLInputElement_get_type(IHTMLInputElement
*iface
, BSTR
*p
)
127 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
131 TRACE("(%p)->(%p)\n", This
, p
);
133 nsAString_Init(&type_str
, NULL
);
134 nsres
= nsIDOMHTMLInputElement_GetType(This
->nsinput
, &type_str
);
135 return return_nsstr(nsres
, &type_str
, p
);
138 static HRESULT WINAPI
HTMLInputElement_put_value(IHTMLInputElement
*iface
, BSTR v
)
140 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
144 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
146 nsAString_InitDepend(&val_str
, v
);
147 nsres
= nsIDOMHTMLInputElement_SetValue(This
->nsinput
, &val_str
);
148 nsAString_Finish(&val_str
);
150 ERR("SetValue failed: %08x\n", nsres
);
155 static HRESULT WINAPI
HTMLInputElement_get_value(IHTMLInputElement
*iface
, BSTR
*p
)
157 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
161 TRACE("(%p)->(%p)\n", This
, p
);
163 nsAString_Init(&value_str
, NULL
);
164 nsres
= nsIDOMHTMLInputElement_GetValue(This
->nsinput
, &value_str
);
165 return return_nsstr(nsres
, &value_str
, p
);
168 static HRESULT WINAPI
HTMLInputElement_put_name(IHTMLInputElement
*iface
, BSTR v
)
170 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
174 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
176 nsAString_InitDepend(&name_str
, v
);
177 nsres
= nsIDOMHTMLInputElement_SetName(This
->nsinput
, &name_str
);
178 nsAString_Finish(&name_str
);
179 if(NS_FAILED(nsres
)) {
180 ERR("SetName failed: %08x\n", nsres
);
187 static HRESULT WINAPI
HTMLInputElement_get_name(IHTMLInputElement
*iface
, BSTR
*p
)
189 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
193 TRACE("(%p)->(%p)\n", This
, p
);
195 nsAString_Init(&name_str
, NULL
);
196 nsres
= nsIDOMHTMLInputElement_GetName(This
->nsinput
, &name_str
);
197 return return_nsstr(nsres
, &name_str
, p
);
200 static HRESULT WINAPI
HTMLInputElement_put_status(IHTMLInputElement
*iface
, VARIANT_BOOL v
)
202 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
203 FIXME("(%p)->(%x)\n", This
, v
);
207 static HRESULT WINAPI
HTMLInputElement_get_status(IHTMLInputElement
*iface
, VARIANT_BOOL
*p
)
209 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
210 FIXME("(%p)->(%p)\n", This
, p
);
214 static HRESULT WINAPI
HTMLInputElement_put_disabled(IHTMLInputElement
*iface
, VARIANT_BOOL v
)
216 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
219 TRACE("(%p)->(%x)\n", This
, v
);
221 nsres
= nsIDOMHTMLInputElement_SetDisabled(This
->nsinput
, v
!= VARIANT_FALSE
);
223 ERR("SetDisabled failed: %08x\n", nsres
);
228 static HRESULT WINAPI
HTMLInputElement_get_disabled(IHTMLInputElement
*iface
, VARIANT_BOOL
*p
)
230 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
231 cpp_bool disabled
= FALSE
;
233 TRACE("(%p)->(%p)\n", This
, p
);
235 nsIDOMHTMLInputElement_GetDisabled(This
->nsinput
, &disabled
);
237 *p
= disabled
? VARIANT_TRUE
: VARIANT_FALSE
;
241 static HRESULT WINAPI
HTMLInputElement_get_form(IHTMLInputElement
*iface
, IHTMLFormElement
**p
)
243 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
244 nsIDOMHTMLFormElement
*nsform
;
245 nsIDOMNode
*form_node
;
250 TRACE("(%p)->(%p)\n", This
, p
);
252 nsres
= nsIDOMHTMLInputElement_GetForm(This
->nsinput
, &nsform
);
253 if (NS_FAILED(nsres
) || nsform
== NULL
) {
254 ERR("GetForm failed: %08x, nsform: %p\n", nsres
, nsform
);
259 nsres
= nsIDOMHTMLFormElement_QueryInterface(nsform
, &IID_nsIDOMNode
, (void**)&form_node
);
260 nsIDOMHTMLFormElement_Release(nsform
);
261 assert(nsres
== NS_OK
);
263 hres
= get_node(This
->element
.node
.doc
, form_node
, TRUE
, &node
);
264 nsIDOMNode_Release(form_node
);
268 hres
= IHTMLDOMNode_QueryInterface(&node
->IHTMLDOMNode_iface
, &IID_IHTMLElement
, (void**)p
);
274 static HRESULT WINAPI
HTMLInputElement_put_size(IHTMLInputElement
*iface
, LONG v
)
276 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
280 TRACE("(%p)->(%d)\n", This
, v
);
282 return CTL_E_INVALIDPROPERTYVALUE
;
284 nsres
= nsIDOMHTMLInputElement_SetSize(This
->nsinput
, val
);
285 if (NS_FAILED(nsres
)) {
286 ERR("Set Size(%u) failed: %08x\n", val
, nsres
);
292 static HRESULT WINAPI
HTMLInputElement_get_size(IHTMLInputElement
*iface
, LONG
*p
)
294 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
298 TRACE("(%p)->(%p)\n", This
, p
);
302 nsres
= nsIDOMHTMLInputElement_GetSize(This
->nsinput
, &val
);
303 if (NS_FAILED(nsres
)) {
304 ERR("Get Size failed: %08x\n", nsres
);
311 static HRESULT WINAPI
HTMLInputElement_put_maxLength(IHTMLInputElement
*iface
, LONG v
)
313 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
316 TRACE("(%p)->(%d)\n", This
, v
);
318 nsres
= nsIDOMHTMLInputElement_SetMaxLength(This
->nsinput
, v
);
319 if(NS_FAILED(nsres
)) {
320 /* FIXME: Gecko throws an error on negative values, while MSHTML should accept them */
321 FIXME("SetMaxLength failed\n");
328 static HRESULT WINAPI
HTMLInputElement_get_maxLength(IHTMLInputElement
*iface
, LONG
*p
)
330 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
334 TRACE("(%p)->(%p)\n", This
, p
);
336 nsres
= nsIDOMHTMLInputElement_GetMaxLength(This
->nsinput
, &max_length
);
337 assert(nsres
== NS_OK
);
339 /* Gecko reports -1 as default value, while MSHTML uses INT_MAX */
340 *p
= max_length
== -1 ? INT_MAX
: max_length
;
344 static HRESULT WINAPI
HTMLInputElement_select(IHTMLInputElement
*iface
)
346 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
349 TRACE("(%p)\n", This
);
351 nsres
= nsIDOMHTMLInputElement_Select(This
->nsinput
);
352 if(NS_FAILED(nsres
)) {
353 ERR("Select failed: %08x\n", nsres
);
360 static HRESULT WINAPI
HTMLInputElement_put_onchange(IHTMLInputElement
*iface
, VARIANT v
)
362 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
364 TRACE("(%p)->()\n", This
);
366 return set_node_event(&This
->element
.node
, EVENTID_CHANGE
, &v
);
369 static HRESULT WINAPI
HTMLInputElement_get_onchange(IHTMLInputElement
*iface
, VARIANT
*p
)
371 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
373 TRACE("(%p)->(%p)\n", This
, p
);
375 return get_node_event(&This
->element
.node
, EVENTID_CHANGE
, p
);
378 static HRESULT WINAPI
HTMLInputElement_put_onselect(IHTMLInputElement
*iface
, VARIANT v
)
380 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
381 FIXME("(%p)->()\n", This
);
385 static HRESULT WINAPI
HTMLInputElement_get_onselect(IHTMLInputElement
*iface
, VARIANT
*p
)
387 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
388 FIXME("(%p)->(%p)\n", This
, p
);
392 static HRESULT WINAPI
HTMLInputElement_put_defaultValue(IHTMLInputElement
*iface
, BSTR v
)
394 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
398 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
400 nsAString_InitDepend(&nsstr
, v
);
401 nsres
= nsIDOMHTMLInputElement_SetDefaultValue(This
->nsinput
, &nsstr
);
402 nsAString_Finish(&nsstr
);
403 if(NS_FAILED(nsres
)) {
404 ERR("SetValue failed: %08x\n", nsres
);
411 static HRESULT WINAPI
HTMLInputElement_get_defaultValue(IHTMLInputElement
*iface
, BSTR
*p
)
413 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
417 TRACE("(%p)->(%p)\n", This
, p
);
419 nsAString_Init(&nsstr
, NULL
);
420 nsres
= nsIDOMHTMLInputElement_GetDefaultValue(This
->nsinput
, &nsstr
);
421 return return_nsstr(nsres
, &nsstr
, p
);
424 static HRESULT WINAPI
HTMLInputElement_put_readOnly(IHTMLInputElement
*iface
, VARIANT_BOOL v
)
426 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
429 TRACE("(%p)->(%x)\n", This
, v
);
431 nsres
= nsIDOMHTMLInputElement_SetReadOnly(This
->nsinput
, v
!= VARIANT_FALSE
);
432 if (NS_FAILED(nsres
)) {
433 ERR("Set ReadOnly Failed: %08x\n", nsres
);
439 static HRESULT WINAPI
HTMLInputElement_get_readOnly(IHTMLInputElement
*iface
, VARIANT_BOOL
*p
)
441 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
445 TRACE("(%p)->(%p)\n", This
, p
);
447 nsres
= nsIDOMHTMLInputElement_GetReadOnly(This
->nsinput
, &b
);
448 if (NS_FAILED(nsres
)) {
449 ERR("Get ReadOnly Failed: %08x\n", nsres
);
452 *p
= b
? VARIANT_TRUE
: VARIANT_FALSE
;
456 static HRESULT WINAPI
HTMLInputElement_createTextRange(IHTMLInputElement
*iface
, IHTMLTxtRange
**range
)
458 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
459 FIXME("(%p)->(%p)\n", This
, range
);
463 static HRESULT WINAPI
HTMLInputElement_put_indeterminate(IHTMLInputElement
*iface
, VARIANT_BOOL v
)
465 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
466 FIXME("(%p)->(%x)\n", This
, v
);
470 static HRESULT WINAPI
HTMLInputElement_get_indeterminate(IHTMLInputElement
*iface
, VARIANT_BOOL
*p
)
472 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
473 FIXME("(%p)->(%p)\n", This
, p
);
477 static HRESULT WINAPI
HTMLInputElement_put_defaultChecked(IHTMLInputElement
*iface
, VARIANT_BOOL v
)
479 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
482 TRACE("(%p)->(%x)\n", This
, v
);
484 nsres
= nsIDOMHTMLInputElement_SetDefaultChecked(This
->nsinput
, v
!= VARIANT_FALSE
);
485 if(NS_FAILED(nsres
)) {
486 ERR("SetDefaultChecked failed: %08x\n", nsres
);
493 static HRESULT WINAPI
HTMLInputElement_get_defaultChecked(IHTMLInputElement
*iface
, VARIANT_BOOL
*p
)
495 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
496 cpp_bool default_checked
= FALSE
;
499 TRACE("(%p)->(%p)\n", This
, p
);
501 nsres
= nsIDOMHTMLInputElement_GetDefaultChecked(This
->nsinput
, &default_checked
);
502 if(NS_FAILED(nsres
)) {
503 ERR("GetDefaultChecked failed: %08x\n", nsres
);
507 *p
= default_checked
? VARIANT_TRUE
: VARIANT_FALSE
;
511 static HRESULT WINAPI
HTMLInputElement_put_checked(IHTMLInputElement
*iface
, VARIANT_BOOL v
)
513 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
516 TRACE("(%p)->(%x)\n", This
, v
);
518 nsres
= nsIDOMHTMLInputElement_SetChecked(This
->nsinput
, v
!= VARIANT_FALSE
);
519 if(NS_FAILED(nsres
)) {
520 ERR("SetChecked failed: %08x\n", nsres
);
527 static HRESULT WINAPI
HTMLInputElement_get_checked(IHTMLInputElement
*iface
, VARIANT_BOOL
*p
)
529 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
533 TRACE("(%p)->(%p)\n", This
, p
);
535 nsres
= nsIDOMHTMLInputElement_GetChecked(This
->nsinput
, &checked
);
536 if(NS_FAILED(nsres
)) {
537 ERR("GetChecked failed: %08x\n", nsres
);
541 *p
= checked
? VARIANT_TRUE
: VARIANT_FALSE
;
542 TRACE("checked=%x\n", *p
);
546 static HRESULT WINAPI
HTMLInputElement_put_border(IHTMLInputElement
*iface
, VARIANT v
)
548 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
549 FIXME("(%p)->()\n", This
);
553 static HRESULT WINAPI
HTMLInputElement_get_border(IHTMLInputElement
*iface
, VARIANT
*p
)
555 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
556 FIXME("(%p)->(%p)\n", This
, p
);
560 static HRESULT WINAPI
HTMLInputElement_put_vspace(IHTMLInputElement
*iface
, LONG v
)
562 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
563 FIXME("(%p)->(%d)\n", This
, v
);
567 static HRESULT WINAPI
HTMLInputElement_get_vspace(IHTMLInputElement
*iface
, LONG
*p
)
569 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
570 FIXME("(%p)->(%p)\n", This
, p
);
574 static HRESULT WINAPI
HTMLInputElement_put_hspace(IHTMLInputElement
*iface
, LONG v
)
576 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
577 FIXME("(%p)->(%d)\n", This
, v
);
581 static HRESULT WINAPI
HTMLInputElement_get_hspace(IHTMLInputElement
*iface
, LONG
*p
)
583 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
584 FIXME("(%p)->(%p)\n", This
, p
);
588 static HRESULT WINAPI
HTMLInputElement_put_alt(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_alt(IHTMLInputElement
*iface
, BSTR
*p
)
597 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
598 FIXME("(%p)->(%p)\n", This
, p
);
602 static HRESULT WINAPI
HTMLInputElement_put_src(IHTMLInputElement
*iface
, BSTR v
)
604 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
608 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
610 nsAString_InitDepend(&nsstr
, v
);
611 nsres
= nsIDOMHTMLInputElement_SetSrc(This
->nsinput
, &nsstr
);
612 nsAString_Finish(&nsstr
);
614 ERR("SetSrc failed: %08x\n", nsres
);
619 static HRESULT WINAPI
HTMLInputElement_get_src(IHTMLInputElement
*iface
, BSTR
*p
)
621 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
622 const PRUnichar
*src
;
627 TRACE("(%p)->(%p)\n", This
, p
);
629 nsAString_Init(&src_str
, NULL
);
630 nsres
= nsIDOMHTMLInputElement_GetSrc(This
->nsinput
, &src_str
);
631 if(NS_FAILED(nsres
)) {
632 ERR("GetSrc failed: %08x\n", nsres
);
636 nsAString_GetData(&src_str
, &src
);
637 hres
= nsuri_to_url(src
, FALSE
, p
);
638 nsAString_Finish(&src_str
);
643 static HRESULT WINAPI
HTMLInputElement_put_lowsrc(IHTMLInputElement
*iface
, BSTR v
)
645 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
646 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
650 static HRESULT WINAPI
HTMLInputElement_get_lowsrc(IHTMLInputElement
*iface
, BSTR
*p
)
652 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
653 FIXME("(%p)->(%p)\n", This
, p
);
657 static HRESULT WINAPI
HTMLInputElement_put_vrml(IHTMLInputElement
*iface
, BSTR v
)
659 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
660 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
664 static HRESULT WINAPI
HTMLInputElement_get_vrml(IHTMLInputElement
*iface
, BSTR
*p
)
666 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
667 FIXME("(%p)->(%p)\n", This
, p
);
671 static HRESULT WINAPI
HTMLInputElement_put_dynsrc(IHTMLInputElement
*iface
, BSTR v
)
673 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
674 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
678 static HRESULT WINAPI
HTMLInputElement_get_dynsrc(IHTMLInputElement
*iface
, BSTR
*p
)
680 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
681 FIXME("(%p)->(%p)\n", This
, p
);
685 static HRESULT WINAPI
HTMLInputElement_get_readyState(IHTMLInputElement
*iface
, BSTR
*p
)
687 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
688 FIXME("(%p)->(%p)\n", This
, p
);
692 static HRESULT WINAPI
HTMLInputElement_get_complete(IHTMLInputElement
*iface
, VARIANT_BOOL
*p
)
694 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
695 FIXME("(%p)->(%p)\n", This
, p
);
699 static HRESULT WINAPI
HTMLInputElement_put_loop(IHTMLInputElement
*iface
, VARIANT v
)
701 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
702 FIXME("(%p)->()\n", This
);
706 static HRESULT WINAPI
HTMLInputElement_get_loop(IHTMLInputElement
*iface
, VARIANT
*p
)
708 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
709 FIXME("(%p)->(%p)\n", This
, p
);
713 static HRESULT WINAPI
HTMLInputElement_put_align(IHTMLInputElement
*iface
, BSTR v
)
715 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
716 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
720 static HRESULT WINAPI
HTMLInputElement_get_align(IHTMLInputElement
*iface
, BSTR
*p
)
722 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
723 FIXME("(%p)->(%p)\n", This
, p
);
727 static HRESULT WINAPI
HTMLInputElement_put_onload(IHTMLInputElement
*iface
, VARIANT v
)
729 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
730 FIXME("(%p)->()\n", This
);
734 static HRESULT WINAPI
HTMLInputElement_get_onload(IHTMLInputElement
*iface
, VARIANT
*p
)
736 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
737 FIXME("(%p)->(%p)\n", This
, p
);
741 static HRESULT WINAPI
HTMLInputElement_put_onerror(IHTMLInputElement
*iface
, VARIANT v
)
743 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
744 FIXME("(%p)->()\n", This
);
748 static HRESULT WINAPI
HTMLInputElement_get_onerror(IHTMLInputElement
*iface
, VARIANT
*p
)
750 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
751 FIXME("(%p)->(%p)\n", This
, p
);
755 static HRESULT WINAPI
HTMLInputElement_put_onabort(IHTMLInputElement
*iface
, VARIANT v
)
757 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
758 FIXME("(%p)->()\n", This
);
762 static HRESULT WINAPI
HTMLInputElement_get_onabort(IHTMLInputElement
*iface
, VARIANT
*p
)
764 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
765 FIXME("(%p)->(%p)\n", This
, p
);
769 static HRESULT WINAPI
HTMLInputElement_put_width(IHTMLInputElement
*iface
, LONG v
)
771 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
772 FIXME("(%p)->(%d)\n", This
, v
);
776 static HRESULT WINAPI
HTMLInputElement_get_width(IHTMLInputElement
*iface
, LONG
*p
)
778 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
779 FIXME("(%p)->(%p)\n", This
, p
);
783 static HRESULT WINAPI
HTMLInputElement_put_height(IHTMLInputElement
*iface
, LONG v
)
785 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
786 FIXME("(%p)->(%d)\n", This
, v
);
790 static HRESULT WINAPI
HTMLInputElement_get_height(IHTMLInputElement
*iface
, LONG
*p
)
792 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
793 FIXME("(%p)->(%p)\n", This
, p
);
797 static HRESULT WINAPI
HTMLInputElement_put_start(IHTMLInputElement
*iface
, BSTR v
)
799 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
800 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
804 static HRESULT WINAPI
HTMLInputElement_get_start(IHTMLInputElement
*iface
, BSTR
*p
)
806 HTMLInputElement
*This
= impl_from_IHTMLInputElement(iface
);
807 FIXME("(%p)->(%p)\n", This
, p
);
811 static const IHTMLInputElementVtbl HTMLInputElementVtbl
= {
812 HTMLInputElement_QueryInterface
,
813 HTMLInputElement_AddRef
,
814 HTMLInputElement_Release
,
815 HTMLInputElement_GetTypeInfoCount
,
816 HTMLInputElement_GetTypeInfo
,
817 HTMLInputElement_GetIDsOfNames
,
818 HTMLInputElement_Invoke
,
819 HTMLInputElement_put_type
,
820 HTMLInputElement_get_type
,
821 HTMLInputElement_put_value
,
822 HTMLInputElement_get_value
,
823 HTMLInputElement_put_name
,
824 HTMLInputElement_get_name
,
825 HTMLInputElement_put_status
,
826 HTMLInputElement_get_status
,
827 HTMLInputElement_put_disabled
,
828 HTMLInputElement_get_disabled
,
829 HTMLInputElement_get_form
,
830 HTMLInputElement_put_size
,
831 HTMLInputElement_get_size
,
832 HTMLInputElement_put_maxLength
,
833 HTMLInputElement_get_maxLength
,
834 HTMLInputElement_select
,
835 HTMLInputElement_put_onchange
,
836 HTMLInputElement_get_onchange
,
837 HTMLInputElement_put_onselect
,
838 HTMLInputElement_get_onselect
,
839 HTMLInputElement_put_defaultValue
,
840 HTMLInputElement_get_defaultValue
,
841 HTMLInputElement_put_readOnly
,
842 HTMLInputElement_get_readOnly
,
843 HTMLInputElement_createTextRange
,
844 HTMLInputElement_put_indeterminate
,
845 HTMLInputElement_get_indeterminate
,
846 HTMLInputElement_put_defaultChecked
,
847 HTMLInputElement_get_defaultChecked
,
848 HTMLInputElement_put_checked
,
849 HTMLInputElement_get_checked
,
850 HTMLInputElement_put_border
,
851 HTMLInputElement_get_border
,
852 HTMLInputElement_put_vspace
,
853 HTMLInputElement_get_vspace
,
854 HTMLInputElement_put_hspace
,
855 HTMLInputElement_get_hspace
,
856 HTMLInputElement_put_alt
,
857 HTMLInputElement_get_alt
,
858 HTMLInputElement_put_src
,
859 HTMLInputElement_get_src
,
860 HTMLInputElement_put_lowsrc
,
861 HTMLInputElement_get_lowsrc
,
862 HTMLInputElement_put_vrml
,
863 HTMLInputElement_get_vrml
,
864 HTMLInputElement_put_dynsrc
,
865 HTMLInputElement_get_dynsrc
,
866 HTMLInputElement_get_readyState
,
867 HTMLInputElement_get_complete
,
868 HTMLInputElement_put_loop
,
869 HTMLInputElement_get_loop
,
870 HTMLInputElement_put_align
,
871 HTMLInputElement_get_align
,
872 HTMLInputElement_put_onload
,
873 HTMLInputElement_get_onload
,
874 HTMLInputElement_put_onerror
,
875 HTMLInputElement_get_onerror
,
876 HTMLInputElement_put_onabort
,
877 HTMLInputElement_get_onabort
,
878 HTMLInputElement_put_width
,
879 HTMLInputElement_get_width
,
880 HTMLInputElement_put_height
,
881 HTMLInputElement_get_height
,
882 HTMLInputElement_put_start
,
883 HTMLInputElement_get_start
886 static HRESULT WINAPI
HTMLInputTextElement_QueryInterface(IHTMLInputTextElement
*iface
,
887 REFIID riid
, void **ppv
)
889 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
891 return IHTMLDOMNode_QueryInterface(&This
->element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
894 static ULONG WINAPI
HTMLInputTextElement_AddRef(IHTMLInputTextElement
*iface
)
896 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
898 return IHTMLDOMNode_AddRef(&This
->element
.node
.IHTMLDOMNode_iface
);
901 static ULONG WINAPI
HTMLInputTextElement_Release(IHTMLInputTextElement
*iface
)
903 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
905 return IHTMLDOMNode_Release(&This
->element
.node
.IHTMLDOMNode_iface
);
908 static HRESULT WINAPI
HTMLInputTextElement_GetTypeInfoCount(IHTMLInputTextElement
*iface
, UINT
*pctinfo
)
910 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
911 return IDispatchEx_GetTypeInfoCount(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
914 static HRESULT WINAPI
HTMLInputTextElement_GetTypeInfo(IHTMLInputTextElement
*iface
, UINT iTInfo
,
915 LCID lcid
, ITypeInfo
**ppTInfo
)
917 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
918 return IDispatchEx_GetTypeInfo(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
922 static HRESULT WINAPI
HTMLInputTextElement_GetIDsOfNames(IHTMLInputTextElement
*iface
, REFIID riid
,
923 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
925 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
926 return IDispatchEx_GetIDsOfNames(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
927 cNames
, lcid
, rgDispId
);
930 static HRESULT WINAPI
HTMLInputTextElement_Invoke(IHTMLInputTextElement
*iface
, DISPID dispIdMember
,
931 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
932 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
934 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
935 return IDispatchEx_Invoke(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
936 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
939 static HRESULT WINAPI
HTMLInputTextElement_get_type(IHTMLInputTextElement
*iface
, BSTR
*p
)
941 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
943 TRACE("(%p)->(%p)\n", This
, p
);
945 return IHTMLInputElement_get_type(&This
->IHTMLInputElement_iface
, p
);
948 static HRESULT WINAPI
HTMLInputTextElement_put_value(IHTMLInputTextElement
*iface
, BSTR v
)
950 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
952 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
954 return IHTMLInputElement_put_value(&This
->IHTMLInputElement_iface
, v
);
957 static HRESULT WINAPI
HTMLInputTextElement_get_value(IHTMLInputTextElement
*iface
, BSTR
*p
)
959 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
961 TRACE("(%p)->(%p)\n", This
, p
);
963 return IHTMLInputElement_get_value(&This
->IHTMLInputElement_iface
, p
);
966 static HRESULT WINAPI
HTMLInputTextElement_put_name(IHTMLInputTextElement
*iface
, BSTR v
)
968 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
970 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
972 return IHTMLInputElement_put_name(&This
->IHTMLInputElement_iface
, v
);
975 static HRESULT WINAPI
HTMLInputTextElement_get_name(IHTMLInputTextElement
*iface
, BSTR
*p
)
977 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
979 TRACE("(%p)->(%p)\n", This
, p
);
981 return IHTMLInputElement_get_name(&This
->IHTMLInputElement_iface
, p
);
984 static HRESULT WINAPI
HTMLInputTextElement_put_status(IHTMLInputTextElement
*iface
, VARIANT v
)
986 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
987 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
991 static HRESULT WINAPI
HTMLInputTextElement_get_status(IHTMLInputTextElement
*iface
, VARIANT
*p
)
993 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
994 TRACE("(%p)->(%p)\n", This
, p
);
998 static HRESULT WINAPI
HTMLInputTextElement_put_disabled(IHTMLInputTextElement
*iface
, VARIANT_BOOL v
)
1000 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1002 TRACE("(%p)->(%x)\n", This
, v
);
1004 return IHTMLInputElement_put_disabled(&This
->IHTMLInputElement_iface
, v
);
1007 static HRESULT WINAPI
HTMLInputTextElement_get_disabled(IHTMLInputTextElement
*iface
, VARIANT_BOOL
*p
)
1009 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1011 TRACE("(%p)->(%p)\n", This
, p
);
1013 return IHTMLInputElement_get_disabled(&This
->IHTMLInputElement_iface
, p
);
1016 static HRESULT WINAPI
HTMLInputTextElement_get_form(IHTMLInputTextElement
*iface
, IHTMLFormElement
**p
)
1018 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1020 TRACE("(%p)->(%p)\n", This
, p
);
1022 return IHTMLInputElement_get_form(&This
->IHTMLInputElement_iface
, p
);
1025 static HRESULT WINAPI
HTMLInputTextElement_put_defaultValue(IHTMLInputTextElement
*iface
, BSTR v
)
1027 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1029 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1031 return IHTMLInputElement_put_defaultValue(&This
->IHTMLInputElement_iface
, v
);
1034 static HRESULT WINAPI
HTMLInputTextElement_get_defaultValue(IHTMLInputTextElement
*iface
, BSTR
*p
)
1036 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1038 TRACE("(%p)->(%p)\n", This
, p
);
1040 return IHTMLInputElement_get_defaultValue(&This
->IHTMLInputElement_iface
, p
);
1043 static HRESULT WINAPI
HTMLInputTextElement_put_size(IHTMLInputTextElement
*iface
, LONG v
)
1045 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1047 TRACE("(%p)->(%d)\n", This
, v
);
1049 return IHTMLInputElement_put_size(&This
->IHTMLInputElement_iface
, v
);
1052 static HRESULT WINAPI
HTMLInputTextElement_get_size(IHTMLInputTextElement
*iface
, LONG
*p
)
1054 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1056 TRACE("(%p)->(%p)\n", This
, p
);
1058 return IHTMLInputElement_get_size(&This
->IHTMLInputElement_iface
, p
);
1061 static HRESULT WINAPI
HTMLInputTextElement_put_maxLength(IHTMLInputTextElement
*iface
, LONG v
)
1063 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1065 TRACE("(%p)->(%d)\n", This
, v
);
1067 return IHTMLInputElement_put_maxLength(&This
->IHTMLInputElement_iface
, v
);
1070 static HRESULT WINAPI
HTMLInputTextElement_get_maxLength(IHTMLInputTextElement
*iface
, LONG
*p
)
1072 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1074 TRACE("(%p)->(%p)\n", This
, p
);
1076 return IHTMLInputElement_get_maxLength(&This
->IHTMLInputElement_iface
, p
);
1079 static HRESULT WINAPI
HTMLInputTextElement_select(IHTMLInputTextElement
*iface
)
1081 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1083 TRACE("(%p)\n", This
);
1085 return IHTMLInputElement_select(&This
->IHTMLInputElement_iface
);
1088 static HRESULT WINAPI
HTMLInputTextElement_put_onchange(IHTMLInputTextElement
*iface
, VARIANT v
)
1090 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1092 TRACE("(%p)->()\n", This
);
1094 return IHTMLInputElement_put_onchange(&This
->IHTMLInputElement_iface
, v
);
1097 static HRESULT WINAPI
HTMLInputTextElement_get_onchange(IHTMLInputTextElement
*iface
, VARIANT
*p
)
1099 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1101 TRACE("(%p)->(%p)\n", This
, p
);
1103 return IHTMLInputElement_get_onchange(&This
->IHTMLInputElement_iface
, p
);
1106 static HRESULT WINAPI
HTMLInputTextElement_put_onselect(IHTMLInputTextElement
*iface
, VARIANT v
)
1108 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1110 TRACE("(%p)->()\n", This
);
1112 return IHTMLInputElement_put_onselect(&This
->IHTMLInputElement_iface
, v
);
1115 static HRESULT WINAPI
HTMLInputTextElement_get_onselect(IHTMLInputTextElement
*iface
, VARIANT
*p
)
1117 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1119 TRACE("(%p)->(%p)\n", This
, p
);
1121 return IHTMLInputElement_get_onselect(&This
->IHTMLInputElement_iface
, p
);
1124 static HRESULT WINAPI
HTMLInputTextElement_put_readOnly(IHTMLInputTextElement
*iface
, VARIANT_BOOL v
)
1126 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1128 TRACE("(%p)->(%x)\n", This
, v
);
1130 return IHTMLInputElement_put_readOnly(&This
->IHTMLInputElement_iface
, v
);
1133 static HRESULT WINAPI
HTMLInputTextElement_get_readOnly(IHTMLInputTextElement
*iface
, VARIANT_BOOL
*p
)
1135 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1137 TRACE("(%p)->(%p)\n", This
, p
);
1139 return IHTMLInputElement_get_readOnly(&This
->IHTMLInputElement_iface
, p
);
1142 static HRESULT WINAPI
HTMLInputTextElement_createTextRange(IHTMLInputTextElement
*iface
, IHTMLTxtRange
**range
)
1144 HTMLInputElement
*This
= impl_from_IHTMLInputTextElement(iface
);
1146 TRACE("(%p)->(%p)\n", This
, range
);
1148 return IHTMLInputElement_createTextRange(&This
->IHTMLInputElement_iface
, range
);
1151 static const IHTMLInputTextElementVtbl HTMLInputTextElementVtbl
= {
1152 HTMLInputTextElement_QueryInterface
,
1153 HTMLInputTextElement_AddRef
,
1154 HTMLInputTextElement_Release
,
1155 HTMLInputTextElement_GetTypeInfoCount
,
1156 HTMLInputTextElement_GetTypeInfo
,
1157 HTMLInputTextElement_GetIDsOfNames
,
1158 HTMLInputTextElement_Invoke
,
1159 HTMLInputTextElement_get_type
,
1160 HTMLInputTextElement_put_value
,
1161 HTMLInputTextElement_get_value
,
1162 HTMLInputTextElement_put_name
,
1163 HTMLInputTextElement_get_name
,
1164 HTMLInputTextElement_put_status
,
1165 HTMLInputTextElement_get_status
,
1166 HTMLInputTextElement_put_disabled
,
1167 HTMLInputTextElement_get_disabled
,
1168 HTMLInputTextElement_get_form
,
1169 HTMLInputTextElement_put_defaultValue
,
1170 HTMLInputTextElement_get_defaultValue
,
1171 HTMLInputTextElement_put_size
,
1172 HTMLInputTextElement_get_size
,
1173 HTMLInputTextElement_put_maxLength
,
1174 HTMLInputTextElement_get_maxLength
,
1175 HTMLInputTextElement_select
,
1176 HTMLInputTextElement_put_onchange
,
1177 HTMLInputTextElement_get_onchange
,
1178 HTMLInputTextElement_put_onselect
,
1179 HTMLInputTextElement_get_onselect
,
1180 HTMLInputTextElement_put_readOnly
,
1181 HTMLInputTextElement_get_readOnly
,
1182 HTMLInputTextElement_createTextRange
1185 static inline HTMLInputElement
*impl_from_HTMLDOMNode(HTMLDOMNode
*iface
)
1187 return CONTAINING_RECORD(iface
, HTMLInputElement
, element
.node
);
1190 static HRESULT
HTMLInputElement_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
1192 HTMLInputElement
*This
= impl_from_HTMLDOMNode(iface
);
1196 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
1197 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
1198 *ppv
= &This
->IHTMLInputElement_iface
;
1199 }else if(IsEqualGUID(&IID_IDispatch
, riid
)) {
1200 TRACE("(%p)->(IID_IDispatch %p)\n", This
, ppv
);
1201 *ppv
= &This
->IHTMLInputElement_iface
;
1202 }else if(IsEqualGUID(&IID_IHTMLInputElement
, riid
)) {
1203 TRACE("(%p)->(IID_IHTMLInputElement %p)\n", This
, ppv
);
1204 *ppv
= &This
->IHTMLInputElement_iface
;
1205 }else if(IsEqualGUID(&IID_IHTMLInputTextElement
, riid
)) {
1206 TRACE("(%p)->(IID_IHTMLInputTextElement %p)\n", This
, ppv
);
1207 *ppv
= &This
->IHTMLInputTextElement_iface
;
1211 IUnknown_AddRef((IUnknown
*)*ppv
);
1215 return HTMLElement_QI(&This
->element
.node
, riid
, ppv
);
1218 static HRESULT
HTMLInputElementImpl_fire_event(HTMLDOMNode
*iface
, eventid_t eid
, BOOL
*handled
)
1220 HTMLInputElement
*This
= impl_from_HTMLDOMNode(iface
);
1222 if(eid
== EVENTID_CLICK
) {
1227 nsres
= nsIDOMHTMLElement_Click(This
->element
.nselem
);
1228 if(NS_FAILED(nsres
)) {
1229 ERR("Click failed: %08x\n", nsres
);
1237 static HRESULT
HTMLInputElementImpl_put_disabled(HTMLDOMNode
*iface
, VARIANT_BOOL v
)
1239 HTMLInputElement
*This
= impl_from_HTMLDOMNode(iface
);
1240 return IHTMLInputElement_put_disabled(&This
->IHTMLInputElement_iface
, v
);
1243 static HRESULT
HTMLInputElementImpl_get_disabled(HTMLDOMNode
*iface
, VARIANT_BOOL
*p
)
1245 HTMLInputElement
*This
= impl_from_HTMLDOMNode(iface
);
1246 return IHTMLInputElement_get_disabled(&This
->IHTMLInputElement_iface
, p
);
1249 static BOOL
HTMLInputElement_is_text_edit(HTMLDOMNode
*iface
)
1251 HTMLInputElement
*This
= impl_from_HTMLDOMNode(iface
);
1252 const PRUnichar
*type
;
1257 static const WCHAR buttonW
[] = {'b','u','t','t','o','n',0};
1258 static const WCHAR hiddenW
[] = {'h','i','d','d','e','n',0};
1259 static const WCHAR passwordW
[] = {'p','a','s','s','w','o','r','d',0};
1260 static const WCHAR resetW
[] = {'r','e','s','e','t',0};
1261 static const WCHAR submitW
[] = {'s','u','b','m','i','t',0};
1262 static const WCHAR textW
[] = {'t','e','x','t',0};
1264 nsAString_Init(&nsstr
, NULL
);
1265 nsres
= nsIDOMHTMLInputElement_GetType(This
->nsinput
, &nsstr
);
1266 if(NS_SUCCEEDED(nsres
)) {
1267 nsAString_GetData(&nsstr
, &type
);
1268 ret
= !strcmpW(type
, buttonW
) || !strcmpW(type
, hiddenW
) || !strcmpW(type
, passwordW
)
1269 || !strcmpW(type
, resetW
) || !strcmpW(type
, submitW
) || !strcmpW(type
, textW
);
1271 nsAString_Finish(&nsstr
);
1275 static void HTMLInputElement_traverse(HTMLDOMNode
*iface
, nsCycleCollectionTraversalCallback
*cb
)
1277 HTMLInputElement
*This
= impl_from_HTMLDOMNode(iface
);
1280 note_cc_edge((nsISupports
*)This
->nsinput
, "This->nsinput", cb
);
1283 static void HTMLInputElement_unlink(HTMLDOMNode
*iface
)
1285 HTMLInputElement
*This
= impl_from_HTMLDOMNode(iface
);
1288 nsIDOMHTMLInputElement
*nsinput
= This
->nsinput
;
1290 This
->nsinput
= NULL
;
1291 nsIDOMHTMLInputElement_Release(nsinput
);
1295 static const NodeImplVtbl HTMLInputElementImplVtbl
= {
1296 HTMLInputElement_QI
,
1297 HTMLElement_destructor
,
1300 HTMLElement_handle_event
,
1301 HTMLElement_get_attr_col
,
1303 HTMLInputElementImpl_fire_event
,
1304 HTMLInputElementImpl_put_disabled
,
1305 HTMLInputElementImpl_get_disabled
,
1311 HTMLInputElement_traverse
,
1312 HTMLInputElement_unlink
,
1313 HTMLInputElement_is_text_edit
1316 static const tid_t HTMLInputElement_iface_tids
[] = {
1318 IHTMLInputElement_tid
,
1321 static dispex_static_data_t HTMLInputElement_dispex
= {
1323 DispHTMLInputElement_tid
,
1325 HTMLInputElement_iface_tids
1328 HRESULT
HTMLInputElement_Create(HTMLDocumentNode
*doc
, nsIDOMHTMLElement
*nselem
, HTMLElement
**elem
)
1330 HTMLInputElement
*ret
;
1333 ret
= heap_alloc_zero(sizeof(HTMLInputElement
));
1335 return E_OUTOFMEMORY
;
1337 ret
->IHTMLInputElement_iface
.lpVtbl
= &HTMLInputElementVtbl
;
1338 ret
->IHTMLInputTextElement_iface
.lpVtbl
= &HTMLInputTextElementVtbl
;
1339 ret
->element
.node
.vtbl
= &HTMLInputElementImplVtbl
;
1341 HTMLElement_Init(&ret
->element
, doc
, nselem
, &HTMLInputElement_dispex
);
1343 nsres
= nsIDOMHTMLElement_QueryInterface(nselem
, &IID_nsIDOMHTMLInputElement
, (void**)&ret
->nsinput
);
1344 assert(nsres
== NS_OK
);
1346 *elem
= &ret
->element
;
1351 HTMLElement element
;
1353 IHTMLLabelElement IHTMLLabelElement_iface
;
1356 static inline HTMLLabelElement
*impl_from_IHTMLLabelElement(IHTMLLabelElement
*iface
)
1358 return CONTAINING_RECORD(iface
, HTMLLabelElement
, IHTMLLabelElement_iface
);
1361 static HRESULT WINAPI
HTMLLabelElement_QueryInterface(IHTMLLabelElement
*iface
,
1362 REFIID riid
, void **ppv
)
1364 HTMLLabelElement
*This
= impl_from_IHTMLLabelElement(iface
);
1366 return IHTMLDOMNode_QueryInterface(&This
->element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
1369 static ULONG WINAPI
HTMLLabelElement_AddRef(IHTMLLabelElement
*iface
)
1371 HTMLLabelElement
*This
= impl_from_IHTMLLabelElement(iface
);
1373 return IHTMLDOMNode_AddRef(&This
->element
.node
.IHTMLDOMNode_iface
);
1376 static ULONG WINAPI
HTMLLabelElement_Release(IHTMLLabelElement
*iface
)
1378 HTMLLabelElement
*This
= impl_from_IHTMLLabelElement(iface
);
1380 return IHTMLDOMNode_Release(&This
->element
.node
.IHTMLDOMNode_iface
);
1383 static HRESULT WINAPI
HTMLLabelElement_GetTypeInfoCount(IHTMLLabelElement
*iface
, UINT
*pctinfo
)
1385 HTMLLabelElement
*This
= impl_from_IHTMLLabelElement(iface
);
1387 return IDispatchEx_GetTypeInfoCount(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
1390 static HRESULT WINAPI
HTMLLabelElement_GetTypeInfo(IHTMLLabelElement
*iface
, UINT iTInfo
,
1391 LCID lcid
, ITypeInfo
**ppTInfo
)
1393 HTMLLabelElement
*This
= impl_from_IHTMLLabelElement(iface
);
1395 return IDispatchEx_GetTypeInfo(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
1398 static HRESULT WINAPI
HTMLLabelElement_GetIDsOfNames(IHTMLLabelElement
*iface
, REFIID riid
,
1399 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
1401 HTMLLabelElement
*This
= impl_from_IHTMLLabelElement(iface
);
1403 return IDispatchEx_GetIDsOfNames(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
1404 cNames
, lcid
, rgDispId
);
1407 static HRESULT WINAPI
HTMLLabelElement_Invoke(IHTMLLabelElement
*iface
, DISPID dispIdMember
,
1408 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
1409 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
1411 HTMLLabelElement
*This
= impl_from_IHTMLLabelElement(iface
);
1413 return IDispatchEx_Invoke(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
1414 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
1417 static HRESULT WINAPI
HTMLLabelElement_put_htmlFor(IHTMLLabelElement
*iface
, BSTR v
)
1419 HTMLLabelElement
*This
= impl_from_IHTMLLabelElement(iface
);
1420 nsAString for_str
, val_str
;
1423 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1425 nsAString_InitDepend(&for_str
, forW
);
1426 nsAString_InitDepend(&val_str
, v
);
1427 nsres
= nsIDOMHTMLElement_SetAttribute(This
->element
.nselem
, &for_str
, &val_str
);
1428 nsAString_Finish(&for_str
);
1429 nsAString_Finish(&val_str
);
1430 if(NS_FAILED(nsres
)) {
1431 ERR("SetAttribute failed: %08x\n", nsres
);
1438 static HRESULT WINAPI
HTMLLabelElement_get_htmlFor(IHTMLLabelElement
*iface
, BSTR
*p
)
1440 HTMLLabelElement
*This
= impl_from_IHTMLLabelElement(iface
);
1442 TRACE("(%p)->(%p)\n", This
, p
);
1444 return elem_string_attr_getter(&This
->element
, forW
, FALSE
, p
);
1447 static HRESULT WINAPI
HTMLLabelElement_put_accessKey(IHTMLLabelElement
*iface
, BSTR v
)
1449 HTMLLabelElement
*This
= impl_from_IHTMLLabelElement(iface
);
1450 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1454 static HRESULT WINAPI
HTMLLabelElement_get_accessKey(IHTMLLabelElement
*iface
, BSTR
*p
)
1456 HTMLLabelElement
*This
= impl_from_IHTMLLabelElement(iface
);
1457 FIXME("(%p)->(%p)\n", This
, p
);
1461 static const IHTMLLabelElementVtbl HTMLLabelElementVtbl
= {
1462 HTMLLabelElement_QueryInterface
,
1463 HTMLLabelElement_AddRef
,
1464 HTMLLabelElement_Release
,
1465 HTMLLabelElement_GetTypeInfoCount
,
1466 HTMLLabelElement_GetTypeInfo
,
1467 HTMLLabelElement_GetIDsOfNames
,
1468 HTMLLabelElement_Invoke
,
1469 HTMLLabelElement_put_htmlFor
,
1470 HTMLLabelElement_get_htmlFor
,
1471 HTMLLabelElement_put_accessKey
,
1472 HTMLLabelElement_get_accessKey
1475 static inline HTMLLabelElement
*label_from_HTMLDOMNode(HTMLDOMNode
*iface
)
1477 return CONTAINING_RECORD(iface
, HTMLLabelElement
, element
.node
);
1480 static HRESULT
HTMLLabelElement_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
1482 HTMLLabelElement
*This
= label_from_HTMLDOMNode(iface
);
1486 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
1487 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
1488 *ppv
= &This
->IHTMLLabelElement_iface
;
1489 }else if(IsEqualGUID(&IID_IHTMLLabelElement
, riid
)) {
1490 TRACE("(%p)->(IID_IHTMLLabelElement %p)\n", This
, ppv
);
1491 *ppv
= &This
->IHTMLLabelElement_iface
;
1493 return HTMLElement_QI(&This
->element
.node
, riid
, ppv
);
1496 IUnknown_AddRef((IUnknown
*)*ppv
);
1500 static const NodeImplVtbl HTMLLabelElementImplVtbl
= {
1501 HTMLLabelElement_QI
,
1502 HTMLElement_destructor
,
1505 HTMLElement_handle_event
,
1506 HTMLElement_get_attr_col
,
1509 static const tid_t HTMLLabelElement_iface_tids
[] = {
1511 IHTMLLabelElement_tid
,
1515 static dispex_static_data_t HTMLLabelElement_dispex
= {
1517 DispHTMLLabelElement_tid
,
1519 HTMLLabelElement_iface_tids
1522 HRESULT
HTMLLabelElement_Create(HTMLDocumentNode
*doc
, nsIDOMHTMLElement
*nselem
, HTMLElement
**elem
)
1524 HTMLLabelElement
*ret
;
1526 ret
= heap_alloc_zero(sizeof(*ret
));
1528 return E_OUTOFMEMORY
;
1530 ret
->IHTMLLabelElement_iface
.lpVtbl
= &HTMLLabelElementVtbl
;
1531 ret
->element
.node
.vtbl
= &HTMLLabelElementImplVtbl
;
1533 HTMLElement_Init(&ret
->element
, doc
, nselem
, &HTMLLabelElement_dispex
);
1534 *elem
= &ret
->element
;
1539 HTMLElement element
;
1541 IHTMLButtonElement IHTMLButtonElement_iface
;
1543 nsIDOMHTMLButtonElement
*nsbutton
;
1544 } HTMLButtonElement
;
1546 static inline HTMLButtonElement
*impl_from_IHTMLButtonElement(IHTMLButtonElement
*iface
)
1548 return CONTAINING_RECORD(iface
, HTMLButtonElement
, IHTMLButtonElement_iface
);
1551 static HRESULT WINAPI
HTMLButtonElement_QueryInterface(IHTMLButtonElement
*iface
,
1552 REFIID riid
, void **ppv
)
1554 HTMLButtonElement
*This
= impl_from_IHTMLButtonElement(iface
);
1556 return IHTMLDOMNode_QueryInterface(&This
->element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
1559 static ULONG WINAPI
HTMLButtonElement_AddRef(IHTMLButtonElement
*iface
)
1561 HTMLButtonElement
*This
= impl_from_IHTMLButtonElement(iface
);
1563 return IHTMLDOMNode_AddRef(&This
->element
.node
.IHTMLDOMNode_iface
);
1566 static ULONG WINAPI
HTMLButtonElement_Release(IHTMLButtonElement
*iface
)
1568 HTMLButtonElement
*This
= impl_from_IHTMLButtonElement(iface
);
1570 return IHTMLDOMNode_Release(&This
->element
.node
.IHTMLDOMNode_iface
);
1573 static HRESULT WINAPI
HTMLButtonElement_GetTypeInfoCount(IHTMLButtonElement
*iface
, UINT
*pctinfo
)
1575 HTMLButtonElement
*This
= impl_from_IHTMLButtonElement(iface
);
1577 return IDispatchEx_GetTypeInfoCount(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
1580 static HRESULT WINAPI
HTMLButtonElement_GetTypeInfo(IHTMLButtonElement
*iface
, UINT iTInfo
,
1581 LCID lcid
, ITypeInfo
**ppTInfo
)
1583 HTMLButtonElement
*This
= impl_from_IHTMLButtonElement(iface
);
1585 return IDispatchEx_GetTypeInfo(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
1588 static HRESULT WINAPI
HTMLButtonElement_GetIDsOfNames(IHTMLButtonElement
*iface
, REFIID riid
,
1589 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
1591 HTMLButtonElement
*This
= impl_from_IHTMLButtonElement(iface
);
1593 return IDispatchEx_GetIDsOfNames(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
1594 cNames
, lcid
, rgDispId
);
1597 static HRESULT WINAPI
HTMLButtonElement_Invoke(IHTMLButtonElement
*iface
, DISPID dispIdMember
,
1598 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
1599 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
1601 HTMLButtonElement
*This
= impl_from_IHTMLButtonElement(iface
);
1603 return IDispatchEx_Invoke(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
1604 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
1607 static HRESULT WINAPI
HTMLButtonElement_get_type(IHTMLButtonElement
*iface
, BSTR
*p
)
1609 HTMLButtonElement
*This
= impl_from_IHTMLButtonElement(iface
);
1610 FIXME("(%p)->(%p)\n", This
, p
);
1614 static HRESULT WINAPI
HTMLButtonElement_put_value(IHTMLButtonElement
*iface
, BSTR v
)
1616 HTMLButtonElement
*This
= impl_from_IHTMLButtonElement(iface
);
1617 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1621 static HRESULT WINAPI
HTMLButtonElement_get_value(IHTMLButtonElement
*iface
, BSTR
*p
)
1623 HTMLButtonElement
*This
= impl_from_IHTMLButtonElement(iface
);
1624 FIXME("(%p)->(%p)\n", This
, p
);
1628 static HRESULT WINAPI
HTMLButtonElement_put_name(IHTMLButtonElement
*iface
, BSTR v
)
1630 HTMLButtonElement
*This
= impl_from_IHTMLButtonElement(iface
);
1634 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1636 nsAString_InitDepend(&name_str
, v
);
1637 nsres
= nsIDOMHTMLButtonElement_SetName(This
->nsbutton
, &name_str
);
1638 nsAString_Finish(&name_str
);
1639 if(NS_FAILED(nsres
)) {
1640 ERR("SetName failed: %08x\n", nsres
);
1647 static HRESULT WINAPI
HTMLButtonElement_get_name(IHTMLButtonElement
*iface
, BSTR
*p
)
1649 HTMLButtonElement
*This
= impl_from_IHTMLButtonElement(iface
);
1653 TRACE("(%p)->(%p)\n", This
, p
);
1655 nsAString_Init(&name_str
, NULL
);
1656 nsres
= nsIDOMHTMLButtonElement_GetName(This
->nsbutton
, &name_str
);
1657 return return_nsstr(nsres
, &name_str
, p
);
1660 static HRESULT WINAPI
HTMLButtonElement_put_status(IHTMLButtonElement
*iface
, VARIANT v
)
1662 HTMLButtonElement
*This
= impl_from_IHTMLButtonElement(iface
);
1663 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1667 static HRESULT WINAPI
HTMLButtonElement_get_status(IHTMLButtonElement
*iface
, VARIANT
*p
)
1669 HTMLButtonElement
*This
= impl_from_IHTMLButtonElement(iface
);
1670 FIXME("(%p)->(%p)\n", This
, p
);
1674 static HRESULT WINAPI
HTMLButtonElement_put_disabled(IHTMLButtonElement
*iface
, VARIANT_BOOL v
)
1676 HTMLButtonElement
*This
= impl_from_IHTMLButtonElement(iface
);
1679 TRACE("(%p)->(%x)\n", This
, v
);
1681 nsres
= nsIDOMHTMLButtonElement_SetDisabled(This
->nsbutton
, !!v
);
1682 if(NS_FAILED(nsres
)) {
1683 ERR("SetDisabled failed: %08x\n", nsres
);
1690 static HRESULT WINAPI
HTMLButtonElement_get_disabled(IHTMLButtonElement
*iface
, VARIANT_BOOL
*p
)
1692 HTMLButtonElement
*This
= impl_from_IHTMLButtonElement(iface
);
1696 TRACE("(%p)->(%p)\n", This
, p
);
1698 nsres
= nsIDOMHTMLButtonElement_GetDisabled(This
->nsbutton
, &disabled
);
1699 if(NS_FAILED(nsres
)) {
1700 ERR("GetDisabled failed: %08x\n", nsres
);
1704 *p
= disabled
? VARIANT_TRUE
: VARIANT_FALSE
;
1708 static HRESULT WINAPI
HTMLButtonElement_get_form(IHTMLButtonElement
*iface
, IHTMLFormElement
**p
)
1710 HTMLButtonElement
*This
= impl_from_IHTMLButtonElement(iface
);
1711 FIXME("(%p)->(%p)\n", This
, p
);
1715 static HRESULT WINAPI
HTMLButtonElement_createTextRange(IHTMLButtonElement
*iface
, IHTMLTxtRange
**range
)
1717 HTMLButtonElement
*This
= impl_from_IHTMLButtonElement(iface
);
1718 FIXME("(%p)->(%p)\n", This
, range
);
1722 static const IHTMLButtonElementVtbl HTMLButtonElementVtbl
= {
1723 HTMLButtonElement_QueryInterface
,
1724 HTMLButtonElement_AddRef
,
1725 HTMLButtonElement_Release
,
1726 HTMLButtonElement_GetTypeInfoCount
,
1727 HTMLButtonElement_GetTypeInfo
,
1728 HTMLButtonElement_GetIDsOfNames
,
1729 HTMLButtonElement_Invoke
,
1730 HTMLButtonElement_get_type
,
1731 HTMLButtonElement_put_value
,
1732 HTMLButtonElement_get_value
,
1733 HTMLButtonElement_put_name
,
1734 HTMLButtonElement_get_name
,
1735 HTMLButtonElement_put_status
,
1736 HTMLButtonElement_get_status
,
1737 HTMLButtonElement_put_disabled
,
1738 HTMLButtonElement_get_disabled
,
1739 HTMLButtonElement_get_form
,
1740 HTMLButtonElement_createTextRange
1743 static inline HTMLButtonElement
*button_from_HTMLDOMNode(HTMLDOMNode
*iface
)
1745 return CONTAINING_RECORD(iface
, HTMLButtonElement
, element
.node
);
1748 static HRESULT
HTMLButtonElement_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
1750 HTMLButtonElement
*This
= button_from_HTMLDOMNode(iface
);
1754 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
1755 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
1756 *ppv
= &This
->IHTMLButtonElement_iface
;
1757 }else if(IsEqualGUID(&IID_IHTMLButtonElement
, riid
)) {
1758 TRACE("(%p)->(IID_IHTMLButtonElement %p)\n", This
, ppv
);
1759 *ppv
= &This
->IHTMLButtonElement_iface
;
1761 return HTMLElement_QI(&This
->element
.node
, riid
, ppv
);
1764 IUnknown_AddRef((IUnknown
*)*ppv
);
1768 static HRESULT
HTMLButtonElementImpl_put_disabled(HTMLDOMNode
*iface
, VARIANT_BOOL v
)
1770 HTMLButtonElement
*This
= button_from_HTMLDOMNode(iface
);
1771 return IHTMLButtonElement_put_disabled(&This
->IHTMLButtonElement_iface
, v
);
1774 static HRESULT
HTMLButtonElementImpl_get_disabled(HTMLDOMNode
*iface
, VARIANT_BOOL
*p
)
1776 HTMLButtonElement
*This
= button_from_HTMLDOMNode(iface
);
1777 return IHTMLButtonElement_get_disabled(&This
->IHTMLButtonElement_iface
, p
);
1780 static BOOL
HTMLButtonElement_is_text_edit(HTMLDOMNode
*iface
)
1785 static void HTMLButtonElement_traverse(HTMLDOMNode
*iface
, nsCycleCollectionTraversalCallback
*cb
)
1787 HTMLButtonElement
*This
= button_from_HTMLDOMNode(iface
);
1790 note_cc_edge((nsISupports
*)This
->nsbutton
, "This->nsbutton", cb
);
1793 static void HTMLButtonElement_unlink(HTMLDOMNode
*iface
)
1795 HTMLButtonElement
*This
= button_from_HTMLDOMNode(iface
);
1797 if(This
->nsbutton
) {
1798 nsIDOMHTMLButtonElement
*nsbutton
= This
->nsbutton
;
1800 This
->nsbutton
= NULL
;
1801 nsIDOMHTMLButtonElement_Release(nsbutton
);
1805 static const NodeImplVtbl HTMLButtonElementImplVtbl
= {
1806 HTMLButtonElement_QI
,
1807 HTMLElement_destructor
,
1810 HTMLElement_handle_event
,
1811 HTMLElement_get_attr_col
,
1814 HTMLButtonElementImpl_put_disabled
,
1815 HTMLButtonElementImpl_get_disabled
,
1821 HTMLButtonElement_traverse
,
1822 HTMLButtonElement_unlink
,
1823 HTMLButtonElement_is_text_edit
1826 static const tid_t HTMLButtonElement_iface_tids
[] = {
1828 IHTMLButtonElement_tid
,
1832 static dispex_static_data_t HTMLButtonElement_dispex
= {
1834 DispHTMLButtonElement_tid
,
1836 HTMLButtonElement_iface_tids
1839 HRESULT
HTMLButtonElement_Create(HTMLDocumentNode
*doc
, nsIDOMHTMLElement
*nselem
, HTMLElement
**elem
)
1841 HTMLButtonElement
*ret
;
1844 ret
= heap_alloc_zero(sizeof(*ret
));
1846 return E_OUTOFMEMORY
;
1848 ret
->IHTMLButtonElement_iface
.lpVtbl
= &HTMLButtonElementVtbl
;
1849 ret
->element
.node
.vtbl
= &HTMLButtonElementImplVtbl
;
1851 HTMLElement_Init(&ret
->element
, doc
, nselem
, &HTMLButtonElement_dispex
);
1853 nsres
= nsIDOMHTMLElement_QueryInterface(nselem
, &IID_nsIDOMHTMLButtonElement
, (void**)&ret
->nsbutton
);
1854 assert(nsres
== NS_OK
);
1856 *elem
= &ret
->element
;