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 nsIDOMNSHTMLElement
*nselem
;
720 TRACE("(%p)->(%p)\n", This
, p
);
722 nsres
= nsIDOMElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
723 if(NS_SUCCEEDED(nsres
)) {
724 nsres
= nsIDOMNSHTMLElement_GetScrollHeight(nselem
, &height
);
725 nsIDOMNSHTMLElement_Release(nselem
);
727 ERR("GetScrollHeight failed: %08x\n", nsres
);
729 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres
);
733 TRACE("*p = %ld\n", *p
);
738 static HRESULT WINAPI
HTMLElement2_get_scrollWidth(IHTMLElement2
*iface
, long *p
)
740 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
741 nsIDOMNSHTMLElement
*nselem
;
745 TRACE("(%p)->(%p)\n", This
, p
);
747 nsres
= nsIDOMElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
748 if(NS_SUCCEEDED(nsres
)) {
749 nsres
= nsIDOMNSHTMLElement_GetScrollWidth(nselem
, &width
);
750 nsIDOMNSHTMLElement_Release(nselem
);
752 ERR("GetScrollWidth failed: %08x\n", nsres
);
754 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres
);
758 TRACE("*p = %ld\n", *p
);
763 static HRESULT WINAPI
HTMLElement2_put_scrollTop(IHTMLElement2
*iface
, long v
)
765 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
766 nsIDOMNSHTMLElement
*nselem
;
769 TRACE("(%p)->(%ld)\n", This
, v
);
772 FIXME("NULL nselem\n");
776 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
777 if(NS_SUCCEEDED(nsres
)) {
778 nsIDOMNSHTMLElement_SetScrollTop(nselem
, v
);
779 nsIDOMNSHTMLElement_Release(nselem
);
781 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres
);
787 static HRESULT WINAPI
HTMLElement2_get_scrollTop(IHTMLElement2
*iface
, long *p
)
789 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
790 nsIDOMNSHTMLElement
*nselem
;
794 TRACE("(%p)->(%p)\n", This
, p
);
796 nsres
= nsIDOMElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
797 if(NS_SUCCEEDED(nsres
)) {
798 nsres
= nsIDOMNSHTMLElement_GetScrollTop(nselem
, &top
);
799 nsIDOMNSHTMLElement_Release(nselem
);
801 ERR("GetScrollTop failed: %08x\n", nsres
);
803 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres
);
807 TRACE("*p = %ld\n", *p
);
812 static HRESULT WINAPI
HTMLElement2_put_scrollLeft(IHTMLElement2
*iface
, long v
)
814 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
815 nsIDOMNSHTMLElement
*nselem
;
818 TRACE("(%p)->(%ld)\n", This
, v
);
821 FIXME("NULL nselem\n");
825 nsres
= nsIDOMHTMLElement_QueryInterface(This
->nselem
, &IID_nsIDOMNSHTMLElement
, (void**)&nselem
);
826 if(NS_SUCCEEDED(nsres
)) {
827 nsIDOMNSHTMLElement_SetScrollLeft(nselem
, v
);
828 nsIDOMNSHTMLElement_Release(nselem
);
830 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres
);
836 static HRESULT WINAPI
HTMLElement2_get_scrollLeft(IHTMLElement2
*iface
, long *p
)
838 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
839 FIXME("(%p)->(%p)\n", This
, p
);
843 static HRESULT WINAPI
HTMLElement2_clearAttributes(IHTMLElement2
*iface
)
845 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
846 FIXME("(%p)\n", This
);
850 static HRESULT WINAPI
HTMLElement2_mergeAttributes(IHTMLElement2
*iface
, IHTMLElement
*mergeThis
)
852 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
853 FIXME("(%p)->(%p)\n", This
, mergeThis
);
857 static HRESULT WINAPI
HTMLElement2_put_oncontextmenu(IHTMLElement2
*iface
, VARIANT v
)
859 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
860 FIXME("(%p)->()\n", This
);
864 static HRESULT WINAPI
HTMLElement2_get_oncontextmenu(IHTMLElement2
*iface
, VARIANT
*p
)
866 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
867 FIXME("(%p)->(%p)\n", This
, p
);
871 static HRESULT WINAPI
HTMLElement2_insertAdjecentElement(IHTMLElement2
*iface
, BSTR where
,
872 IHTMLElement
*insertedElement
, IHTMLElement
**inserted
)
874 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
875 FIXME("(%p)->(%s %p %p)\n", This
, debugstr_w(where
), insertedElement
, inserted
);
879 static HRESULT WINAPI
HTMLElement2_applyElement(IHTMLElement2
*iface
, IHTMLElement
*apply
,
880 BSTR where
, IHTMLElement
**applied
)
882 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
883 FIXME("(%p)->(%p %s %p)\n", This
, apply
, debugstr_w(where
), applied
);
887 static HRESULT WINAPI
HTMLElement2_getAdjecentText(IHTMLElement2
*iface
, BSTR where
, BSTR
*text
)
889 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
890 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(where
), text
);
894 static HRESULT WINAPI
HTMLElement2_replaceAdjecentText(IHTMLElement2
*iface
, BSTR where
,
895 BSTR newText
, BSTR
*oldText
)
897 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
898 FIXME("(%p)->(%s %s %p)\n", This
, debugstr_w(where
), debugstr_w(newText
), oldText
);
902 static HRESULT WINAPI
HTMLElement2_get_canHandleChildren(IHTMLElement2
*iface
, VARIANT_BOOL
*p
)
904 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
905 FIXME("(%p)->(%p)\n", This
, p
);
909 static HRESULT WINAPI
HTMLElement2_addBehavior(IHTMLElement2
*iface
, BSTR bstrUrl
,
910 VARIANT
*pvarFactory
, long *pCookie
)
912 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
913 FIXME("(%p)->(%s %p %p)\n", This
, debugstr_w(bstrUrl
), pvarFactory
, pCookie
);
917 static HRESULT WINAPI
HTMLElement2_removeBehavior(IHTMLElement2
*iface
, long cookie
,
918 VARIANT_BOOL
*pfResult
)
920 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
921 FIXME("(%p)->(%ld %p)\n", This
, cookie
, pfResult
);
925 static HRESULT WINAPI
HTMLElement2_get_runtimeStyle(IHTMLElement2
*iface
, IHTMLStyle
**p
)
927 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
928 FIXME("(%p)->(%p)\n", This
, p
);
932 static HRESULT WINAPI
HTMLElement2_get_behaviorUrns(IHTMLElement2
*iface
, IDispatch
**p
)
934 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
935 FIXME("(%p)->(%p)\n", This
, p
);
939 static HRESULT WINAPI
HTMLElement2_put_tagUrn(IHTMLElement2
*iface
, BSTR v
)
941 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
942 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
946 static HRESULT WINAPI
HTMLElement2_get_tagUrn(IHTMLElement2
*iface
, BSTR
*p
)
948 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
949 FIXME("(%p)->(%p)\n", This
, p
);
953 static HRESULT WINAPI
HTMLElement2_put_onbeforeeditfocus(IHTMLElement2
*iface
, VARIANT vv
)
955 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
956 FIXME("(%p)->()\n", This
);
960 static HRESULT WINAPI
HTMLElement2_get_onbeforeeditfocus(IHTMLElement2
*iface
, VARIANT
*p
)
962 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
963 FIXME("(%p)->(%p)\n", This
, p
);
967 static HRESULT WINAPI
HTMLElement2_get_readyStateValue(IHTMLElement2
*iface
, long *p
)
969 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
970 FIXME("(%p)->(%p)\n", This
, p
);
974 static HRESULT WINAPI
HTMLElement2_getElementsByTagName(IHTMLElement2
*iface
, BSTR v
,
975 IHTMLElementCollection
**pelColl
)
977 HTMLElement
*This
= HTMLELEM2_THIS(iface
);
978 nsIDOMNodeList
*nslist
;
982 TRACE("(%p)->(%s %p)\n", This
, debugstr_w(v
), pelColl
);
984 nsAString_Init(&tag_str
, v
);
985 nsres
= nsIDOMHTMLElement_GetElementsByTagName(This
->nselem
, &tag_str
, &nslist
);
986 nsAString_Finish(&tag_str
);
987 if(NS_FAILED(nsres
)) {
988 ERR("GetElementByTagName failed: %08x\n", nsres
);
992 *pelColl
= create_collection_from_nodelist(This
->node
.doc
, (IUnknown
*)HTMLELEM(This
), nslist
);
993 nsIDOMNodeList_Release(nslist
);
997 #undef HTMLELEM2_THIS
999 static const IHTMLElement2Vtbl HTMLElement2Vtbl
= {
1000 HTMLElement2_QueryInterface
,
1001 HTMLElement2_AddRef
,
1002 HTMLElement2_Release
,
1003 HTMLElement2_GetTypeInfoCount
,
1004 HTMLElement2_GetTypeInfo
,
1005 HTMLElement2_GetIDsOfNames
,
1006 HTMLElement2_Invoke
,
1007 HTMLElement2_get_scopeName
,
1008 HTMLElement2_setCapture
,
1009 HTMLElement2_releaseCapture
,
1010 HTMLElement2_put_onlosecapture
,
1011 HTMLElement2_get_onlosecapture
,
1012 HTMLElement2_componentFromPoint
,
1013 HTMLElement2_doScroll
,
1014 HTMLElement2_put_onscroll
,
1015 HTMLElement2_get_onscroll
,
1016 HTMLElement2_put_ondrag
,
1017 HTMLElement2_get_ondrag
,
1018 HTMLElement2_put_ondragend
,
1019 HTMLElement2_get_ondragend
,
1020 HTMLElement2_put_ondragenter
,
1021 HTMLElement2_get_ondragenter
,
1022 HTMLElement2_put_ondragover
,
1023 HTMLElement2_get_ondragover
,
1024 HTMLElement2_put_ondragleave
,
1025 HTMLElement2_get_ondragleave
,
1026 HTMLElement2_put_ondrop
,
1027 HTMLElement2_get_ondrop
,
1028 HTMLElement2_put_onbeforecut
,
1029 HTMLElement2_get_onbeforecut
,
1030 HTMLElement2_put_oncut
,
1031 HTMLElement2_get_oncut
,
1032 HTMLElement2_put_onbeforecopy
,
1033 HTMLElement2_get_onbeforecopy
,
1034 HTMLElement2_put_oncopy
,
1035 HTMLElement2_get_oncopy
,
1036 HTMLElement2_put_onbeforepaste
,
1037 HTMLElement2_get_onbeforepaste
,
1038 HTMLElement2_put_onpaste
,
1039 HTMLElement2_get_onpaste
,
1040 HTMLElement2_get_currentStyle
,
1041 HTMLElement2_put_onpropertychange
,
1042 HTMLElement2_get_onpropertychange
,
1043 HTMLElement2_getClientRects
,
1044 HTMLElement2_getBoundingClientRect
,
1045 HTMLElement2_setExpression
,
1046 HTMLElement2_getExpression
,
1047 HTMLElement2_removeExpression
,
1048 HTMLElement2_put_tabIndex
,
1049 HTMLElement2_get_tabIndex
,
1051 HTMLElement2_put_accessKey
,
1052 HTMLElement2_get_accessKey
,
1053 HTMLElement2_put_onblur
,
1054 HTMLElement2_get_onblur
,
1055 HTMLElement2_put_onfocus
,
1056 HTMLElement2_get_onfocus
,
1057 HTMLElement2_put_onresize
,
1058 HTMLElement2_get_onresize
,
1060 HTMLElement2_addFilter
,
1061 HTMLElement2_removeFilter
,
1062 HTMLElement2_get_clientHeight
,
1063 HTMLElement2_get_clientWidth
,
1064 HTMLElement2_get_clientTop
,
1065 HTMLElement2_get_clientLeft
,
1066 HTMLElement2_attachEvent
,
1067 HTMLElement2_detachEvent
,
1068 HTMLElement2_get_readyState
,
1069 HTMLElement2_put_onreadystatechange
,
1070 HTMLElement2_get_onreadystatechange
,
1071 HTMLElement2_put_onrowsdelete
,
1072 HTMLElement2_get_onrowsdelete
,
1073 HTMLElement2_put_onrowsinserted
,
1074 HTMLElement2_get_onrowsinserted
,
1075 HTMLElement2_put_oncellchange
,
1076 HTMLElement2_get_oncellchange
,
1077 HTMLElement2_put_dir
,
1078 HTMLElement2_get_dir
,
1079 HTMLElement2_createControlRange
,
1080 HTMLElement2_get_scrollHeight
,
1081 HTMLElement2_get_scrollWidth
,
1082 HTMLElement2_put_scrollTop
,
1083 HTMLElement2_get_scrollTop
,
1084 HTMLElement2_put_scrollLeft
,
1085 HTMLElement2_get_scrollLeft
,
1086 HTMLElement2_clearAttributes
,
1087 HTMLElement2_mergeAttributes
,
1088 HTMLElement2_put_oncontextmenu
,
1089 HTMLElement2_get_oncontextmenu
,
1090 HTMLElement2_insertAdjecentElement
,
1091 HTMLElement2_applyElement
,
1092 HTMLElement2_getAdjecentText
,
1093 HTMLElement2_replaceAdjecentText
,
1094 HTMLElement2_get_canHandleChildren
,
1095 HTMLElement2_addBehavior
,
1096 HTMLElement2_removeBehavior
,
1097 HTMLElement2_get_runtimeStyle
,
1098 HTMLElement2_get_behaviorUrns
,
1099 HTMLElement2_put_tagUrn
,
1100 HTMLElement2_get_tagUrn
,
1101 HTMLElement2_put_onbeforeeditfocus
,
1102 HTMLElement2_get_onbeforeeditfocus
,
1103 HTMLElement2_get_readyStateValue
,
1104 HTMLElement2_getElementsByTagName
,
1107 void HTMLElement2_Init(HTMLElement
*This
)
1109 This
->lpHTMLElement2Vtbl
= &HTMLElement2Vtbl
;