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 FIXME("(%p)->(%p)\n", This
, pctinfo
);
63 static HRESULT WINAPI
HTMLElement2_GetTypeInfo(IHTMLElement2
*iface
, UINT iTInfo
,
64 LCID lcid
, ITypeInfo
**ppTInfo
)
66 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
67 FIXME("(%p)->(%u %u %p)\n", This
, iTInfo
, lcid
, ppTInfo
);
71 static HRESULT WINAPI
HTMLElement2_GetIDsOfNames(IHTMLElement2
*iface
, REFIID riid
,
72 LPOLESTR
*rgszNames
, UINT cNames
,
73 LCID lcid
, DISPID
*rgDispId
)
75 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
76 FIXME("(%p)->(%s %p %u %u %p)\n", This
, debugstr_guid(riid
), rgszNames
, cNames
,
81 static HRESULT WINAPI
HTMLElement2_Invoke(IHTMLElement2
*iface
, DISPID dispIdMember
,
82 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
83 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
85 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
86 FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This
, dispIdMember
, debugstr_guid(riid
),
87 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
91 static HRESULT WINAPI
HTMLElement2_get_scopeName(IHTMLElement2
*iface
, BSTR
*p
)
93 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
94 FIXME("(%p)->(%p)\n", This
, p
);
98 static HRESULT WINAPI
HTMLElement2_setCapture(IHTMLElement2
*iface
, VARIANT_BOOL containerCapture
)
100 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
101 FIXME("(%p)->(%x)\n", This
, containerCapture
);
105 static HRESULT WINAPI
HTMLElement2_releaseCapture(IHTMLElement2
*iface
)
107 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
108 FIXME("(%p)\n", This
);
112 static HRESULT WINAPI
HTMLElement2_put_onlosecapture(IHTMLElement2
*iface
, VARIANT v
)
114 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
115 FIXME("(%p)->()\n", This
);
119 static HRESULT WINAPI
HTMLElement2_get_onlosecapture(IHTMLElement2
*iface
, VARIANT
*p
)
121 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
122 FIXME("(%p)->(%p)\n", This
, p
);
126 static HRESULT WINAPI
HTMLElement2_componentFromPoint(IHTMLElement2
*iface
,
127 long x
, long y
, BSTR
*component
)
129 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
130 FIXME("(%p)->(%ld %ld %p)\n", This
, x
, y
, component
);
134 static HRESULT WINAPI
HTMLElement2_doScroll(IHTMLElement2
*iface
, VARIANT component
)
136 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
137 FIXME("(%p)->()\n", This
);
141 static HRESULT WINAPI
HTMLElement2_put_onscroll(IHTMLElement2
*iface
, VARIANT v
)
143 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
144 FIXME("(%p)->()\n", This
);
148 static HRESULT WINAPI
HTMLElement2_get_onscroll(IHTMLElement2
*iface
, VARIANT
*p
)
150 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
151 FIXME("(%p)->(%p)\n", This
, p
);
155 static HRESULT WINAPI
HTMLElement2_put_ondrag(IHTMLElement2
*iface
, VARIANT v
)
157 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
158 FIXME("(%p)->()\n", This
);
162 static HRESULT WINAPI
HTMLElement2_get_ondrag(IHTMLElement2
*iface
, VARIANT
*p
)
164 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
165 FIXME("(%p)->(%p)\n", This
, p
);
169 static HRESULT WINAPI
HTMLElement2_put_ondragend(IHTMLElement2
*iface
, VARIANT v
)
171 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
172 FIXME("(%p)->()\n", This
);
176 static HRESULT WINAPI
HTMLElement2_get_ondragend(IHTMLElement2
*iface
, VARIANT
*p
)
178 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
179 FIXME("(%p)->(%p)\n", This
, p
);
183 static HRESULT WINAPI
HTMLElement2_put_ondragenter(IHTMLElement2
*iface
, VARIANT v
)
185 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
186 FIXME("(%p)->()\n", This
);
190 static HRESULT WINAPI
HTMLElement2_get_ondragenter(IHTMLElement2
*iface
, VARIANT
*p
)
192 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
193 FIXME("(%p)->(%p)\n", This
, p
);
197 static HRESULT WINAPI
HTMLElement2_put_ondragover(IHTMLElement2
*iface
, VARIANT v
)
199 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
200 FIXME("(%p)->()\n", This
);
204 static HRESULT WINAPI
HTMLElement2_get_ondragover(IHTMLElement2
*iface
, VARIANT
*p
)
206 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
207 FIXME("(%p)->(%p)\n", This
, p
);
211 static HRESULT WINAPI
HTMLElement2_put_ondragleave(IHTMLElement2
*iface
, VARIANT v
)
213 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
214 FIXME("(%p)->()\n", This
);
218 static HRESULT WINAPI
HTMLElement2_get_ondragleave(IHTMLElement2
*iface
, VARIANT
*p
)
220 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
221 FIXME("(%p)->(%p)\n", This
, p
);
225 static HRESULT WINAPI
HTMLElement2_put_ondrop(IHTMLElement2
*iface
, VARIANT v
)
227 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
228 FIXME("(%p)->()\n", This
);
232 static HRESULT WINAPI
HTMLElement2_get_ondrop(IHTMLElement2
*iface
, VARIANT
*p
)
234 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
235 FIXME("(%p)->(%p)\n", This
, p
);
239 static HRESULT WINAPI
HTMLElement2_put_onbeforecut(IHTMLElement2
*iface
, VARIANT v
)
241 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
242 FIXME("(%p)->()\n", This
);
246 static HRESULT WINAPI
HTMLElement2_get_onbeforecut(IHTMLElement2
*iface
, VARIANT
*p
)
248 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
249 FIXME("(%p)->(%p)\n", This
, p
);
253 static HRESULT WINAPI
HTMLElement2_put_oncut(IHTMLElement2
*iface
, VARIANT v
)
255 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
256 FIXME("(%p)->()\n", This
);
260 static HRESULT WINAPI
HTMLElement2_get_oncut(IHTMLElement2
*iface
, VARIANT
*p
)
262 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
263 FIXME("(%p)->(%p)\n", This
, p
);
267 static HRESULT WINAPI
HTMLElement2_put_onbeforecopy(IHTMLElement2
*iface
, VARIANT v
)
269 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
270 FIXME("(%p)->()\n", This
);
274 static HRESULT WINAPI
HTMLElement2_get_onbeforecopy(IHTMLElement2
*iface
, VARIANT
*p
)
276 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
277 FIXME("(%p)->(%p)\n", This
, p
);
281 static HRESULT WINAPI
HTMLElement2_put_oncopy(IHTMLElement2
*iface
, VARIANT v
)
283 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
284 FIXME("(%p)->()\n", This
);
288 static HRESULT WINAPI
HTMLElement2_get_oncopy(IHTMLElement2
*iface
, VARIANT
*p
)
290 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
291 FIXME("(%p)->(%p)\n", This
, p
);
295 static HRESULT WINAPI
HTMLElement2_put_onbeforepaste(IHTMLElement2
*iface
, VARIANT v
)
297 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
298 FIXME("(%p)->()\n", This
);
302 static HRESULT WINAPI
HTMLElement2_get_onbeforepaste(IHTMLElement2
*iface
, VARIANT
*p
)
304 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
305 FIXME("(%p)->(%p)\n", This
, p
);
309 static HRESULT WINAPI
HTMLElement2_put_onpaste(IHTMLElement2
*iface
, VARIANT v
)
311 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
312 FIXME("(%p)->()\n", This
);
316 static HRESULT WINAPI
HTMLElement2_get_onpaste(IHTMLElement2
*iface
, VARIANT
*p
)
318 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
319 FIXME("(%p)->(%p)\n", This
, p
);
323 static HRESULT WINAPI
HTMLElement2_get_currentStyle(IHTMLElement2
*iface
, IHTMLCurrentStyle
**p
)
325 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
326 FIXME("(%p)->(%p)\n", This
, p
);
330 static HRESULT WINAPI
HTMLElement2_put_onpropertychange(IHTMLElement2
*iface
, VARIANT v
)
332 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
333 FIXME("(%p)->()\n", This
);
337 static HRESULT WINAPI
HTMLElement2_get_onpropertychange(IHTMLElement2
*iface
, VARIANT
*p
)
339 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
340 FIXME("(%p)->(%p)\n", This
, p
);
344 static HRESULT WINAPI
HTMLElement2_getClientRects(IHTMLElement2
*iface
, IHTMLRectCollection
**pRectCol
)
346 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
347 FIXME("(%p)->(%p)\n", This
, pRectCol
);
351 static HRESULT WINAPI
HTMLElement2_getBoundingClientRect(IHTMLElement2
*iface
, IHTMLRect
**pRect
)
353 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
354 FIXME("(%p)->(%p)\n", This
, pRect
);
358 static HRESULT WINAPI
HTMLElement2_setExpression(IHTMLElement2
*iface
, BSTR propname
,
359 BSTR expression
, BSTR language
)
361 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
362 FIXME("(%p)->(%s %s %s)\n", This
, debugstr_w(propname
), debugstr_w(expression
),
363 debugstr_w(language
));
367 static HRESULT WINAPI
HTMLElement2_getExpression(IHTMLElement2
*iface
, BSTR propname
,
370 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
371 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(propname
), expression
);
375 static HRESULT WINAPI
HTMLElement2_removeExpression(IHTMLElement2
*iface
, BSTR propname
,
376 VARIANT_BOOL
*pfSuccess
)
378 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
379 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(propname
), pfSuccess
);
383 static HRESULT WINAPI
HTMLElement2_put_tabIndex(IHTMLElement2
*iface
, short v
)
385 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
386 nsIDOMNSHTMLElement
*nselem
;
389 TRACE("(%p)->(%d)\n", This
, v
);
391 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
392 if(NS_FAILED(nsres
)) {
393 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres
);
397 nsres
= nsIDOMNSHTMLElement_SetTabIndex(nselem
, v
);
398 nsIDOMNSHTMLElement_Release(nselem
);
400 ERR("GetTabIndex failed: %08x\n", nsres
);
405 static HRESULT WINAPI
HTMLElement2_get_tabIndex(IHTMLElement2
*iface
, short *p
)
407 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
408 nsIDOMNSHTMLElement
*nselem
;
412 TRACE("(%p)->(%p)\n", This
, p
);
414 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
415 if(NS_FAILED(nsres
)) {
416 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres
);
420 nsres
= nsIDOMNSHTMLElement_GetTabIndex(nselem
, &index
);
421 nsIDOMNSHTMLElement_Release(nselem
);
422 if(NS_FAILED(nsres
)) {
423 ERR("GetTabIndex failed: %08x\n", nsres
);
431 static HRESULT WINAPI
HTMLElement2_focus(IHTMLElement2
*iface
)
433 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
434 nsIDOMNSHTMLElement
*nselem
;
437 TRACE("(%p)\n", This
);
439 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
440 if(NS_SUCCEEDED(nsres
)) {
441 nsIDOMNSHTMLElement_focus(nselem
);
442 nsIDOMNSHTMLElement_Release(nselem
);
444 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres
);
450 static HRESULT WINAPI
HTMLElement2_put_accessKey(IHTMLElement2
*iface
, BSTR v
)
452 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
455 static WCHAR accessKeyW
[] = {'a','c','c','e','s','s','K','e','y',0};
457 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
459 V_VT(&var
) = VT_BSTR
;
461 return IHTMLElement_setAttribute(HTMLELEM(This
), accessKeyW
, var
, 0);
464 static HRESULT WINAPI
HTMLElement2_get_accessKey(IHTMLElement2
*iface
, BSTR
*p
)
466 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
467 FIXME("(%p)->(%p)\n", This
, p
);
471 static HRESULT WINAPI
HTMLElement2_put_onblur(IHTMLElement2
*iface
, VARIANT v
)
473 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
474 FIXME("(%p)->()\n", This
);
478 static HRESULT WINAPI
HTMLElement2_get_onblur(IHTMLElement2
*iface
, VARIANT
*p
)
480 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
481 FIXME("(%p)->(%p)\n", This
, p
);
485 static HRESULT WINAPI
HTMLElement2_put_onfocus(IHTMLElement2
*iface
, VARIANT v
)
487 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
488 FIXME("(%p)->()\n", This
);
492 static HRESULT WINAPI
HTMLElement2_get_onfocus(IHTMLElement2
*iface
, VARIANT
*p
)
494 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
495 FIXME("(%p)->(%p)\n", This
, p
);
499 static HRESULT WINAPI
HTMLElement2_put_onresize(IHTMLElement2
*iface
, VARIANT v
)
501 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
502 FIXME("(%p)->()\n", This
);
506 static HRESULT WINAPI
HTMLElement2_get_onresize(IHTMLElement2
*iface
, VARIANT
*p
)
508 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
509 FIXME("(%p)->(%p)\n", This
, p
);
513 static HRESULT WINAPI
HTMLElement2_blur(IHTMLElement2
*iface
)
515 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
516 FIXME("(%p)\n", This
);
520 static HRESULT WINAPI
HTMLElement2_addFilter(IHTMLElement2
*iface
, IUnknown
*pUnk
)
522 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
523 FIXME("(%p)->(%p)\n", This
, pUnk
);
527 static HRESULT WINAPI
HTMLElement2_removeFilter(IHTMLElement2
*iface
, IUnknown
*pUnk
)
529 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
530 FIXME("(%p)->(%p)\n", This
, pUnk
);
534 static HRESULT WINAPI
HTMLElement2_get_clientHeight(IHTMLElement2
*iface
, long *p
)
536 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
537 nsIDOMNSHTMLElement
*nselem
;
541 TRACE("(%p)->(%p)\n", This
, p
);
543 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
544 if(NS_SUCCEEDED(nsres
)) {
545 nsIDOMNSHTMLElement_GetClientHeight(nselem
, &height
);
546 nsIDOMNSHTMLElement_Release(nselem
);
548 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres
);
555 static HRESULT WINAPI
HTMLElement2_get_clientWidth(IHTMLElement2
*iface
, long *p
)
557 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
558 nsIDOMNSHTMLElement
*nselem
;
562 TRACE("(%p)->(%p)\n", This
, p
);
564 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
565 if(NS_SUCCEEDED(nsres
)) {
566 nsIDOMNSHTMLElement_GetClientWidth(nselem
, &width
);
567 nsIDOMNSHTMLElement_Release(nselem
);
569 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres
);
576 static HRESULT WINAPI
HTMLElement2_get_clientTop(IHTMLElement2
*iface
, long *p
)
578 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
579 FIXME("(%p)->(%p)\n", This
, p
);
583 static HRESULT WINAPI
HTMLElement2_get_clientLeft(IHTMLElement2
*iface
, long *p
)
585 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
586 FIXME("(%p)->(%p)\n", This
, p
);
590 static HRESULT WINAPI
HTMLElement2_attachEvent(IHTMLElement2
*iface
, BSTR event
,
591 IDispatch
*pDisp
, VARIANT_BOOL
*pfResult
)
593 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
594 FIXME("(%p)->(%s %p %p)\n", This
, debugstr_w(event
), pDisp
, pfResult
);
598 static HRESULT WINAPI
HTMLElement2_detachEvent(IHTMLElement2
*iface
, BSTR event
, IDispatch
*pDisp
)
600 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
601 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(event
), pDisp
);
605 static HRESULT WINAPI
HTMLElement2_get_readyState(IHTMLElement2
*iface
, VARIANT
*p
)
607 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
608 FIXME("(%p)->(%p)\n", This
, p
);
612 static HRESULT WINAPI
HTMLElement2_put_onreadystatechange(IHTMLElement2
*iface
, VARIANT v
)
614 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
615 FIXME("(%p)->()\n", This
);
619 static HRESULT WINAPI
HTMLElement2_get_onreadystatechange(IHTMLElement2
*iface
, VARIANT
*p
)
621 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
622 FIXME("(%p)->(%p)\n", This
, p
);
626 static HRESULT WINAPI
HTMLElement2_put_onrowsdelete(IHTMLElement2
*iface
, VARIANT v
)
628 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
629 FIXME("(%p)->()\n", This
);
633 static HRESULT WINAPI
HTMLElement2_get_onrowsdelete(IHTMLElement2
*iface
, VARIANT
*p
)
635 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
636 FIXME("(%p)->(%p)\n", This
, p
);
640 static HRESULT WINAPI
HTMLElement2_put_onrowsinserted(IHTMLElement2
*iface
, VARIANT v
)
642 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
643 FIXME("(%p)->()\n", This
);
647 static HRESULT WINAPI
HTMLElement2_get_onrowsinserted(IHTMLElement2
*iface
, VARIANT
*p
)
649 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
650 FIXME("(%p)->(%p)\n", This
, p
);
654 static HRESULT WINAPI
HTMLElement2_put_oncellchange(IHTMLElement2
*iface
, VARIANT v
)
656 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
657 FIXME("(%p)->()\n", This
);
661 static HRESULT WINAPI
HTMLElement2_get_oncellchange(IHTMLElement2
*iface
, VARIANT
*p
)
663 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
664 FIXME("(%p)->(%p)\n", This
, p
);
668 static HRESULT WINAPI
HTMLElement2_put_dir(IHTMLElement2
*iface
, BSTR v
)
670 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
671 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
675 static HRESULT WINAPI
HTMLElement2_get_dir(IHTMLElement2
*iface
, BSTR
*p
)
677 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
679 TRACE("(%p)->(%p)\n", This
, p
);
687 nsAString_Init(&dir_str
, NULL
);
689 nsres
= nsIDOMHTMLElement_GetDir(This
->nselem
, &dir_str
);
690 if(NS_SUCCEEDED(nsres
)) {
691 const PRUnichar
*dir
;
692 nsAString_GetData(&dir_str
, &dir
);
694 *p
= SysAllocString(dir
);
696 ERR("GetDir failed: %08x\n", nsres
);
699 nsAString_Finish(&dir_str
);
702 TRACE("ret %s\n", debugstr_w(*p
));
706 static HRESULT WINAPI
HTMLElement2_createControlRange(IHTMLElement2
*iface
, IDispatch
**range
)
708 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
709 FIXME("(%p)->(%p)\n", This
, range
);
713 static HRESULT WINAPI
HTMLElement2_get_scrollHeight(IHTMLElement2
*iface
, long *p
)
715 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
716 FIXME("(%p)->(%p)\n", This
, p
);
720 static HRESULT WINAPI
HTMLElement2_get_scrollWidth(IHTMLElement2
*iface
, long *p
)
722 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
723 FIXME("(%p)->(%p)\n", This
, p
);
727 static HRESULT WINAPI
HTMLElement2_put_scrollTop(IHTMLElement2
*iface
, long v
)
729 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
730 nsIDOMNSHTMLElement
*nselem
;
733 TRACE("(%p)->(%ld)\n", This
, v
);
736 FIXME("NULL nselem\n");
740 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
741 if(NS_SUCCEEDED(nsres
)) {
742 nsIDOMNSHTMLElement_SetScrollTop(nselem
, v
);
743 nsIDOMNSHTMLElement_Release(nselem
);
745 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres
);
751 static HRESULT WINAPI
HTMLElement2_get_scrollTop(IHTMLElement2
*iface
, long *p
)
753 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
754 FIXME("(%p)->(%p)\n", This
, p
);
758 static HRESULT WINAPI
HTMLElement2_put_scrollLeft(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_SetScrollLeft(nselem
, v
);
774 nsIDOMNSHTMLElement_Release(nselem
);
776 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres
);
782 static HRESULT WINAPI
HTMLElement2_get_scrollLeft(IHTMLElement2
*iface
, long *p
)
784 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
785 FIXME("(%p)->(%p)\n", This
, p
);
789 static HRESULT WINAPI
HTMLElement2_clearAttributes(IHTMLElement2
*iface
)
791 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
792 FIXME("(%p)\n", This
);
796 static HRESULT WINAPI
HTMLElement2_mergeAttributes(IHTMLElement2
*iface
, IHTMLElement
*mergeThis
)
798 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
799 FIXME("(%p)->(%p)\n", This
, mergeThis
);
803 static HRESULT WINAPI
HTMLElement2_put_oncontextmenu(IHTMLElement2
*iface
, VARIANT v
)
805 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
806 FIXME("(%p)->()\n", This
);
810 static HRESULT WINAPI
HTMLElement2_get_oncontextmenu(IHTMLElement2
*iface
, VARIANT
*p
)
812 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
813 FIXME("(%p)->(%p)\n", This
, p
);
817 static HRESULT WINAPI
HTMLElement2_insertAdjecentElement(IHTMLElement2
*iface
, BSTR where
,
818 IHTMLElement
*insertedElement
, IHTMLElement
**inserted
)
820 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
821 FIXME("(%p)->(%s %p %p)\n", This
, debugstr_w(where
), insertedElement
, inserted
);
825 static HRESULT WINAPI
HTMLElement2_applyElement(IHTMLElement2
*iface
, IHTMLElement
*apply
,
826 BSTR where
, IHTMLElement
**applied
)
828 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
829 FIXME("(%p)->(%p %s %p)\n", This
, apply
, debugstr_w(where
), applied
);
833 static HRESULT WINAPI
HTMLElement2_getAdjecentText(IHTMLElement2
*iface
, BSTR where
, BSTR
*text
)
835 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
836 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(where
), text
);
840 static HRESULT WINAPI
HTMLElement2_replaceAdjecentText(IHTMLElement2
*iface
, BSTR where
,
841 BSTR newText
, BSTR
*oldText
)
843 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
844 FIXME("(%p)->(%s %s %p)\n", This
, debugstr_w(where
), debugstr_w(newText
), oldText
);
848 static HRESULT WINAPI
HTMLElement2_get_canHandleChildren(IHTMLElement2
*iface
, VARIANT_BOOL
*p
)
850 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
851 FIXME("(%p)->(%p)\n", This
, p
);
855 static HRESULT WINAPI
HTMLElement2_addBehavior(IHTMLElement2
*iface
, BSTR bstrUrl
,
856 VARIANT
*pvarFactory
, long *pCookie
)
858 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
859 FIXME("(%p)->(%s %p %p)\n", This
, debugstr_w(bstrUrl
), pvarFactory
, pCookie
);
863 static HRESULT WINAPI
HTMLElement2_removeBehavior(IHTMLElement2
*iface
, long cookie
,
864 VARIANT_BOOL
*pfResult
)
866 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
867 FIXME("(%p)->(%ld %p)\n", This
, cookie
, pfResult
);
871 static HRESULT WINAPI
HTMLElement2_get_runtimeStyle(IHTMLElement2
*iface
, IHTMLStyle
**p
)
873 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
874 FIXME("(%p)->(%p)\n", This
, p
);
878 static HRESULT WINAPI
HTMLElement2_get_behaviorUrns(IHTMLElement2
*iface
, IDispatch
**p
)
880 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
881 FIXME("(%p)->(%p)\n", This
, p
);
885 static HRESULT WINAPI
HTMLElement2_put_tagUrn(IHTMLElement2
*iface
, BSTR v
)
887 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
888 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
892 static HRESULT WINAPI
HTMLElement2_get_tagUrn(IHTMLElement2
*iface
, BSTR
*p
)
894 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
895 FIXME("(%p)->(%p)\n", This
, p
);
899 static HRESULT WINAPI
HTMLElement2_put_onbeforeeditfocus(IHTMLElement2
*iface
, VARIANT vv
)
901 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
902 FIXME("(%p)->()\n", This
);
906 static HRESULT WINAPI
HTMLElement2_get_onbeforeeditfocus(IHTMLElement2
*iface
, VARIANT
*p
)
908 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
909 FIXME("(%p)->(%p)\n", This
, p
);
913 static HRESULT WINAPI
HTMLElement2_get_readyStateValue(IHTMLElement2
*iface
, long *p
)
915 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
916 FIXME("(%p)->(%p)\n", This
, p
);
920 static HRESULT WINAPI
HTMLElement2_getElementsByTagName(IHTMLElement2
*iface
, BSTR v
,
921 IHTMLElementCollection
**pelColl
)
923 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
924 nsIDOMNodeList
*nslist
;
928 TRACE("(%p)->(%s %p)\n", This
, debugstr_w(v
), pelColl
);
930 nsAString_Init(&tag_str
, v
);
931 nsres
= nsIDOMHTMLElement_GetElementsByTagName(This
->nselem
, &tag_str
, &nslist
);
932 nsAString_Finish(&tag_str
);
933 if(NS_FAILED(nsres
)) {
934 ERR("GetElementByTagName failed: %08x\n", nsres
);
938 *pelColl
= create_collection_from_nodelist(This
->node
.doc
, (IUnknown
*)HTMLELEM(This
), nslist
);
939 nsIDOMNodeList_Release(nslist
);
943 #undef HTMLELEM2_THIS
945 static const IHTMLElement2Vtbl HTMLElement2Vtbl
= {
946 HTMLElement2_QueryInterface
,
948 HTMLElement2_Release
,
949 HTMLElement2_GetTypeInfoCount
,
950 HTMLElement2_GetTypeInfo
,
951 HTMLElement2_GetIDsOfNames
,
953 HTMLElement2_get_scopeName
,
954 HTMLElement2_setCapture
,
955 HTMLElement2_releaseCapture
,
956 HTMLElement2_put_onlosecapture
,
957 HTMLElement2_get_onlosecapture
,
958 HTMLElement2_componentFromPoint
,
959 HTMLElement2_doScroll
,
960 HTMLElement2_put_onscroll
,
961 HTMLElement2_get_onscroll
,
962 HTMLElement2_put_ondrag
,
963 HTMLElement2_get_ondrag
,
964 HTMLElement2_put_ondragend
,
965 HTMLElement2_get_ondragend
,
966 HTMLElement2_put_ondragenter
,
967 HTMLElement2_get_ondragenter
,
968 HTMLElement2_put_ondragover
,
969 HTMLElement2_get_ondragover
,
970 HTMLElement2_put_ondragleave
,
971 HTMLElement2_get_ondragleave
,
972 HTMLElement2_put_ondrop
,
973 HTMLElement2_get_ondrop
,
974 HTMLElement2_put_onbeforecut
,
975 HTMLElement2_get_onbeforecut
,
976 HTMLElement2_put_oncut
,
977 HTMLElement2_get_oncut
,
978 HTMLElement2_put_onbeforecopy
,
979 HTMLElement2_get_onbeforecopy
,
980 HTMLElement2_put_oncopy
,
981 HTMLElement2_get_oncopy
,
982 HTMLElement2_put_onbeforepaste
,
983 HTMLElement2_get_onbeforepaste
,
984 HTMLElement2_put_onpaste
,
985 HTMLElement2_get_onpaste
,
986 HTMLElement2_get_currentStyle
,
987 HTMLElement2_put_onpropertychange
,
988 HTMLElement2_get_onpropertychange
,
989 HTMLElement2_getClientRects
,
990 HTMLElement2_getBoundingClientRect
,
991 HTMLElement2_setExpression
,
992 HTMLElement2_getExpression
,
993 HTMLElement2_removeExpression
,
994 HTMLElement2_put_tabIndex
,
995 HTMLElement2_get_tabIndex
,
997 HTMLElement2_put_accessKey
,
998 HTMLElement2_get_accessKey
,
999 HTMLElement2_put_onblur
,
1000 HTMLElement2_get_onblur
,
1001 HTMLElement2_put_onfocus
,
1002 HTMLElement2_get_onfocus
,
1003 HTMLElement2_put_onresize
,
1004 HTMLElement2_get_onresize
,
1006 HTMLElement2_addFilter
,
1007 HTMLElement2_removeFilter
,
1008 HTMLElement2_get_clientHeight
,
1009 HTMLElement2_get_clientWidth
,
1010 HTMLElement2_get_clientTop
,
1011 HTMLElement2_get_clientLeft
,
1012 HTMLElement2_attachEvent
,
1013 HTMLElement2_detachEvent
,
1014 HTMLElement2_get_readyState
,
1015 HTMLElement2_put_onreadystatechange
,
1016 HTMLElement2_get_onreadystatechange
,
1017 HTMLElement2_put_onrowsdelete
,
1018 HTMLElement2_get_onrowsdelete
,
1019 HTMLElement2_put_onrowsinserted
,
1020 HTMLElement2_get_onrowsinserted
,
1021 HTMLElement2_put_oncellchange
,
1022 HTMLElement2_get_oncellchange
,
1023 HTMLElement2_put_dir
,
1024 HTMLElement2_get_dir
,
1025 HTMLElement2_createControlRange
,
1026 HTMLElement2_get_scrollHeight
,
1027 HTMLElement2_get_scrollWidth
,
1028 HTMLElement2_put_scrollTop
,
1029 HTMLElement2_get_scrollTop
,
1030 HTMLElement2_put_scrollLeft
,
1031 HTMLElement2_get_scrollLeft
,
1032 HTMLElement2_clearAttributes
,
1033 HTMLElement2_mergeAttributes
,
1034 HTMLElement2_put_oncontextmenu
,
1035 HTMLElement2_get_oncontextmenu
,
1036 HTMLElement2_insertAdjecentElement
,
1037 HTMLElement2_applyElement
,
1038 HTMLElement2_getAdjecentText
,
1039 HTMLElement2_replaceAdjecentText
,
1040 HTMLElement2_get_canHandleChildren
,
1041 HTMLElement2_addBehavior
,
1042 HTMLElement2_removeBehavior
,
1043 HTMLElement2_get_runtimeStyle
,
1044 HTMLElement2_get_behaviorUrns
,
1045 HTMLElement2_put_tagUrn
,
1046 HTMLElement2_get_tagUrn
,
1047 HTMLElement2_put_onbeforeeditfocus
,
1048 HTMLElement2_get_onbeforeeditfocus
,
1049 HTMLElement2_get_readyStateValue
,
1050 HTMLElement2_getElementsByTagName
,
1053 void HTMLElement2_Init(HTMLElement
*This
)
1055 This
->lpHTMLElement2Vtbl
= &HTMLElement2Vtbl
;