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
28 #include "wine/debug.h"
29 #include "wine/unicode.h"
31 #include "mshtml_private.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(mshtml
);
35 #define HTMLELEM2_THIS(iface) DEFINE_THIS(HTMLElement, HTMLElement2, iface)
37 static HRESULT WINAPI
HTMLElement2_QueryInterface(IHTMLElement2
*iface
,
38 REFIID riid
, void **ppv
)
40 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
41 return IHTMLElement_QueryInterface(HTMLELEM(This
), riid
, ppv
);
44 static ULONG WINAPI
HTMLElement2_AddRef(IHTMLElement2
*iface
)
46 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
47 return IHTMLElement_AddRef(HTMLELEM(This
));
50 static ULONG WINAPI
HTMLElement2_Release(IHTMLElement2
*iface
)
52 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
53 return IHTMLElement_Release(HTMLELEM(This
));
56 static HRESULT WINAPI
HTMLElement2_GetTypeInfoCount(IHTMLElement2
*iface
, UINT
*pctinfo
)
58 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
59 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This
->node
.dispex
), pctinfo
);
62 static HRESULT WINAPI
HTMLElement2_GetTypeInfo(IHTMLElement2
*iface
, UINT iTInfo
,
63 LCID lcid
, ITypeInfo
**ppTInfo
)
65 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
66 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This
->node
.dispex
), iTInfo
, lcid
, ppTInfo
);
69 static HRESULT WINAPI
HTMLElement2_GetIDsOfNames(IHTMLElement2
*iface
, REFIID riid
,
70 LPOLESTR
*rgszNames
, UINT cNames
,
71 LCID lcid
, DISPID
*rgDispId
)
73 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
74 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This
->node
.dispex
), riid
, rgszNames
, cNames
, lcid
, rgDispId
);
77 static HRESULT WINAPI
HTMLElement2_Invoke(IHTMLElement2
*iface
, DISPID dispIdMember
,
78 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
79 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
81 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
82 return IDispatchEx_Invoke(DISPATCHEX(&This
->node
.dispex
), dispIdMember
, riid
, lcid
,
83 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
86 static HRESULT WINAPI
HTMLElement2_get_scopeName(IHTMLElement2
*iface
, BSTR
*p
)
88 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
89 FIXME("(%p)->(%p)\n", This
, p
);
93 static HRESULT WINAPI
HTMLElement2_setCapture(IHTMLElement2
*iface
, VARIANT_BOOL containerCapture
)
95 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
96 FIXME("(%p)->(%x)\n", This
, containerCapture
);
100 static HRESULT WINAPI
HTMLElement2_releaseCapture(IHTMLElement2
*iface
)
102 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
103 FIXME("(%p)\n", This
);
107 static HRESULT WINAPI
HTMLElement2_put_onlosecapture(IHTMLElement2
*iface
, VARIANT v
)
109 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
110 FIXME("(%p)->()\n", This
);
114 static HRESULT WINAPI
HTMLElement2_get_onlosecapture(IHTMLElement2
*iface
, VARIANT
*p
)
116 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
117 FIXME("(%p)->(%p)\n", This
, p
);
121 static HRESULT WINAPI
HTMLElement2_componentFromPoint(IHTMLElement2
*iface
,
122 long x
, long y
, BSTR
*component
)
124 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
125 FIXME("(%p)->(%ld %ld %p)\n", This
, x
, y
, component
);
129 static HRESULT WINAPI
HTMLElement2_doScroll(IHTMLElement2
*iface
, VARIANT component
)
131 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
132 FIXME("(%p)->()\n", This
);
136 static HRESULT WINAPI
HTMLElement2_put_onscroll(IHTMLElement2
*iface
, VARIANT v
)
138 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
139 FIXME("(%p)->()\n", This
);
143 static HRESULT WINAPI
HTMLElement2_get_onscroll(IHTMLElement2
*iface
, VARIANT
*p
)
145 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
146 FIXME("(%p)->(%p)\n", This
, p
);
150 static HRESULT WINAPI
HTMLElement2_put_ondrag(IHTMLElement2
*iface
, VARIANT v
)
152 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
153 FIXME("(%p)->()\n", This
);
157 static HRESULT WINAPI
HTMLElement2_get_ondrag(IHTMLElement2
*iface
, VARIANT
*p
)
159 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
160 FIXME("(%p)->(%p)\n", This
, p
);
164 static HRESULT WINAPI
HTMLElement2_put_ondragend(IHTMLElement2
*iface
, VARIANT v
)
166 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
167 FIXME("(%p)->()\n", This
);
171 static HRESULT WINAPI
HTMLElement2_get_ondragend(IHTMLElement2
*iface
, VARIANT
*p
)
173 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
174 FIXME("(%p)->(%p)\n", This
, p
);
178 static HRESULT WINAPI
HTMLElement2_put_ondragenter(IHTMLElement2
*iface
, VARIANT v
)
180 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
181 FIXME("(%p)->()\n", This
);
185 static HRESULT WINAPI
HTMLElement2_get_ondragenter(IHTMLElement2
*iface
, VARIANT
*p
)
187 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
188 FIXME("(%p)->(%p)\n", This
, p
);
192 static HRESULT WINAPI
HTMLElement2_put_ondragover(IHTMLElement2
*iface
, VARIANT v
)
194 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
195 FIXME("(%p)->()\n", This
);
199 static HRESULT WINAPI
HTMLElement2_get_ondragover(IHTMLElement2
*iface
, VARIANT
*p
)
201 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
202 FIXME("(%p)->(%p)\n", This
, p
);
206 static HRESULT WINAPI
HTMLElement2_put_ondragleave(IHTMLElement2
*iface
, VARIANT v
)
208 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
209 FIXME("(%p)->()\n", This
);
213 static HRESULT WINAPI
HTMLElement2_get_ondragleave(IHTMLElement2
*iface
, VARIANT
*p
)
215 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
216 FIXME("(%p)->(%p)\n", This
, p
);
220 static HRESULT WINAPI
HTMLElement2_put_ondrop(IHTMLElement2
*iface
, VARIANT v
)
222 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
223 FIXME("(%p)->()\n", This
);
227 static HRESULT WINAPI
HTMLElement2_get_ondrop(IHTMLElement2
*iface
, VARIANT
*p
)
229 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
230 FIXME("(%p)->(%p)\n", This
, p
);
234 static HRESULT WINAPI
HTMLElement2_put_onbeforecut(IHTMLElement2
*iface
, VARIANT v
)
236 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
237 FIXME("(%p)->()\n", This
);
241 static HRESULT WINAPI
HTMLElement2_get_onbeforecut(IHTMLElement2
*iface
, VARIANT
*p
)
243 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
244 FIXME("(%p)->(%p)\n", This
, p
);
248 static HRESULT WINAPI
HTMLElement2_put_oncut(IHTMLElement2
*iface
, VARIANT v
)
250 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
251 FIXME("(%p)->()\n", This
);
255 static HRESULT WINAPI
HTMLElement2_get_oncut(IHTMLElement2
*iface
, VARIANT
*p
)
257 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
258 FIXME("(%p)->(%p)\n", This
, p
);
262 static HRESULT WINAPI
HTMLElement2_put_onbeforecopy(IHTMLElement2
*iface
, VARIANT v
)
264 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
265 FIXME("(%p)->()\n", This
);
269 static HRESULT WINAPI
HTMLElement2_get_onbeforecopy(IHTMLElement2
*iface
, VARIANT
*p
)
271 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
272 FIXME("(%p)->(%p)\n", This
, p
);
276 static HRESULT WINAPI
HTMLElement2_put_oncopy(IHTMLElement2
*iface
, VARIANT v
)
278 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
279 FIXME("(%p)->()\n", This
);
283 static HRESULT WINAPI
HTMLElement2_get_oncopy(IHTMLElement2
*iface
, VARIANT
*p
)
285 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
286 FIXME("(%p)->(%p)\n", This
, p
);
290 static HRESULT WINAPI
HTMLElement2_put_onbeforepaste(IHTMLElement2
*iface
, VARIANT v
)
292 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
293 FIXME("(%p)->()\n", This
);
297 static HRESULT WINAPI
HTMLElement2_get_onbeforepaste(IHTMLElement2
*iface
, VARIANT
*p
)
299 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
300 FIXME("(%p)->(%p)\n", This
, p
);
304 static HRESULT WINAPI
HTMLElement2_put_onpaste(IHTMLElement2
*iface
, VARIANT v
)
306 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
307 FIXME("(%p)->()\n", This
);
311 static HRESULT WINAPI
HTMLElement2_get_onpaste(IHTMLElement2
*iface
, VARIANT
*p
)
313 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
314 FIXME("(%p)->(%p)\n", This
, p
);
318 static HRESULT WINAPI
HTMLElement2_get_currentStyle(IHTMLElement2
*iface
, IHTMLCurrentStyle
**p
)
320 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
321 FIXME("(%p)->(%p)\n", This
, p
);
325 static HRESULT WINAPI
HTMLElement2_put_onpropertychange(IHTMLElement2
*iface
, VARIANT v
)
327 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
328 FIXME("(%p)->()\n", This
);
332 static HRESULT WINAPI
HTMLElement2_get_onpropertychange(IHTMLElement2
*iface
, VARIANT
*p
)
334 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
335 FIXME("(%p)->(%p)\n", This
, p
);
339 static HRESULT WINAPI
HTMLElement2_getClientRects(IHTMLElement2
*iface
, IHTMLRectCollection
**pRectCol
)
341 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
342 FIXME("(%p)->(%p)\n", This
, pRectCol
);
346 static HRESULT WINAPI
HTMLElement2_getBoundingClientRect(IHTMLElement2
*iface
, IHTMLRect
**pRect
)
348 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
349 FIXME("(%p)->(%p)\n", This
, pRect
);
353 static HRESULT WINAPI
HTMLElement2_setExpression(IHTMLElement2
*iface
, BSTR propname
,
354 BSTR expression
, BSTR language
)
356 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
357 FIXME("(%p)->(%s %s %s)\n", This
, debugstr_w(propname
), debugstr_w(expression
),
358 debugstr_w(language
));
362 static HRESULT WINAPI
HTMLElement2_getExpression(IHTMLElement2
*iface
, BSTR propname
,
365 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
366 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(propname
), expression
);
370 static HRESULT WINAPI
HTMLElement2_removeExpression(IHTMLElement2
*iface
, BSTR propname
,
371 VARIANT_BOOL
*pfSuccess
)
373 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
374 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(propname
), pfSuccess
);
378 static HRESULT WINAPI
HTMLElement2_put_tabIndex(IHTMLElement2
*iface
, short v
)
380 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
381 nsIDOMNSHTMLElement
*nselem
;
384 TRACE("(%p)->(%d)\n", This
, v
);
386 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
387 if(NS_FAILED(nsres
)) {
388 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres
);
392 nsres
= nsIDOMNSHTMLElement_SetTabIndex(nselem
, v
);
393 nsIDOMNSHTMLElement_Release(nselem
);
395 ERR("GetTabIndex failed: %08x\n", nsres
);
400 static HRESULT WINAPI
HTMLElement2_get_tabIndex(IHTMLElement2
*iface
, short *p
)
402 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
403 nsIDOMNSHTMLElement
*nselem
;
407 TRACE("(%p)->(%p)\n", This
, p
);
409 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
410 if(NS_FAILED(nsres
)) {
411 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres
);
415 nsres
= nsIDOMNSHTMLElement_GetTabIndex(nselem
, &index
);
416 nsIDOMNSHTMLElement_Release(nselem
);
417 if(NS_FAILED(nsres
)) {
418 ERR("GetTabIndex failed: %08x\n", nsres
);
426 static HRESULT WINAPI
HTMLElement2_focus(IHTMLElement2
*iface
)
428 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
429 nsIDOMNSHTMLElement
*nselem
;
432 TRACE("(%p)\n", This
);
434 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
435 if(NS_SUCCEEDED(nsres
)) {
436 nsIDOMNSHTMLElement_focus(nselem
);
437 nsIDOMNSHTMLElement_Release(nselem
);
439 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres
);
445 static HRESULT WINAPI
HTMLElement2_put_accessKey(IHTMLElement2
*iface
, BSTR v
)
447 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
450 static WCHAR accessKeyW
[] = {'a','c','c','e','s','s','K','e','y',0};
452 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
454 V_VT(&var
) = VT_BSTR
;
456 return IHTMLElement_setAttribute(HTMLELEM(This
), accessKeyW
, var
, 0);
459 static HRESULT WINAPI
HTMLElement2_get_accessKey(IHTMLElement2
*iface
, BSTR
*p
)
461 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
462 FIXME("(%p)->(%p)\n", This
, p
);
466 static HRESULT WINAPI
HTMLElement2_put_onblur(IHTMLElement2
*iface
, VARIANT v
)
468 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
469 FIXME("(%p)->()\n", This
);
473 static HRESULT WINAPI
HTMLElement2_get_onblur(IHTMLElement2
*iface
, VARIANT
*p
)
475 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
476 FIXME("(%p)->(%p)\n", This
, p
);
480 static HRESULT WINAPI
HTMLElement2_put_onfocus(IHTMLElement2
*iface
, VARIANT v
)
482 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
483 FIXME("(%p)->()\n", This
);
487 static HRESULT WINAPI
HTMLElement2_get_onfocus(IHTMLElement2
*iface
, VARIANT
*p
)
489 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
490 FIXME("(%p)->(%p)\n", This
, p
);
494 static HRESULT WINAPI
HTMLElement2_put_onresize(IHTMLElement2
*iface
, VARIANT v
)
496 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
497 FIXME("(%p)->()\n", This
);
501 static HRESULT WINAPI
HTMLElement2_get_onresize(IHTMLElement2
*iface
, VARIANT
*p
)
503 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
504 FIXME("(%p)->(%p)\n", This
, p
);
508 static HRESULT WINAPI
HTMLElement2_blur(IHTMLElement2
*iface
)
510 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
511 FIXME("(%p)\n", This
);
515 static HRESULT WINAPI
HTMLElement2_addFilter(IHTMLElement2
*iface
, IUnknown
*pUnk
)
517 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
518 FIXME("(%p)->(%p)\n", This
, pUnk
);
522 static HRESULT WINAPI
HTMLElement2_removeFilter(IHTMLElement2
*iface
, IUnknown
*pUnk
)
524 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
525 FIXME("(%p)->(%p)\n", This
, pUnk
);
529 static HRESULT WINAPI
HTMLElement2_get_clientHeight(IHTMLElement2
*iface
, long *p
)
531 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
532 nsIDOMNSHTMLElement
*nselem
;
536 TRACE("(%p)->(%p)\n", This
, p
);
538 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
539 if(NS_SUCCEEDED(nsres
)) {
540 nsIDOMNSHTMLElement_GetClientHeight(nselem
, &height
);
541 nsIDOMNSHTMLElement_Release(nselem
);
543 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres
);
550 static HRESULT WINAPI
HTMLElement2_get_clientWidth(IHTMLElement2
*iface
, long *p
)
552 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
553 nsIDOMNSHTMLElement
*nselem
;
557 TRACE("(%p)->(%p)\n", This
, p
);
559 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
560 if(NS_SUCCEEDED(nsres
)) {
561 nsIDOMNSHTMLElement_GetClientWidth(nselem
, &width
);
562 nsIDOMNSHTMLElement_Release(nselem
);
564 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres
);
571 static HRESULT WINAPI
HTMLElement2_get_clientTop(IHTMLElement2
*iface
, long *p
)
573 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
574 FIXME("(%p)->(%p)\n", This
, p
);
578 static HRESULT WINAPI
HTMLElement2_get_clientLeft(IHTMLElement2
*iface
, long *p
)
580 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
581 FIXME("(%p)->(%p)\n", This
, p
);
585 static HRESULT WINAPI
HTMLElement2_attachEvent(IHTMLElement2
*iface
, BSTR event
,
586 IDispatch
*pDisp
, VARIANT_BOOL
*pfResult
)
588 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
589 FIXME("(%p)->(%s %p %p)\n", This
, debugstr_w(event
), pDisp
, pfResult
);
593 static HRESULT WINAPI
HTMLElement2_detachEvent(IHTMLElement2
*iface
, BSTR event
, IDispatch
*pDisp
)
595 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
596 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(event
), pDisp
);
600 static HRESULT WINAPI
HTMLElement2_get_readyState(IHTMLElement2
*iface
, VARIANT
*p
)
602 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
603 FIXME("(%p)->(%p)\n", This
, p
);
607 static HRESULT WINAPI
HTMLElement2_put_onreadystatechange(IHTMLElement2
*iface
, VARIANT v
)
609 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
610 FIXME("(%p)->()\n", This
);
614 static HRESULT WINAPI
HTMLElement2_get_onreadystatechange(IHTMLElement2
*iface
, VARIANT
*p
)
616 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
617 FIXME("(%p)->(%p)\n", This
, p
);
621 static HRESULT WINAPI
HTMLElement2_put_onrowsdelete(IHTMLElement2
*iface
, VARIANT v
)
623 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
624 FIXME("(%p)->()\n", This
);
628 static HRESULT WINAPI
HTMLElement2_get_onrowsdelete(IHTMLElement2
*iface
, VARIANT
*p
)
630 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
631 FIXME("(%p)->(%p)\n", This
, p
);
635 static HRESULT WINAPI
HTMLElement2_put_onrowsinserted(IHTMLElement2
*iface
, VARIANT v
)
637 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
638 FIXME("(%p)->()\n", This
);
642 static HRESULT WINAPI
HTMLElement2_get_onrowsinserted(IHTMLElement2
*iface
, VARIANT
*p
)
644 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
645 FIXME("(%p)->(%p)\n", This
, p
);
649 static HRESULT WINAPI
HTMLElement2_put_oncellchange(IHTMLElement2
*iface
, VARIANT v
)
651 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
652 FIXME("(%p)->()\n", This
);
656 static HRESULT WINAPI
HTMLElement2_get_oncellchange(IHTMLElement2
*iface
, VARIANT
*p
)
658 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
659 FIXME("(%p)->(%p)\n", This
, p
);
663 static HRESULT WINAPI
HTMLElement2_put_dir(IHTMLElement2
*iface
, BSTR v
)
665 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
666 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
670 static HRESULT WINAPI
HTMLElement2_get_dir(IHTMLElement2
*iface
, BSTR
*p
)
672 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
674 TRACE("(%p)->(%p)\n", This
, p
);
682 nsAString_Init(&dir_str
, NULL
);
684 nsres
= nsIDOMHTMLElement_GetDir(This
->nselem
, &dir_str
);
685 if(NS_SUCCEEDED(nsres
)) {
686 const PRUnichar
*dir
;
687 nsAString_GetData(&dir_str
, &dir
);
689 *p
= SysAllocString(dir
);
691 ERR("GetDir failed: %08x\n", nsres
);
694 nsAString_Finish(&dir_str
);
697 TRACE("ret %s\n", debugstr_w(*p
));
701 static HRESULT WINAPI
HTMLElement2_createControlRange(IHTMLElement2
*iface
, IDispatch
**range
)
703 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
704 FIXME("(%p)->(%p)\n", This
, range
);
708 static HRESULT WINAPI
HTMLElement2_get_scrollHeight(IHTMLElement2
*iface
, long *p
)
710 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
711 nsIDOMNSHTMLElement
*nselem
;
715 TRACE("(%p)->(%p)\n", This
, p
);
717 nsres
= nsIDOMElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
718 if(NS_SUCCEEDED(nsres
)) {
719 nsres
= nsIDOMNSHTMLElement_GetScrollHeight(nselem
, &height
);
720 nsIDOMNSHTMLElement_Release(nselem
);
722 ERR("GetScrollHeight failed: %08x\n", nsres
);
724 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres
);
728 TRACE("*p = %ld\n", *p
);
733 static HRESULT WINAPI
HTMLElement2_get_scrollWidth(IHTMLElement2
*iface
, long *p
)
735 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
736 nsIDOMNSHTMLElement
*nselem
;
740 TRACE("(%p)->(%p)\n", This
, p
);
742 nsres
= nsIDOMElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
743 if(NS_SUCCEEDED(nsres
)) {
744 nsres
= nsIDOMNSHTMLElement_GetScrollWidth(nselem
, &width
);
745 nsIDOMNSHTMLElement_Release(nselem
);
747 ERR("GetScrollWidth failed: %08x\n", nsres
);
749 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres
);
753 TRACE("*p = %ld\n", *p
);
758 static HRESULT WINAPI
HTMLElement2_put_scrollTop(IHTMLElement2
*iface
, long v
)
760 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
761 nsIDOMNSHTMLElement
*nselem
;
764 TRACE("(%p)->(%ld)\n", This
, v
);
767 FIXME("NULL nselem\n");
771 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
772 if(NS_SUCCEEDED(nsres
)) {
773 nsIDOMNSHTMLElement_SetScrollTop(nselem
, v
);
774 nsIDOMNSHTMLElement_Release(nselem
);
776 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres
);
782 static HRESULT WINAPI
HTMLElement2_get_scrollTop(IHTMLElement2
*iface
, long *p
)
784 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
785 nsIDOMNSHTMLElement
*nselem
;
789 TRACE("(%p)->(%p)\n", This
, p
);
791 nsres
= nsIDOMElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
792 if(NS_SUCCEEDED(nsres
)) {
793 nsres
= nsIDOMNSHTMLElement_GetScrollTop(nselem
, &top
);
794 nsIDOMNSHTMLElement_Release(nselem
);
796 ERR("GetScrollTop failed: %08x\n", nsres
);
798 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres
);
802 TRACE("*p = %ld\n", *p
);
807 static HRESULT WINAPI
HTMLElement2_put_scrollLeft(IHTMLElement2
*iface
, long v
)
809 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
810 nsIDOMNSHTMLElement
*nselem
;
813 TRACE("(%p)->(%ld)\n", This
, v
);
816 FIXME("NULL nselem\n");
820 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
821 if(NS_SUCCEEDED(nsres
)) {
822 nsIDOMNSHTMLElement_SetScrollLeft(nselem
, v
);
823 nsIDOMNSHTMLElement_Release(nselem
);
825 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres
);
831 static HRESULT WINAPI
HTMLElement2_get_scrollLeft(IHTMLElement2
*iface
, long *p
)
833 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
834 FIXME("(%p)->(%p)\n", This
, p
);
838 static HRESULT WINAPI
HTMLElement2_clearAttributes(IHTMLElement2
*iface
)
840 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
841 FIXME("(%p)\n", This
);
845 static HRESULT WINAPI
HTMLElement2_mergeAttributes(IHTMLElement2
*iface
, IHTMLElement
*mergeThis
)
847 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
848 FIXME("(%p)->(%p)\n", This
, mergeThis
);
852 static HRESULT WINAPI
HTMLElement2_put_oncontextmenu(IHTMLElement2
*iface
, VARIANT v
)
854 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
855 FIXME("(%p)->()\n", This
);
859 static HRESULT WINAPI
HTMLElement2_get_oncontextmenu(IHTMLElement2
*iface
, VARIANT
*p
)
861 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
862 FIXME("(%p)->(%p)\n", This
, p
);
866 static HRESULT WINAPI
HTMLElement2_insertAdjecentElement(IHTMLElement2
*iface
, BSTR where
,
867 IHTMLElement
*insertedElement
, IHTMLElement
**inserted
)
869 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
870 FIXME("(%p)->(%s %p %p)\n", This
, debugstr_w(where
), insertedElement
, inserted
);
874 static HRESULT WINAPI
HTMLElement2_applyElement(IHTMLElement2
*iface
, IHTMLElement
*apply
,
875 BSTR where
, IHTMLElement
**applied
)
877 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
878 FIXME("(%p)->(%p %s %p)\n", This
, apply
, debugstr_w(where
), applied
);
882 static HRESULT WINAPI
HTMLElement2_getAdjecentText(IHTMLElement2
*iface
, BSTR where
, BSTR
*text
)
884 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
885 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(where
), text
);
889 static HRESULT WINAPI
HTMLElement2_replaceAdjecentText(IHTMLElement2
*iface
, BSTR where
,
890 BSTR newText
, BSTR
*oldText
)
892 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
893 FIXME("(%p)->(%s %s %p)\n", This
, debugstr_w(where
), debugstr_w(newText
), oldText
);
897 static HRESULT WINAPI
HTMLElement2_get_canHandleChildren(IHTMLElement2
*iface
, VARIANT_BOOL
*p
)
899 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
900 FIXME("(%p)->(%p)\n", This
, p
);
904 static HRESULT WINAPI
HTMLElement2_addBehavior(IHTMLElement2
*iface
, BSTR bstrUrl
,
905 VARIANT
*pvarFactory
, long *pCookie
)
907 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
908 FIXME("(%p)->(%s %p %p)\n", This
, debugstr_w(bstrUrl
), pvarFactory
, pCookie
);
912 static HRESULT WINAPI
HTMLElement2_removeBehavior(IHTMLElement2
*iface
, long cookie
,
913 VARIANT_BOOL
*pfResult
)
915 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
916 FIXME("(%p)->(%ld %p)\n", This
, cookie
, pfResult
);
920 static HRESULT WINAPI
HTMLElement2_get_runtimeStyle(IHTMLElement2
*iface
, IHTMLStyle
**p
)
922 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
923 FIXME("(%p)->(%p)\n", This
, p
);
927 static HRESULT WINAPI
HTMLElement2_get_behaviorUrns(IHTMLElement2
*iface
, IDispatch
**p
)
929 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
930 FIXME("(%p)->(%p)\n", This
, p
);
934 static HRESULT WINAPI
HTMLElement2_put_tagUrn(IHTMLElement2
*iface
, BSTR v
)
936 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
937 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
941 static HRESULT WINAPI
HTMLElement2_get_tagUrn(IHTMLElement2
*iface
, BSTR
*p
)
943 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
944 FIXME("(%p)->(%p)\n", This
, p
);
948 static HRESULT WINAPI
HTMLElement2_put_onbeforeeditfocus(IHTMLElement2
*iface
, VARIANT vv
)
950 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
951 FIXME("(%p)->()\n", This
);
955 static HRESULT WINAPI
HTMLElement2_get_onbeforeeditfocus(IHTMLElement2
*iface
, VARIANT
*p
)
957 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
958 FIXME("(%p)->(%p)\n", This
, p
);
962 static HRESULT WINAPI
HTMLElement2_get_readyStateValue(IHTMLElement2
*iface
, long *p
)
964 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
965 FIXME("(%p)->(%p)\n", This
, p
);
969 static HRESULT WINAPI
HTMLElement2_getElementsByTagName(IHTMLElement2
*iface
, BSTR v
,
970 IHTMLElementCollection
**pelColl
)
972 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
973 nsIDOMNodeList
*nslist
;
977 TRACE("(%p)->(%s %p)\n", This
, debugstr_w(v
), pelColl
);
979 nsAString_Init(&tag_str
, v
);
980 nsres
= nsIDOMHTMLElement_GetElementsByTagName(This
->nselem
, &tag_str
, &nslist
);
981 nsAString_Finish(&tag_str
);
982 if(NS_FAILED(nsres
)) {
983 ERR("GetElementByTagName failed: %08x\n", nsres
);
987 *pelColl
= create_collection_from_nodelist(This
->node
.doc
, (IUnknown
*)HTMLELEM(This
), nslist
);
988 nsIDOMNodeList_Release(nslist
);
992 #undef HTMLELEM2_THIS
994 static const IHTMLElement2Vtbl HTMLElement2Vtbl
= {
995 HTMLElement2_QueryInterface
,
997 HTMLElement2_Release
,
998 HTMLElement2_GetTypeInfoCount
,
999 HTMLElement2_GetTypeInfo
,
1000 HTMLElement2_GetIDsOfNames
,
1001 HTMLElement2_Invoke
,
1002 HTMLElement2_get_scopeName
,
1003 HTMLElement2_setCapture
,
1004 HTMLElement2_releaseCapture
,
1005 HTMLElement2_put_onlosecapture
,
1006 HTMLElement2_get_onlosecapture
,
1007 HTMLElement2_componentFromPoint
,
1008 HTMLElement2_doScroll
,
1009 HTMLElement2_put_onscroll
,
1010 HTMLElement2_get_onscroll
,
1011 HTMLElement2_put_ondrag
,
1012 HTMLElement2_get_ondrag
,
1013 HTMLElement2_put_ondragend
,
1014 HTMLElement2_get_ondragend
,
1015 HTMLElement2_put_ondragenter
,
1016 HTMLElement2_get_ondragenter
,
1017 HTMLElement2_put_ondragover
,
1018 HTMLElement2_get_ondragover
,
1019 HTMLElement2_put_ondragleave
,
1020 HTMLElement2_get_ondragleave
,
1021 HTMLElement2_put_ondrop
,
1022 HTMLElement2_get_ondrop
,
1023 HTMLElement2_put_onbeforecut
,
1024 HTMLElement2_get_onbeforecut
,
1025 HTMLElement2_put_oncut
,
1026 HTMLElement2_get_oncut
,
1027 HTMLElement2_put_onbeforecopy
,
1028 HTMLElement2_get_onbeforecopy
,
1029 HTMLElement2_put_oncopy
,
1030 HTMLElement2_get_oncopy
,
1031 HTMLElement2_put_onbeforepaste
,
1032 HTMLElement2_get_onbeforepaste
,
1033 HTMLElement2_put_onpaste
,
1034 HTMLElement2_get_onpaste
,
1035 HTMLElement2_get_currentStyle
,
1036 HTMLElement2_put_onpropertychange
,
1037 HTMLElement2_get_onpropertychange
,
1038 HTMLElement2_getClientRects
,
1039 HTMLElement2_getBoundingClientRect
,
1040 HTMLElement2_setExpression
,
1041 HTMLElement2_getExpression
,
1042 HTMLElement2_removeExpression
,
1043 HTMLElement2_put_tabIndex
,
1044 HTMLElement2_get_tabIndex
,
1046 HTMLElement2_put_accessKey
,
1047 HTMLElement2_get_accessKey
,
1048 HTMLElement2_put_onblur
,
1049 HTMLElement2_get_onblur
,
1050 HTMLElement2_put_onfocus
,
1051 HTMLElement2_get_onfocus
,
1052 HTMLElement2_put_onresize
,
1053 HTMLElement2_get_onresize
,
1055 HTMLElement2_addFilter
,
1056 HTMLElement2_removeFilter
,
1057 HTMLElement2_get_clientHeight
,
1058 HTMLElement2_get_clientWidth
,
1059 HTMLElement2_get_clientTop
,
1060 HTMLElement2_get_clientLeft
,
1061 HTMLElement2_attachEvent
,
1062 HTMLElement2_detachEvent
,
1063 HTMLElement2_get_readyState
,
1064 HTMLElement2_put_onreadystatechange
,
1065 HTMLElement2_get_onreadystatechange
,
1066 HTMLElement2_put_onrowsdelete
,
1067 HTMLElement2_get_onrowsdelete
,
1068 HTMLElement2_put_onrowsinserted
,
1069 HTMLElement2_get_onrowsinserted
,
1070 HTMLElement2_put_oncellchange
,
1071 HTMLElement2_get_oncellchange
,
1072 HTMLElement2_put_dir
,
1073 HTMLElement2_get_dir
,
1074 HTMLElement2_createControlRange
,
1075 HTMLElement2_get_scrollHeight
,
1076 HTMLElement2_get_scrollWidth
,
1077 HTMLElement2_put_scrollTop
,
1078 HTMLElement2_get_scrollTop
,
1079 HTMLElement2_put_scrollLeft
,
1080 HTMLElement2_get_scrollLeft
,
1081 HTMLElement2_clearAttributes
,
1082 HTMLElement2_mergeAttributes
,
1083 HTMLElement2_put_oncontextmenu
,
1084 HTMLElement2_get_oncontextmenu
,
1085 HTMLElement2_insertAdjecentElement
,
1086 HTMLElement2_applyElement
,
1087 HTMLElement2_getAdjecentText
,
1088 HTMLElement2_replaceAdjecentText
,
1089 HTMLElement2_get_canHandleChildren
,
1090 HTMLElement2_addBehavior
,
1091 HTMLElement2_removeBehavior
,
1092 HTMLElement2_get_runtimeStyle
,
1093 HTMLElement2_get_behaviorUrns
,
1094 HTMLElement2_put_tagUrn
,
1095 HTMLElement2_get_tagUrn
,
1096 HTMLElement2_put_onbeforeeditfocus
,
1097 HTMLElement2_get_onbeforeeditfocus
,
1098 HTMLElement2_get_readyStateValue
,
1099 HTMLElement2_getElementsByTagName
,
1102 void HTMLElement2_Init(HTMLElement
*This
)
1104 This
->lpHTMLElement2Vtbl
= &HTMLElement2Vtbl
;