2 * Copyright 2006-2010 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 #define WIN32_NO_STATUS
21 #define COM_NO_WINDOWS_H
30 //#include "winuser.h"
33 #include <wine/debug.h>
34 //#include "wine/unicode.h"
36 #include "mshtml_private.h"
37 #include "htmlevent.h"
39 WINE_DEFAULT_DEBUG_CHANNEL(mshtml
);
43 const IHTMLRectVtbl
*lpIHTMLRectVtbl
;
47 nsIDOMClientRect
*nsrect
;
50 #define HTMLRECT(x) ((IHTMLRect*) &(x)->lpIHTMLRectVtbl)
52 #define HTMLRECT_THIS(iface) DEFINE_THIS(HTMLRect, IHTMLRect, iface)
54 static HRESULT WINAPI
HTMLRect_QueryInterface(IHTMLRect
*iface
, REFIID riid
, void **ppv
)
56 HTMLRect
*This
= HTMLRECT_THIS(iface
);
58 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
59 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
60 *ppv
= HTMLRECT(This
);
61 }else if(IsEqualGUID(&IID_IHTMLRect
, riid
)) {
62 TRACE("(%p)->(IID_IHTMLRect %p)\n", This
, ppv
);
63 *ppv
= HTMLRECT(This
);
64 }else if(dispex_query_interface(&This
->dispex
, riid
, ppv
)) {
65 return *ppv
? S_OK
: E_NOINTERFACE
;
67 FIXME("(%p)->(%s %p)\n", This
, debugstr_guid(riid
), ppv
);
72 IUnknown_AddRef((IUnknown
*)*ppv
);
76 static ULONG WINAPI
HTMLRect_AddRef(IHTMLRect
*iface
)
78 HTMLRect
*This
= HTMLRECT_THIS(iface
);
79 LONG ref
= InterlockedIncrement(&This
->ref
);
81 TRACE("(%p) ref=%d\n", This
, ref
);
86 static ULONG WINAPI
HTMLRect_Release(IHTMLRect
*iface
)
88 HTMLRect
*This
= HTMLRECT_THIS(iface
);
89 LONG ref
= InterlockedDecrement(&This
->ref
);
91 TRACE("(%p) ref=%d\n", This
, ref
);
95 nsIDOMClientRect_Release(This
->nsrect
);
102 static HRESULT WINAPI
HTMLRect_GetTypeInfoCount(IHTMLRect
*iface
, UINT
*pctinfo
)
104 HTMLRect
*This
= HTMLRECT_THIS(iface
);
105 FIXME("(%p)->(%p)\n", This
, pctinfo
);
109 static HRESULT WINAPI
HTMLRect_GetTypeInfo(IHTMLRect
*iface
, UINT iTInfo
,
110 LCID lcid
, ITypeInfo
**ppTInfo
)
112 HTMLRect
*This
= HTMLRECT_THIS(iface
);
114 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This
->dispex
), iTInfo
, lcid
, ppTInfo
);
117 static HRESULT WINAPI
HTMLRect_GetIDsOfNames(IHTMLRect
*iface
, REFIID riid
,
118 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
120 HTMLRect
*This
= HTMLRECT_THIS(iface
);
122 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This
->dispex
), riid
, rgszNames
, cNames
, lcid
, rgDispId
);
125 static HRESULT WINAPI
HTMLRect_Invoke(IHTMLRect
*iface
, DISPID dispIdMember
,
126 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
127 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
129 HTMLRect
*This
= HTMLRECT_THIS(iface
);
131 return IDispatchEx_Invoke(DISPATCHEX(&This
->dispex
), dispIdMember
, riid
, lcid
, wFlags
, pDispParams
,
132 pVarResult
, pExcepInfo
, puArgErr
);
135 static HRESULT WINAPI
HTMLRect_put_left(IHTMLRect
*iface
, LONG v
)
137 HTMLRect
*This
= HTMLRECT_THIS(iface
);
138 FIXME("(%p)->(%d)\n", This
, v
);
142 static HRESULT WINAPI
HTMLRect_get_left(IHTMLRect
*iface
, LONG
*p
)
144 HTMLRect
*This
= HTMLRECT_THIS(iface
);
148 TRACE("(%p)->(%p)\n", This
, p
);
150 nsres
= nsIDOMClientRect_GetLeft(This
->nsrect
, &left
);
151 if(NS_FAILED(nsres
)) {
152 ERR("GetLeft failed: %08x\n", nsres
);
156 *p
= floor(left
+0.5);
160 static HRESULT WINAPI
HTMLRect_put_top(IHTMLRect
*iface
, LONG v
)
162 HTMLRect
*This
= HTMLRECT_THIS(iface
);
163 FIXME("(%p)->(%d)\n", This
, v
);
167 static HRESULT WINAPI
HTMLRect_get_top(IHTMLRect
*iface
, LONG
*p
)
169 HTMLRect
*This
= HTMLRECT_THIS(iface
);
173 TRACE("(%p)->(%p)\n", This
, p
);
175 nsres
= nsIDOMClientRect_GetTop(This
->nsrect
, &top
);
176 if(NS_FAILED(nsres
)) {
177 ERR("GetTop failed: %08x\n", nsres
);
185 static HRESULT WINAPI
HTMLRect_put_right(IHTMLRect
*iface
, LONG v
)
187 HTMLRect
*This
= HTMLRECT_THIS(iface
);
188 FIXME("(%p)->(%d)\n", This
, v
);
192 static HRESULT WINAPI
HTMLRect_get_right(IHTMLRect
*iface
, LONG
*p
)
194 HTMLRect
*This
= HTMLRECT_THIS(iface
);
198 TRACE("(%p)->(%p)\n", This
, p
);
200 nsres
= nsIDOMClientRect_GetRight(This
->nsrect
, &right
);
201 if(NS_FAILED(nsres
)) {
202 ERR("GetRight failed: %08x\n", nsres
);
206 *p
= floor(right
+0.5);
210 static HRESULT WINAPI
HTMLRect_put_bottom(IHTMLRect
*iface
, LONG v
)
212 HTMLRect
*This
= HTMLRECT_THIS(iface
);
213 FIXME("(%p)->(%d)\n", This
, v
);
217 static HRESULT WINAPI
HTMLRect_get_bottom(IHTMLRect
*iface
, LONG
*p
)
219 HTMLRect
*This
= HTMLRECT_THIS(iface
);
223 TRACE("(%p)->(%p)\n", This
, p
);
225 nsres
= nsIDOMClientRect_GetBottom(This
->nsrect
, &bottom
);
226 if(NS_FAILED(nsres
)) {
227 ERR("GetBottom failed: %08x\n", nsres
);
231 *p
= floor(bottom
+0.5);
237 static const IHTMLRectVtbl HTMLRectVtbl
= {
238 HTMLRect_QueryInterface
,
241 HTMLRect_GetTypeInfoCount
,
242 HTMLRect_GetTypeInfo
,
243 HTMLRect_GetIDsOfNames
,
255 static const tid_t HTMLRect_iface_tids
[] = {
259 static dispex_static_data_t HTMLRect_dispex
= {
266 static HRESULT
create_html_rect(nsIDOMClientRect
*nsrect
, IHTMLRect
**ret
)
270 rect
= heap_alloc_zero(sizeof(HTMLRect
));
272 return E_OUTOFMEMORY
;
274 rect
->lpIHTMLRectVtbl
= &HTMLRectVtbl
;
277 init_dispex(&rect
->dispex
, (IUnknown
*)HTMLRECT(rect
), &HTMLRect_dispex
);
279 nsIDOMClientRect_AddRef(nsrect
);
280 rect
->nsrect
= nsrect
;
282 *ret
= HTMLRECT(rect
);
286 #define HTMLELEM2_THIS(iface) DEFINE_THIS(HTMLElement, HTMLElement2, iface)
288 static HRESULT WINAPI
HTMLElement2_QueryInterface(IHTMLElement2
*iface
,
289 REFIID riid
, void **ppv
)
291 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
292 return IHTMLElement_QueryInterface(HTMLELEM(This
), riid
, ppv
);
295 static ULONG WINAPI
HTMLElement2_AddRef(IHTMLElement2
*iface
)
297 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
298 return IHTMLElement_AddRef(HTMLELEM(This
));
301 static ULONG WINAPI
HTMLElement2_Release(IHTMLElement2
*iface
)
303 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
304 return IHTMLElement_Release(HTMLELEM(This
));
307 static HRESULT WINAPI
HTMLElement2_GetTypeInfoCount(IHTMLElement2
*iface
, UINT
*pctinfo
)
309 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
310 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This
->node
.dispex
), pctinfo
);
313 static HRESULT WINAPI
HTMLElement2_GetTypeInfo(IHTMLElement2
*iface
, UINT iTInfo
,
314 LCID lcid
, ITypeInfo
**ppTInfo
)
316 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
317 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This
->node
.dispex
), iTInfo
, lcid
, ppTInfo
);
320 static HRESULT WINAPI
HTMLElement2_GetIDsOfNames(IHTMLElement2
*iface
, REFIID riid
,
321 LPOLESTR
*rgszNames
, UINT cNames
,
322 LCID lcid
, DISPID
*rgDispId
)
324 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
325 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This
->node
.dispex
), riid
, rgszNames
, cNames
, lcid
, rgDispId
);
328 static HRESULT WINAPI
HTMLElement2_Invoke(IHTMLElement2
*iface
, DISPID dispIdMember
,
329 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
330 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
332 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
333 return IDispatchEx_Invoke(DISPATCHEX(&This
->node
.dispex
), dispIdMember
, riid
, lcid
,
334 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
337 static HRESULT WINAPI
HTMLElement2_get_scopeName(IHTMLElement2
*iface
, BSTR
*p
)
339 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
340 FIXME("(%p)->(%p)\n", This
, p
);
344 static HRESULT WINAPI
HTMLElement2_setCapture(IHTMLElement2
*iface
, VARIANT_BOOL containerCapture
)
346 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
347 FIXME("(%p)->(%x)\n", This
, containerCapture
);
351 static HRESULT WINAPI
HTMLElement2_releaseCapture(IHTMLElement2
*iface
)
353 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
354 FIXME("(%p)\n", This
);
358 static HRESULT WINAPI
HTMLElement2_put_onlosecapture(IHTMLElement2
*iface
, VARIANT v
)
360 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
361 FIXME("(%p)->()\n", This
);
365 static HRESULT WINAPI
HTMLElement2_get_onlosecapture(IHTMLElement2
*iface
, VARIANT
*p
)
367 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
368 FIXME("(%p)->(%p)\n", This
, p
);
372 static HRESULT WINAPI
HTMLElement2_componentFromPoint(IHTMLElement2
*iface
,
373 LONG x
, LONG y
, BSTR
*component
)
375 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
376 FIXME("(%p)->(%d %d %p)\n", This
, x
, y
, component
);
380 static HRESULT WINAPI
HTMLElement2_doScroll(IHTMLElement2
*iface
, VARIANT component
)
382 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
384 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&component
));
386 if(!This
->node
.doc
->content_ready
387 || !This
->node
.doc
->basedoc
.doc_obj
->in_place_active
)
394 static HRESULT WINAPI
HTMLElement2_put_onscroll(IHTMLElement2
*iface
, VARIANT v
)
396 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
397 FIXME("(%p)->()\n", This
);
401 static HRESULT WINAPI
HTMLElement2_get_onscroll(IHTMLElement2
*iface
, VARIANT
*p
)
403 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
404 FIXME("(%p)->(%p)\n", This
, p
);
408 static HRESULT WINAPI
HTMLElement2_put_ondrag(IHTMLElement2
*iface
, VARIANT v
)
410 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
412 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
414 return set_node_event(&This
->node
, EVENTID_DRAG
, &v
);
417 static HRESULT WINAPI
HTMLElement2_get_ondrag(IHTMLElement2
*iface
, VARIANT
*p
)
419 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
421 TRACE("(%p)->(%p)\n", This
, p
);
423 return get_node_event(&This
->node
, EVENTID_DRAG
, p
);
426 static HRESULT WINAPI
HTMLElement2_put_ondragend(IHTMLElement2
*iface
, VARIANT v
)
428 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
429 FIXME("(%p)->()\n", This
);
433 static HRESULT WINAPI
HTMLElement2_get_ondragend(IHTMLElement2
*iface
, VARIANT
*p
)
435 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
436 FIXME("(%p)->(%p)\n", This
, p
);
440 static HRESULT WINAPI
HTMLElement2_put_ondragenter(IHTMLElement2
*iface
, VARIANT v
)
442 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
443 FIXME("(%p)->()\n", This
);
447 static HRESULT WINAPI
HTMLElement2_get_ondragenter(IHTMLElement2
*iface
, VARIANT
*p
)
449 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
450 FIXME("(%p)->(%p)\n", This
, p
);
454 static HRESULT WINAPI
HTMLElement2_put_ondragover(IHTMLElement2
*iface
, VARIANT v
)
456 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
457 FIXME("(%p)->()\n", This
);
461 static HRESULT WINAPI
HTMLElement2_get_ondragover(IHTMLElement2
*iface
, VARIANT
*p
)
463 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
464 FIXME("(%p)->(%p)\n", This
, p
);
468 static HRESULT WINAPI
HTMLElement2_put_ondragleave(IHTMLElement2
*iface
, VARIANT v
)
470 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
471 FIXME("(%p)->()\n", This
);
475 static HRESULT WINAPI
HTMLElement2_get_ondragleave(IHTMLElement2
*iface
, VARIANT
*p
)
477 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
478 FIXME("(%p)->(%p)\n", This
, p
);
482 static HRESULT WINAPI
HTMLElement2_put_ondrop(IHTMLElement2
*iface
, VARIANT v
)
484 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
485 FIXME("(%p)->()\n", This
);
489 static HRESULT WINAPI
HTMLElement2_get_ondrop(IHTMLElement2
*iface
, VARIANT
*p
)
491 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
492 FIXME("(%p)->(%p)\n", This
, p
);
496 static HRESULT WINAPI
HTMLElement2_put_onbeforecut(IHTMLElement2
*iface
, VARIANT v
)
498 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
499 FIXME("(%p)->()\n", This
);
503 static HRESULT WINAPI
HTMLElement2_get_onbeforecut(IHTMLElement2
*iface
, VARIANT
*p
)
505 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
506 FIXME("(%p)->(%p)\n", This
, p
);
510 static HRESULT WINAPI
HTMLElement2_put_oncut(IHTMLElement2
*iface
, VARIANT v
)
512 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
513 FIXME("(%p)->()\n", This
);
517 static HRESULT WINAPI
HTMLElement2_get_oncut(IHTMLElement2
*iface
, VARIANT
*p
)
519 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
520 FIXME("(%p)->(%p)\n", This
, p
);
524 static HRESULT WINAPI
HTMLElement2_put_onbeforecopy(IHTMLElement2
*iface
, VARIANT v
)
526 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
527 FIXME("(%p)->()\n", This
);
531 static HRESULT WINAPI
HTMLElement2_get_onbeforecopy(IHTMLElement2
*iface
, VARIANT
*p
)
533 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
534 FIXME("(%p)->(%p)\n", This
, p
);
538 static HRESULT WINAPI
HTMLElement2_put_oncopy(IHTMLElement2
*iface
, VARIANT v
)
540 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
541 FIXME("(%p)->()\n", This
);
545 static HRESULT WINAPI
HTMLElement2_get_oncopy(IHTMLElement2
*iface
, VARIANT
*p
)
547 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
548 FIXME("(%p)->(%p)\n", This
, p
);
552 static HRESULT WINAPI
HTMLElement2_put_onbeforepaste(IHTMLElement2
*iface
, VARIANT v
)
554 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
555 FIXME("(%p)->()\n", This
);
559 static HRESULT WINAPI
HTMLElement2_get_onbeforepaste(IHTMLElement2
*iface
, VARIANT
*p
)
561 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
562 FIXME("(%p)->(%p)\n", This
, p
);
566 static HRESULT WINAPI
HTMLElement2_put_onpaste(IHTMLElement2
*iface
, VARIANT v
)
568 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
570 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
572 return set_node_event(&This
->node
, EVENTID_PASTE
, &v
);
575 static HRESULT WINAPI
HTMLElement2_get_onpaste(IHTMLElement2
*iface
, VARIANT
*p
)
577 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
579 TRACE("(%p)->(%p)\n", This
, p
);
581 return get_node_event(&This
->node
, EVENTID_PASTE
, p
);
584 static HRESULT WINAPI
HTMLElement2_get_currentStyle(IHTMLElement2
*iface
, IHTMLCurrentStyle
**p
)
586 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
588 TRACE("(%p)->(%p)\n", This
, p
);
590 return HTMLCurrentStyle_Create(This
, p
);
593 static HRESULT WINAPI
HTMLElement2_put_onpropertychange(IHTMLElement2
*iface
, VARIANT v
)
595 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
596 FIXME("(%p)->()\n", This
);
600 static HRESULT WINAPI
HTMLElement2_get_onpropertychange(IHTMLElement2
*iface
, VARIANT
*p
)
602 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
603 FIXME("(%p)->(%p)\n", This
, p
);
607 static HRESULT WINAPI
HTMLElement2_getClientRects(IHTMLElement2
*iface
, IHTMLRectCollection
**pRectCol
)
609 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
610 FIXME("(%p)->(%p)\n", This
, pRectCol
);
614 static HRESULT WINAPI
HTMLElement2_getBoundingClientRect(IHTMLElement2
*iface
, IHTMLRect
**pRect
)
616 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
617 nsIDOMNSElement
*nselem
;
618 nsIDOMClientRect
*nsrect
;
622 TRACE("(%p)->(%p)\n", This
, pRect
);
624 nsres
= nsIDOMHTMLElement_QueryInterface(This
->node
.nsnode
, &IID_nsIDOMNSElement
,
626 if(NS_FAILED(nsres
)) {
627 ERR("Could not get nsIDOMNSElement iface: %08x\n", nsres
);
631 nsres
= nsIDOMNSElement_GetBoundingClientRect(nselem
, &nsrect
);
632 nsIDOMNSElement_Release(nselem
);
633 if(NS_FAILED(nsres
) || !nsrect
) {
634 ERR("GetBoindingClientRect failed: %08x\n", nsres
);
638 hres
= create_html_rect(nsrect
, pRect
);
640 nsIDOMClientRect_Release(nsrect
);
644 static HRESULT WINAPI
HTMLElement2_setExpression(IHTMLElement2
*iface
, BSTR propname
,
645 BSTR expression
, BSTR language
)
647 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
648 FIXME("(%p)->(%s %s %s)\n", This
, debugstr_w(propname
), debugstr_w(expression
),
649 debugstr_w(language
));
653 static HRESULT WINAPI
HTMLElement2_getExpression(IHTMLElement2
*iface
, BSTR propname
,
656 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
657 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(propname
), expression
);
661 static HRESULT WINAPI
HTMLElement2_removeExpression(IHTMLElement2
*iface
, BSTR propname
,
662 VARIANT_BOOL
*pfSuccess
)
664 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
665 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(propname
), pfSuccess
);
669 static HRESULT WINAPI
HTMLElement2_put_tabIndex(IHTMLElement2
*iface
, short v
)
671 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
672 nsIDOMNSHTMLElement
*nselem
;
675 TRACE("(%p)->(%d)\n", This
, v
);
677 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
678 if(NS_FAILED(nsres
)) {
679 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres
);
683 nsres
= nsIDOMNSHTMLElement_SetTabIndex(nselem
, v
);
684 nsIDOMNSHTMLElement_Release(nselem
);
686 ERR("GetTabIndex failed: %08x\n", nsres
);
691 static HRESULT WINAPI
HTMLElement2_get_tabIndex(IHTMLElement2
*iface
, short *p
)
693 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
694 nsIDOMNSHTMLElement
*nselem
;
698 TRACE("(%p)->(%p)\n", This
, p
);
700 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
701 if(NS_FAILED(nsres
)) {
702 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres
);
706 nsres
= nsIDOMNSHTMLElement_GetTabIndex(nselem
, &index
);
707 nsIDOMNSHTMLElement_Release(nselem
);
708 if(NS_FAILED(nsres
)) {
709 ERR("GetTabIndex failed: %08x\n", nsres
);
717 static HRESULT WINAPI
HTMLElement2_focus(IHTMLElement2
*iface
)
719 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
720 nsIDOMNSHTMLElement
*nselem
;
723 TRACE("(%p)\n", This
);
725 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
726 if(NS_SUCCEEDED(nsres
)) {
727 nsIDOMNSHTMLElement_Focus(nselem
);
728 nsIDOMNSHTMLElement_Release(nselem
);
730 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres
);
736 static HRESULT WINAPI
HTMLElement2_put_accessKey(IHTMLElement2
*iface
, BSTR v
)
738 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
741 static WCHAR accessKeyW
[] = {'a','c','c','e','s','s','K','e','y',0};
743 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
745 V_VT(&var
) = VT_BSTR
;
747 return IHTMLElement_setAttribute(HTMLELEM(This
), accessKeyW
, var
, 0);
750 static HRESULT WINAPI
HTMLElement2_get_accessKey(IHTMLElement2
*iface
, BSTR
*p
)
752 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
753 FIXME("(%p)->(%p)\n", This
, p
);
757 static HRESULT WINAPI
HTMLElement2_put_onblur(IHTMLElement2
*iface
, VARIANT v
)
759 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
761 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
763 return set_node_event(&This
->node
, EVENTID_BLUR
, &v
);
766 static HRESULT WINAPI
HTMLElement2_get_onblur(IHTMLElement2
*iface
, VARIANT
*p
)
768 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
770 TRACE("(%p)->(%p)\n", This
, p
);
772 return get_node_event(&This
->node
, EVENTID_BLUR
, p
);
775 static HRESULT WINAPI
HTMLElement2_put_onfocus(IHTMLElement2
*iface
, VARIANT v
)
777 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
779 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
781 return set_node_event(&This
->node
, EVENTID_FOCUS
, &v
);
784 static HRESULT WINAPI
HTMLElement2_get_onfocus(IHTMLElement2
*iface
, VARIANT
*p
)
786 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
788 TRACE("(%p)->(%p)\n", This
, p
);
790 return get_node_event(&This
->node
, EVENTID_FOCUS
, p
);
793 static HRESULT WINAPI
HTMLElement2_put_onresize(IHTMLElement2
*iface
, VARIANT v
)
795 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
796 FIXME("(%p)->()\n", This
);
800 static HRESULT WINAPI
HTMLElement2_get_onresize(IHTMLElement2
*iface
, VARIANT
*p
)
802 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
803 FIXME("(%p)->(%p)\n", This
, p
);
807 static HRESULT WINAPI
HTMLElement2_blur(IHTMLElement2
*iface
)
809 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
810 FIXME("(%p)\n", This
);
814 static HRESULT WINAPI
HTMLElement2_addFilter(IHTMLElement2
*iface
, IUnknown
*pUnk
)
816 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
817 FIXME("(%p)->(%p)\n", This
, pUnk
);
821 static HRESULT WINAPI
HTMLElement2_removeFilter(IHTMLElement2
*iface
, IUnknown
*pUnk
)
823 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
824 FIXME("(%p)->(%p)\n", This
, pUnk
);
828 static HRESULT WINAPI
HTMLElement2_get_clientHeight(IHTMLElement2
*iface
, LONG
*p
)
830 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
831 nsIDOMNSElement
*nselem
;
835 TRACE("(%p)->(%p)\n", This
, p
);
837 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSElement
, (void**)&nselem
);
838 if(NS_SUCCEEDED(nsres
)) {
839 nsIDOMNSElement_GetClientHeight(nselem
, &height
);
840 nsIDOMNSElement_Release(nselem
);
842 ERR("Could not get nsIDOMNSElement: %08x\n", nsres
);
849 static HRESULT WINAPI
HTMLElement2_get_clientWidth(IHTMLElement2
*iface
, LONG
*p
)
851 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
852 nsIDOMNSElement
*nselem
;
856 TRACE("(%p)->(%p)\n", This
, p
);
858 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSElement
, (void**)&nselem
);
859 if(NS_SUCCEEDED(nsres
)) {
860 nsIDOMNSElement_GetClientWidth(nselem
, &width
);
861 nsIDOMNSElement_Release(nselem
);
863 ERR("Could not get nsIDOMNSElement: %08x\n", nsres
);
870 static HRESULT WINAPI
HTMLElement2_get_clientTop(IHTMLElement2
*iface
, LONG
*p
)
872 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
873 nsIDOMNSElement
*nselem
;
874 PRInt32 client_top
= 0;
877 TRACE("(%p)->(%p)\n", This
, p
);
879 nsres
= nsIDOMElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSElement
, (void**)&nselem
);
880 if(NS_SUCCEEDED(nsres
)) {
881 nsres
= nsIDOMNSElement_GetClientTop(nselem
, &client_top
);
882 nsIDOMNSElement_Release(nselem
);
884 ERR("GetScrollHeight failed: %08x\n", nsres
);
886 ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres
);
890 TRACE("*p = %d\n", *p
);
894 static HRESULT WINAPI
HTMLElement2_get_clientLeft(IHTMLElement2
*iface
, LONG
*p
)
896 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
897 nsIDOMNSElement
*nselem
;
898 PRInt32 client_left
= 0;
901 TRACE("(%p)->(%p)\n", This
, p
);
903 nsres
= nsIDOMElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSElement
, (void**)&nselem
);
904 if(NS_SUCCEEDED(nsres
)) {
905 nsres
= nsIDOMNSElement_GetClientLeft(nselem
, &client_left
);
906 nsIDOMNSElement_Release(nselem
);
908 ERR("GetScrollHeight failed: %08x\n", nsres
);
910 ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres
);
914 TRACE("*p = %d\n", *p
);
918 static HRESULT WINAPI
HTMLElement2_attachEvent(IHTMLElement2
*iface
, BSTR event
,
919 IDispatch
*pDisp
, VARIANT_BOOL
*pfResult
)
921 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
923 TRACE("(%p)->(%s %p %p)\n", This
, debugstr_w(event
), pDisp
, pfResult
);
925 return attach_event(get_node_event_target(&This
->node
), This
->node
.nsnode
, &This
->node
.doc
->basedoc
, event
, pDisp
, pfResult
);
928 static HRESULT WINAPI
HTMLElement2_detachEvent(IHTMLElement2
*iface
, BSTR event
, IDispatch
*pDisp
)
930 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
932 TRACE("(%p)->(%s %p)\n", This
, debugstr_w(event
), pDisp
);
934 return detach_event(*get_node_event_target(&This
->node
), &This
->node
.doc
->basedoc
, event
, pDisp
);
937 static HRESULT WINAPI
HTMLElement2_get_readyState(IHTMLElement2
*iface
, VARIANT
*p
)
939 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
942 TRACE("(%p)->(%p)\n", This
, p
);
944 if(This
->node
.vtbl
->get_readystate
) {
947 hres
= This
->node
.vtbl
->get_readystate(&This
->node
, &str
);
951 static const WCHAR completeW
[] = {'c','o','m','p','l','e','t','e',0};
953 str
= SysAllocString(completeW
);
955 return E_OUTOFMEMORY
;
963 static HRESULT WINAPI
HTMLElement2_put_onreadystatechange(IHTMLElement2
*iface
, VARIANT v
)
965 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
967 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
969 return set_node_event(&This
->node
, EVENTID_READYSTATECHANGE
, &v
);
972 static HRESULT WINAPI
HTMLElement2_get_onreadystatechange(IHTMLElement2
*iface
, VARIANT
*p
)
974 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
976 TRACE("(%p)->(%p)\n", This
, p
);
978 return get_node_event(&This
->node
, EVENTID_READYSTATECHANGE
, p
);
981 static HRESULT WINAPI
HTMLElement2_put_onrowsdelete(IHTMLElement2
*iface
, VARIANT v
)
983 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
984 FIXME("(%p)->()\n", This
);
988 static HRESULT WINAPI
HTMLElement2_get_onrowsdelete(IHTMLElement2
*iface
, VARIANT
*p
)
990 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
991 FIXME("(%p)->(%p)\n", This
, p
);
995 static HRESULT WINAPI
HTMLElement2_put_onrowsinserted(IHTMLElement2
*iface
, VARIANT v
)
997 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
998 FIXME("(%p)->()\n", This
);
1002 static HRESULT WINAPI
HTMLElement2_get_onrowsinserted(IHTMLElement2
*iface
, VARIANT
*p
)
1004 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1005 FIXME("(%p)->(%p)\n", This
, p
);
1009 static HRESULT WINAPI
HTMLElement2_put_oncellchange(IHTMLElement2
*iface
, VARIANT v
)
1011 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1012 FIXME("(%p)->()\n", This
);
1016 static HRESULT WINAPI
HTMLElement2_get_oncellchange(IHTMLElement2
*iface
, VARIANT
*p
)
1018 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1019 FIXME("(%p)->(%p)\n", This
, p
);
1023 static HRESULT WINAPI
HTMLElement2_put_dir(IHTMLElement2
*iface
, BSTR v
)
1025 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1026 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1030 static HRESULT WINAPI
HTMLElement2_get_dir(IHTMLElement2
*iface
, BSTR
*p
)
1032 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1034 TRACE("(%p)->(%p)\n", This
, p
);
1042 nsAString_Init(&dir_str
, NULL
);
1044 nsres
= nsIDOMHTMLElement_GetDir(This
->nselem
, &dir_str
);
1045 if(NS_SUCCEEDED(nsres
)) {
1046 const PRUnichar
*dir
;
1047 nsAString_GetData(&dir_str
, &dir
);
1049 *p
= SysAllocString(dir
);
1051 ERR("GetDir failed: %08x\n", nsres
);
1054 nsAString_Finish(&dir_str
);
1057 TRACE("ret %s\n", debugstr_w(*p
));
1061 static HRESULT WINAPI
HTMLElement2_createControlRange(IHTMLElement2
*iface
, IDispatch
**range
)
1063 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1064 FIXME("(%p)->(%p)\n", This
, range
);
1068 static HRESULT WINAPI
HTMLElement2_get_scrollHeight(IHTMLElement2
*iface
, LONG
*p
)
1070 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1071 nsIDOMNSElement
*nselem
;
1075 TRACE("(%p)->(%p)\n", This
, p
);
1077 nsres
= nsIDOMElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSElement
, (void**)&nselem
);
1078 if(NS_SUCCEEDED(nsres
)) {
1079 nsres
= nsIDOMNSElement_GetScrollHeight(nselem
, &height
);
1080 nsIDOMNSElement_Release(nselem
);
1081 if(NS_FAILED(nsres
))
1082 ERR("GetScrollHeight failed: %08x\n", nsres
);
1084 ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres
);
1088 TRACE("*p = %d\n", *p
);
1093 static HRESULT WINAPI
HTMLElement2_get_scrollWidth(IHTMLElement2
*iface
, LONG
*p
)
1095 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1096 nsIDOMNSElement
*nselem
;
1100 TRACE("(%p)->(%p)\n", This
, p
);
1102 nsres
= nsIDOMElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSElement
, (void**)&nselem
);
1103 if(NS_SUCCEEDED(nsres
)) {
1104 nsres
= nsIDOMNSElement_GetScrollWidth(nselem
, &width
);
1105 nsIDOMNSElement_Release(nselem
);
1106 if(NS_FAILED(nsres
))
1107 ERR("GetScrollWidth failed: %08x\n", nsres
);
1109 ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres
);
1113 TRACE("*p = %d\n", *p
);
1118 static HRESULT WINAPI
HTMLElement2_put_scrollTop(IHTMLElement2
*iface
, LONG v
)
1120 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1121 nsIDOMNSElement
*nselem
;
1124 TRACE("(%p)->(%d)\n", This
, v
);
1127 FIXME("NULL nselem\n");
1131 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSElement
, (void**)&nselem
);
1132 if(NS_SUCCEEDED(nsres
)) {
1133 nsIDOMNSElement_SetScrollTop(nselem
, v
);
1134 nsIDOMNSElement_Release(nselem
);
1136 ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres
);
1142 static HRESULT WINAPI
HTMLElement2_get_scrollTop(IHTMLElement2
*iface
, LONG
*p
)
1144 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1145 nsIDOMNSElement
*nselem
;
1149 TRACE("(%p)->(%p)\n", This
, p
);
1151 nsres
= nsIDOMElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSElement
, (void**)&nselem
);
1152 if(NS_SUCCEEDED(nsres
)) {
1153 nsres
= nsIDOMNSElement_GetScrollTop(nselem
, &top
);
1154 nsIDOMNSElement_Release(nselem
);
1155 if(NS_FAILED(nsres
))
1156 ERR("GetScrollTop failed: %08x\n", nsres
);
1158 ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres
);
1162 TRACE("*p = %d\n", *p
);
1167 static HRESULT WINAPI
HTMLElement2_put_scrollLeft(IHTMLElement2
*iface
, LONG v
)
1169 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1170 nsIDOMNSElement
*nselem
;
1173 TRACE("(%p)->(%d)\n", This
, v
);
1176 FIXME("NULL nselem\n");
1180 nsres
= nsIDOMElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSElement
, (void**)&nselem
);
1181 if(NS_SUCCEEDED(nsres
)) {
1182 nsIDOMNSElement_SetScrollLeft(nselem
, v
);
1183 nsIDOMNSElement_Release(nselem
);
1185 ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres
);
1191 static HRESULT WINAPI
HTMLElement2_get_scrollLeft(IHTMLElement2
*iface
, LONG
*p
)
1193 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1194 nsIDOMNSElement
*nselem
;
1198 TRACE("(%p)->(%p)\n", This
, p
);
1201 return E_INVALIDARG
;
1205 FIXME("NULL nselem\n");
1209 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSElement
, (void**)&nselem
);
1210 if(NS_SUCCEEDED(nsres
))
1212 nsres
= nsIDOMNSElement_GetScrollLeft(nselem
, &left
);
1213 nsIDOMNSElement_Release(nselem
);
1214 if(NS_FAILED(nsres
))
1219 TRACE("*p = %d\n", *p
);
1224 static HRESULT WINAPI
HTMLElement2_clearAttributes(IHTMLElement2
*iface
)
1226 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1227 FIXME("(%p)\n", This
);
1231 static HRESULT WINAPI
HTMLElement2_mergeAttributes(IHTMLElement2
*iface
, IHTMLElement
*mergeThis
)
1233 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1234 FIXME("(%p)->(%p)\n", This
, mergeThis
);
1238 static HRESULT WINAPI
HTMLElement2_put_oncontextmenu(IHTMLElement2
*iface
, VARIANT v
)
1240 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1241 FIXME("(%p)->()\n", This
);
1245 static HRESULT WINAPI
HTMLElement2_get_oncontextmenu(IHTMLElement2
*iface
, VARIANT
*p
)
1247 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1248 FIXME("(%p)->(%p)\n", This
, p
);
1252 static HRESULT WINAPI
HTMLElement2_insertAdjecentElement(IHTMLElement2
*iface
, BSTR where
,
1253 IHTMLElement
*insertedElement
, IHTMLElement
**inserted
)
1255 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1256 FIXME("(%p)->(%s %p %p)\n", This
, debugstr_w(where
), insertedElement
, inserted
);
1260 static HRESULT WINAPI
HTMLElement2_applyElement(IHTMLElement2
*iface
, IHTMLElement
*apply
,
1261 BSTR where
, IHTMLElement
**applied
)
1263 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1264 FIXME("(%p)->(%p %s %p)\n", This
, apply
, debugstr_w(where
), applied
);
1268 static HRESULT WINAPI
HTMLElement2_getAdjecentText(IHTMLElement2
*iface
, BSTR where
, BSTR
*text
)
1270 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1271 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(where
), text
);
1275 static HRESULT WINAPI
HTMLElement2_replaceAdjecentText(IHTMLElement2
*iface
, BSTR where
,
1276 BSTR newText
, BSTR
*oldText
)
1278 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1279 FIXME("(%p)->(%s %s %p)\n", This
, debugstr_w(where
), debugstr_w(newText
), oldText
);
1283 static HRESULT WINAPI
HTMLElement2_get_canHandleChildren(IHTMLElement2
*iface
, VARIANT_BOOL
*p
)
1285 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1286 FIXME("(%p)->(%p)\n", This
, p
);
1290 static HRESULT WINAPI
HTMLElement2_addBehavior(IHTMLElement2
*iface
, BSTR bstrUrl
,
1291 VARIANT
*pvarFactory
, LONG
*pCookie
)
1293 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1294 FIXME("(%p)->(%s %p %p)\n", This
, debugstr_w(bstrUrl
), pvarFactory
, pCookie
);
1298 static HRESULT WINAPI
HTMLElement2_removeBehavior(IHTMLElement2
*iface
, LONG cookie
,
1299 VARIANT_BOOL
*pfResult
)
1301 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1302 FIXME("(%p)->(%d %p)\n", This
, cookie
, pfResult
);
1306 static HRESULT WINAPI
HTMLElement2_get_runtimeStyle(IHTMLElement2
*iface
, IHTMLStyle
**p
)
1308 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1309 FIXME("(%p)->(%p)\n", This
, p
);
1313 static HRESULT WINAPI
HTMLElement2_get_behaviorUrns(IHTMLElement2
*iface
, IDispatch
**p
)
1315 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1316 FIXME("(%p)->(%p)\n", This
, p
);
1320 static HRESULT WINAPI
HTMLElement2_put_tagUrn(IHTMLElement2
*iface
, BSTR v
)
1322 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1323 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1327 static HRESULT WINAPI
HTMLElement2_get_tagUrn(IHTMLElement2
*iface
, BSTR
*p
)
1329 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1330 FIXME("(%p)->(%p)\n", This
, p
);
1334 static HRESULT WINAPI
HTMLElement2_put_onbeforeeditfocus(IHTMLElement2
*iface
, VARIANT vv
)
1336 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1337 FIXME("(%p)->()\n", This
);
1341 static HRESULT WINAPI
HTMLElement2_get_onbeforeeditfocus(IHTMLElement2
*iface
, VARIANT
*p
)
1343 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1344 FIXME("(%p)->(%p)\n", This
, p
);
1348 static HRESULT WINAPI
HTMLElement2_get_readyStateValue(IHTMLElement2
*iface
, LONG
*p
)
1350 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1351 FIXME("(%p)->(%p)\n", This
, p
);
1355 static HRESULT WINAPI
HTMLElement2_getElementsByTagName(IHTMLElement2
*iface
, BSTR v
,
1356 IHTMLElementCollection
**pelColl
)
1358 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
1359 nsIDOMNodeList
*nslist
;
1363 TRACE("(%p)->(%s %p)\n", This
, debugstr_w(v
), pelColl
);
1365 nsAString_InitDepend(&tag_str
, v
);
1366 nsres
= nsIDOMHTMLElement_GetElementsByTagName(This
->nselem
, &tag_str
, &nslist
);
1367 nsAString_Finish(&tag_str
);
1368 if(NS_FAILED(nsres
)) {
1369 ERR("GetElementByTagName failed: %08x\n", nsres
);
1373 *pelColl
= create_collection_from_nodelist(This
->node
.doc
, (IUnknown
*)HTMLELEM(This
), nslist
);
1374 nsIDOMNodeList_Release(nslist
);
1378 #undef HTMLELEM2_THIS
1380 static const IHTMLElement2Vtbl HTMLElement2Vtbl
= {
1381 HTMLElement2_QueryInterface
,
1382 HTMLElement2_AddRef
,
1383 HTMLElement2_Release
,
1384 HTMLElement2_GetTypeInfoCount
,
1385 HTMLElement2_GetTypeInfo
,
1386 HTMLElement2_GetIDsOfNames
,
1387 HTMLElement2_Invoke
,
1388 HTMLElement2_get_scopeName
,
1389 HTMLElement2_setCapture
,
1390 HTMLElement2_releaseCapture
,
1391 HTMLElement2_put_onlosecapture
,
1392 HTMLElement2_get_onlosecapture
,
1393 HTMLElement2_componentFromPoint
,
1394 HTMLElement2_doScroll
,
1395 HTMLElement2_put_onscroll
,
1396 HTMLElement2_get_onscroll
,
1397 HTMLElement2_put_ondrag
,
1398 HTMLElement2_get_ondrag
,
1399 HTMLElement2_put_ondragend
,
1400 HTMLElement2_get_ondragend
,
1401 HTMLElement2_put_ondragenter
,
1402 HTMLElement2_get_ondragenter
,
1403 HTMLElement2_put_ondragover
,
1404 HTMLElement2_get_ondragover
,
1405 HTMLElement2_put_ondragleave
,
1406 HTMLElement2_get_ondragleave
,
1407 HTMLElement2_put_ondrop
,
1408 HTMLElement2_get_ondrop
,
1409 HTMLElement2_put_onbeforecut
,
1410 HTMLElement2_get_onbeforecut
,
1411 HTMLElement2_put_oncut
,
1412 HTMLElement2_get_oncut
,
1413 HTMLElement2_put_onbeforecopy
,
1414 HTMLElement2_get_onbeforecopy
,
1415 HTMLElement2_put_oncopy
,
1416 HTMLElement2_get_oncopy
,
1417 HTMLElement2_put_onbeforepaste
,
1418 HTMLElement2_get_onbeforepaste
,
1419 HTMLElement2_put_onpaste
,
1420 HTMLElement2_get_onpaste
,
1421 HTMLElement2_get_currentStyle
,
1422 HTMLElement2_put_onpropertychange
,
1423 HTMLElement2_get_onpropertychange
,
1424 HTMLElement2_getClientRects
,
1425 HTMLElement2_getBoundingClientRect
,
1426 HTMLElement2_setExpression
,
1427 HTMLElement2_getExpression
,
1428 HTMLElement2_removeExpression
,
1429 HTMLElement2_put_tabIndex
,
1430 HTMLElement2_get_tabIndex
,
1432 HTMLElement2_put_accessKey
,
1433 HTMLElement2_get_accessKey
,
1434 HTMLElement2_put_onblur
,
1435 HTMLElement2_get_onblur
,
1436 HTMLElement2_put_onfocus
,
1437 HTMLElement2_get_onfocus
,
1438 HTMLElement2_put_onresize
,
1439 HTMLElement2_get_onresize
,
1441 HTMLElement2_addFilter
,
1442 HTMLElement2_removeFilter
,
1443 HTMLElement2_get_clientHeight
,
1444 HTMLElement2_get_clientWidth
,
1445 HTMLElement2_get_clientTop
,
1446 HTMLElement2_get_clientLeft
,
1447 HTMLElement2_attachEvent
,
1448 HTMLElement2_detachEvent
,
1449 HTMLElement2_get_readyState
,
1450 HTMLElement2_put_onreadystatechange
,
1451 HTMLElement2_get_onreadystatechange
,
1452 HTMLElement2_put_onrowsdelete
,
1453 HTMLElement2_get_onrowsdelete
,
1454 HTMLElement2_put_onrowsinserted
,
1455 HTMLElement2_get_onrowsinserted
,
1456 HTMLElement2_put_oncellchange
,
1457 HTMLElement2_get_oncellchange
,
1458 HTMLElement2_put_dir
,
1459 HTMLElement2_get_dir
,
1460 HTMLElement2_createControlRange
,
1461 HTMLElement2_get_scrollHeight
,
1462 HTMLElement2_get_scrollWidth
,
1463 HTMLElement2_put_scrollTop
,
1464 HTMLElement2_get_scrollTop
,
1465 HTMLElement2_put_scrollLeft
,
1466 HTMLElement2_get_scrollLeft
,
1467 HTMLElement2_clearAttributes
,
1468 HTMLElement2_mergeAttributes
,
1469 HTMLElement2_put_oncontextmenu
,
1470 HTMLElement2_get_oncontextmenu
,
1471 HTMLElement2_insertAdjecentElement
,
1472 HTMLElement2_applyElement
,
1473 HTMLElement2_getAdjecentText
,
1474 HTMLElement2_replaceAdjecentText
,
1475 HTMLElement2_get_canHandleChildren
,
1476 HTMLElement2_addBehavior
,
1477 HTMLElement2_removeBehavior
,
1478 HTMLElement2_get_runtimeStyle
,
1479 HTMLElement2_get_behaviorUrns
,
1480 HTMLElement2_put_tagUrn
,
1481 HTMLElement2_get_tagUrn
,
1482 HTMLElement2_put_onbeforeeditfocus
,
1483 HTMLElement2_get_onbeforeeditfocus
,
1484 HTMLElement2_get_readyStateValue
,
1485 HTMLElement2_getElementsByTagName
,
1488 void HTMLElement2_Init(HTMLElement
*This
)
1490 This
->lpHTMLElement2Vtbl
= &HTMLElement2Vtbl
;