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);
322 TRACE("(%p)->(%p)\n", This, p);
324 return HTMLCurrentStyle_Create(This, p);
327 static HRESULT WINAPI HTMLElement2_put_onpropertychange(IHTMLElement2 *iface, VARIANT v)
329 HTMLElement *This = HTMLELEM2_THIS(iface);
330 FIXME("(%p)->()\n", This);
334 static HRESULT WINAPI HTMLElement2_get_onpropertychange(IHTMLElement2 *iface, VARIANT *p)
336 HTMLElement *This = HTMLELEM2_THIS(iface);
337 FIXME("(%p)->(%p)\n", This, p);
341 static HRESULT WINAPI HTMLElement2_getClientRects(IHTMLElement2 *iface, IHTMLRectCollection **pRectCol)
343 HTMLElement *This = HTMLELEM2_THIS(iface);
344 FIXME("(%p)->(%p)\n", This, pRectCol);
348 static HRESULT WINAPI HTMLElement2_getBoundingClientRect(IHTMLElement2 *iface, IHTMLRect **pRect)
350 HTMLElement *This = HTMLELEM2_THIS(iface);
351 FIXME("(%p)->(%p)\n", This, pRect);
355 static HRESULT WINAPI HTMLElement2_setExpression(IHTMLElement2 *iface, BSTR propname,
356 BSTR expression, BSTR language)
358 HTMLElement *This = HTMLELEM2_THIS(iface);
359 FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(propname), debugstr_w(expression),
360 debugstr_w(language));
364 static HRESULT WINAPI HTMLElement2_getExpression(IHTMLElement2 *iface, BSTR propname,
367 HTMLElement *This = HTMLELEM2_THIS(iface);
368 FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), expression);
372 static HRESULT WINAPI HTMLElement2_removeExpression(IHTMLElement2 *iface, BSTR propname,
373 VARIANT_BOOL *pfSuccess)
375 HTMLElement *This = HTMLELEM2_THIS(iface);
376 FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), pfSuccess);
380 static HRESULT WINAPI HTMLElement2_put_tabIndex(IHTMLElement2 *iface, short v)
382 HTMLElement *This = HTMLELEM2_THIS(iface);
383 nsIDOMNSHTMLElement *nselem;
386 TRACE("(%p)->(%d)\n", This, v);
388 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
389 if(NS_FAILED(nsres)) {
390 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
394 nsres = nsIDOMNSHTMLElement_SetTabIndex(nselem, v);
395 nsIDOMNSHTMLElement_Release(nselem);
397 ERR("GetTabIndex failed: %08x\n", nsres);
402 static HRESULT WINAPI HTMLElement2_get_tabIndex(IHTMLElement2 *iface, short *p)
404 HTMLElement *This = HTMLELEM2_THIS(iface);
405 nsIDOMNSHTMLElement *nselem;
409 TRACE("(%p)->(%p)\n", This, p);
411 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
412 if(NS_FAILED(nsres)) {
413 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
417 nsres = nsIDOMNSHTMLElement_GetTabIndex(nselem, &index);
418 nsIDOMNSHTMLElement_Release(nselem);
419 if(NS_FAILED(nsres)) {
420 ERR("GetTabIndex failed: %08x\n", nsres);
428 static HRESULT WINAPI HTMLElement2_focus(IHTMLElement2 *iface)
430 HTMLElement *This = HTMLELEM2_THIS(iface);
431 nsIDOMNSHTMLElement *nselem;
434 TRACE("(%p)\n", This);
436 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
437 if(NS_SUCCEEDED(nsres)) {
438 nsIDOMNSHTMLElement_focus(nselem);
439 nsIDOMNSHTMLElement_Release(nselem);
441 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
447 static HRESULT WINAPI HTMLElement2_put_accessKey(IHTMLElement2 *iface, BSTR v)
449 HTMLElement *This = HTMLELEM2_THIS(iface);
452 static WCHAR accessKeyW[] = {'a','c','c','e','s','s','K','e','y',0};
454 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
456 V_VT(&var) = VT_BSTR;
458 return IHTMLElement_setAttribute(HTMLELEM(This), accessKeyW, var, 0);
461 static HRESULT WINAPI HTMLElement2_get_accessKey(IHTMLElement2 *iface, BSTR *p)
463 HTMLElement *This = HTMLELEM2_THIS(iface);
464 FIXME("(%p)->(%p)\n", This, p);
468 static HRESULT WINAPI HTMLElement2_put_onblur(IHTMLElement2 *iface, VARIANT v)
470 HTMLElement *This = HTMLELEM2_THIS(iface);
471 FIXME("(%p)->()\n", This);
475 static HRESULT WINAPI HTMLElement2_get_onblur(IHTMLElement2 *iface, VARIANT *p)
477 HTMLElement *This = HTMLELEM2_THIS(iface);
478 FIXME("(%p)->(%p)\n", This, p);
482 static HRESULT WINAPI HTMLElement2_put_onfocus(IHTMLElement2 *iface, VARIANT v)
484 HTMLElement *This = HTMLELEM2_THIS(iface);
485 FIXME("(%p)->()\n", This);
489 static HRESULT WINAPI HTMLElement2_get_onfocus(IHTMLElement2 *iface, VARIANT *p)
491 HTMLElement *This = HTMLELEM2_THIS(iface);
492 FIXME("(%p)->(%p)\n", This, p);
496 static HRESULT WINAPI HTMLElement2_put_onresize(IHTMLElement2 *iface, VARIANT v)
498 HTMLElement *This = HTMLELEM2_THIS(iface);
499 FIXME("(%p)->()\n", This);
503 static HRESULT WINAPI HTMLElement2_get_onresize(IHTMLElement2 *iface, VARIANT *p)
505 HTMLElement *This = HTMLELEM2_THIS(iface);
506 FIXME("(%p)->(%p)\n", This, p);
510 static HRESULT WINAPI HTMLElement2_blur(IHTMLElement2 *iface)
512 HTMLElement *This = HTMLELEM2_THIS(iface);
513 FIXME("(%p)\n", This);
517 static HRESULT WINAPI HTMLElement2_addFilter(IHTMLElement2 *iface, IUnknown *pUnk)
519 HTMLElement *This = HTMLELEM2_THIS(iface);
520 FIXME("(%p)->(%p)\n", This, pUnk);
524 static HRESULT WINAPI HTMLElement2_removeFilter(IHTMLElement2 *iface, IUnknown *pUnk)
526 HTMLElement *This = HTMLELEM2_THIS(iface);
527 FIXME("(%p)->(%p)\n", This, pUnk);
531 static HRESULT WINAPI HTMLElement2_get_clientHeight(IHTMLElement2 *iface, long *p)
533 HTMLElement *This = HTMLELEM2_THIS(iface);
534 nsIDOMNSHTMLElement *nselem;
538 TRACE("(%p)->(%p)\n", This, p);
540 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
541 if(NS_SUCCEEDED(nsres)) {
542 nsIDOMNSHTMLElement_GetClientHeight(nselem, &height);
543 nsIDOMNSHTMLElement_Release(nselem);
545 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
552 static HRESULT WINAPI HTMLElement2_get_clientWidth(IHTMLElement2 *iface, long *p)
554 HTMLElement *This = HTMLELEM2_THIS(iface);
555 nsIDOMNSHTMLElement *nselem;
559 TRACE("(%p)->(%p)\n", This, p);
561 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
562 if(NS_SUCCEEDED(nsres)) {
563 nsIDOMNSHTMLElement_GetClientWidth(nselem, &width);
564 nsIDOMNSHTMLElement_Release(nselem);
566 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
573 static HRESULT WINAPI HTMLElement2_get_clientTop(IHTMLElement2 *iface, long *p)
575 HTMLElement *This = HTMLELEM2_THIS(iface);
576 FIXME("(%p)->(%p)\n", This, p);
580 static HRESULT WINAPI HTMLElement2_get_clientLeft(IHTMLElement2 *iface, long *p)
582 HTMLElement *This = HTMLELEM2_THIS(iface);
583 FIXME("(%p)->(%p)\n", This, p);
587 static HRESULT WINAPI HTMLElement2_attachEvent(IHTMLElement2 *iface, BSTR event,
588 IDispatch *pDisp, VARIANT_BOOL *pfResult)
590 HTMLElement *This = HTMLELEM2_THIS(iface);
591 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(event), pDisp, pfResult);
595 static HRESULT WINAPI HTMLElement2_detachEvent(IHTMLElement2 *iface, BSTR event, IDispatch *pDisp)
597 HTMLElement *This = HTMLELEM2_THIS(iface);
598 FIXME("(%p)->(%s %p)\n", This, debugstr_w(event), pDisp);
602 static HRESULT WINAPI HTMLElement2_get_readyState(IHTMLElement2 *iface, VARIANT *p)
604 HTMLElement *This = HTMLELEM2_THIS(iface);
605 FIXME("(%p)->(%p)\n", This, p);
609 static HRESULT WINAPI HTMLElement2_put_onreadystatechange(IHTMLElement2 *iface, VARIANT v)
611 HTMLElement *This = HTMLELEM2_THIS(iface);
612 FIXME("(%p)->()\n", This);
616 static HRESULT WINAPI HTMLElement2_get_onreadystatechange(IHTMLElement2 *iface, VARIANT *p)
618 HTMLElement *This = HTMLELEM2_THIS(iface);
619 FIXME("(%p)->(%p)\n", This, p);
623 static HRESULT WINAPI HTMLElement2_put_onrowsdelete(IHTMLElement2 *iface, VARIANT v)
625 HTMLElement *This = HTMLELEM2_THIS(iface);
626 FIXME("(%p)->()\n", This);
630 static HRESULT WINAPI HTMLElement2_get_onrowsdelete(IHTMLElement2 *iface, VARIANT *p)
632 HTMLElement *This = HTMLELEM2_THIS(iface);
633 FIXME("(%p)->(%p)\n", This, p);
637 static HRESULT WINAPI HTMLElement2_put_onrowsinserted(IHTMLElement2 *iface, VARIANT v)
639 HTMLElement *This = HTMLELEM2_THIS(iface);
640 FIXME("(%p)->()\n", This);
644 static HRESULT WINAPI HTMLElement2_get_onrowsinserted(IHTMLElement2 *iface, VARIANT *p)
646 HTMLElement *This = HTMLELEM2_THIS(iface);
647 FIXME("(%p)->(%p)\n", This, p);
651 static HRESULT WINAPI HTMLElement2_put_oncellchange(IHTMLElement2 *iface, VARIANT v)
653 HTMLElement *This = HTMLELEM2_THIS(iface);
654 FIXME("(%p)->()\n", This);
658 static HRESULT WINAPI HTMLElement2_get_oncellchange(IHTMLElement2 *iface, VARIANT *p)
660 HTMLElement *This = HTMLELEM2_THIS(iface);
661 FIXME("(%p)->(%p)\n", This, p);
665 static HRESULT WINAPI HTMLElement2_put_dir(IHTMLElement2 *iface, BSTR v)
667 HTMLElement *This = HTMLELEM2_THIS(iface);
668 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
672 static HRESULT WINAPI HTMLElement2_get_dir(IHTMLElement2 *iface, BSTR *p)
674 HTMLElement *This = HTMLELEM2_THIS(iface);
676 TRACE("(%p)->(%p)\n", This, p);
684 nsAString_Init(&dir_str, NULL);
686 nsres = nsIDOMHTMLElement_GetDir(This->nselem, &dir_str);
687 if(NS_SUCCEEDED(nsres)) {
688 const PRUnichar *dir;
689 nsAString_GetData(&dir_str, &dir);
691 *p = SysAllocString(dir);
693 ERR("GetDir failed: %08x\n", nsres);
696 nsAString_Finish(&dir_str);
699 TRACE("ret %s\n", debugstr_w(*p));
703 static HRESULT WINAPI HTMLElement2_createControlRange(IHTMLElement2 *iface, IDispatch **range)
705 HTMLElement *This = HTMLELEM2_THIS(iface);
706 FIXME("(%p)->(%p)\n", This, range);
710 static HRESULT WINAPI HTMLElement2_get_scrollHeight(IHTMLElement2 *iface, long *p)
712 HTMLElement *This = HTMLELEM2_THIS(iface);
713 nsIDOMNSHTMLElement *nselem;
717 TRACE("(%p)->(%p)\n", This, p);
719 nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
720 if(NS_SUCCEEDED(nsres)) {
721 nsres = nsIDOMNSHTMLElement_GetScrollHeight(nselem, &height);
722 nsIDOMNSHTMLElement_Release(nselem);
724 ERR("GetScrollHeight failed: %08x\n", nsres);
726 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
730 TRACE("*p = %ld\n", *p);
735 static HRESULT WINAPI HTMLElement2_get_scrollWidth(IHTMLElement2 *iface, long *p)
737 HTMLElement *This = HTMLELEM2_THIS(iface);
738 nsIDOMNSHTMLElement *nselem;
742 TRACE("(%p)->(%p)\n", This, p);
744 nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
745 if(NS_SUCCEEDED(nsres)) {
746 nsres = nsIDOMNSHTMLElement_GetScrollWidth(nselem, &width);
747 nsIDOMNSHTMLElement_Release(nselem);
749 ERR("GetScrollWidth failed: %08x\n", nsres);
751 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
755 TRACE("*p = %ld\n", *p);
760 static HRESULT WINAPI HTMLElement2_put_scrollTop(IHTMLElement2 *iface, long v)
762 HTMLElement *This = HTMLELEM2_THIS(iface);
763 nsIDOMNSHTMLElement *nselem;
766 TRACE("(%p)->(%ld)\n", This, v);
769 FIXME("NULL nselem\n");
773 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
774 if(NS_SUCCEEDED(nsres)) {
775 nsIDOMNSHTMLElement_SetScrollTop(nselem, v);
776 nsIDOMNSHTMLElement_Release(nselem);
778 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
784 static HRESULT WINAPI HTMLElement2_get_scrollTop(IHTMLElement2 *iface, long *p)
786 HTMLElement *This = HTMLELEM2_THIS(iface);
787 nsIDOMNSHTMLElement *nselem;
791 TRACE("(%p)->(%p)\n", This, p);
793 nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
794 if(NS_SUCCEEDED(nsres)) {
795 nsres = nsIDOMNSHTMLElement_GetScrollTop(nselem, &top);
796 nsIDOMNSHTMLElement_Release(nselem);
798 ERR("GetScrollTop failed: %08x\n", nsres);
800 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
804 TRACE("*p = %ld\n", *p);
809 static HRESULT WINAPI HTMLElement2_put_scrollLeft(IHTMLElement2 *iface, long v)
811 HTMLElement *This = HTMLELEM2_THIS(iface);
812 nsIDOMNSHTMLElement *nselem;
815 TRACE("(%p)->(%ld)\n", This, v);
818 FIXME("NULL nselem\n");
822 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
823 if(NS_SUCCEEDED(nsres)) {
824 nsIDOMNSHTMLElement_SetScrollLeft(nselem, v);
825 nsIDOMNSHTMLElement_Release(nselem);
827 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
833 static HRESULT WINAPI HTMLElement2_get_scrollLeft(IHTMLElement2 *iface, long *p)
835 HTMLElement *This = HTMLELEM2_THIS(iface);
836 nsIDOMNSHTMLElement *nselem;
840 TRACE("(%p)->(%p)\n", This, p);
847 FIXME("NULL nselem\n");
851 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
852 if(NS_SUCCEEDED(nsres))
854 nsres = nsIDOMNSHTMLElement_GetScrollLeft(nselem, &left);
855 nsIDOMNSHTMLElement_Release(nselem);
861 TRACE("*p = %ld\n", *p);
866 static HRESULT WINAPI HTMLElement2_clearAttributes(IHTMLElement2 *iface)
868 HTMLElement *This = HTMLELEM2_THIS(iface);
869 FIXME("(%p)\n", This);
873 static HRESULT WINAPI HTMLElement2_mergeAttributes(IHTMLElement2 *iface, IHTMLElement *mergeThis)
875 HTMLElement *This = HTMLELEM2_THIS(iface);
876 FIXME("(%p)->(%p)\n", This, mergeThis);
880 static HRESULT WINAPI HTMLElement2_put_oncontextmenu(IHTMLElement2 *iface, VARIANT v)
882 HTMLElement *This = HTMLELEM2_THIS(iface);
883 FIXME("(%p)->()\n", This);
887 static HRESULT WINAPI HTMLElement2_get_oncontextmenu(IHTMLElement2 *iface, VARIANT *p)
889 HTMLElement *This = HTMLELEM2_THIS(iface);
890 FIXME("(%p)->(%p)\n", This, p);
894 static HRESULT WINAPI HTMLElement2_insertAdjecentElement(IHTMLElement2 *iface, BSTR where,
895 IHTMLElement *insertedElement, IHTMLElement **inserted)
897 HTMLElement *This = HTMLELEM2_THIS(iface);
898 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(where), insertedElement, inserted);
902 static HRESULT WINAPI HTMLElement2_applyElement(IHTMLElement2 *iface, IHTMLElement *apply,
903 BSTR where, IHTMLElement **applied)
905 HTMLElement *This = HTMLELEM2_THIS(iface);
906 FIXME("(%p)->(%p %s %p)\n", This, apply, debugstr_w(where), applied);
910 static HRESULT WINAPI HTMLElement2_getAdjecentText(IHTMLElement2 *iface, BSTR where, BSTR *text)
912 HTMLElement *This = HTMLELEM2_THIS(iface);
913 FIXME("(%p)->(%s %p)\n", This, debugstr_w(where), text);
917 static HRESULT WINAPI HTMLElement2_replaceAdjecentText(IHTMLElement2 *iface, BSTR where,
918 BSTR newText, BSTR *oldText)
920 HTMLElement *This = HTMLELEM2_THIS(iface);
921 FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(where), debugstr_w(newText), oldText);
925 static HRESULT WINAPI HTMLElement2_get_canHandleChildren(IHTMLElement2 *iface, VARIANT_BOOL *p)
927 HTMLElement *This = HTMLELEM2_THIS(iface);
928 FIXME("(%p)->(%p)\n", This, p);
932 static HRESULT WINAPI HTMLElement2_addBehavior(IHTMLElement2 *iface, BSTR bstrUrl,
933 VARIANT *pvarFactory, long *pCookie)
935 HTMLElement *This = HTMLELEM2_THIS(iface);
936 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(bstrUrl), pvarFactory, pCookie);
940 static HRESULT WINAPI HTMLElement2_removeBehavior(IHTMLElement2 *iface, long cookie,
941 VARIANT_BOOL *pfResult)
943 HTMLElement *This = HTMLELEM2_THIS(iface);
944 FIXME("(%p)->(%ld %p)\n", This, cookie, pfResult);
948 static HRESULT WINAPI HTMLElement2_get_runtimeStyle(IHTMLElement2 *iface, IHTMLStyle **p)
950 HTMLElement *This = HTMLELEM2_THIS(iface);
951 FIXME("(%p)->(%p)\n", This, p);
955 static HRESULT WINAPI HTMLElement2_get_behaviorUrns(IHTMLElement2 *iface, IDispatch **p)
957 HTMLElement *This = HTMLELEM2_THIS(iface);
958 FIXME("(%p)->(%p)\n", This, p);
962 static HRESULT WINAPI HTMLElement2_put_tagUrn(IHTMLElement2 *iface, BSTR v)
964 HTMLElement *This = HTMLELEM2_THIS(iface);
965 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
969 static HRESULT WINAPI HTMLElement2_get_tagUrn(IHTMLElement2 *iface, BSTR *p)
971 HTMLElement *This = HTMLELEM2_THIS(iface);
972 FIXME("(%p)->(%p)\n", This, p);
976 static HRESULT WINAPI HTMLElement2_put_onbeforeeditfocus(IHTMLElement2 *iface, VARIANT vv)
978 HTMLElement *This = HTMLELEM2_THIS(iface);
979 FIXME("(%p)->()\n", This);
983 static HRESULT WINAPI HTMLElement2_get_onbeforeeditfocus(IHTMLElement2 *iface, VARIANT *p)
985 HTMLElement *This = HTMLELEM2_THIS(iface);
986 FIXME("(%p)->(%p)\n", This, p);
990 static HRESULT WINAPI HTMLElement2_get_readyStateValue(IHTMLElement2 *iface, long *p)
992 HTMLElement *This = HTMLELEM2_THIS(iface);
993 FIXME("(%p)->(%p)\n", This, p);
997 static HRESULT WINAPI HTMLElement2_getElementsByTagName(IHTMLElement2 *iface, BSTR v,
998 IHTMLElementCollection **pelColl)
1000 HTMLElement *This = HTMLELEM2_THIS(iface);
1001 nsIDOMNodeList *nslist;
1005 TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), pelColl);
1007 nsAString_Init(&tag_str, v);
1008 nsres = nsIDOMHTMLElement_GetElementsByTagName(This->nselem, &tag_str, &nslist);
1009 nsAString_Finish(&tag_str);
1010 if(NS_FAILED(nsres)) {
1011 ERR("GetElementByTagName failed: %08x\n", nsres);
1015 *pelColl = create_collection_from_nodelist(This->node.doc, (IUnknown*)HTMLELEM(This), nslist);
1016 nsIDOMNodeList_Release(nslist);
1020 #undef HTMLELEM2_THIS
1022 static const IHTMLElement2Vtbl HTMLElement2Vtbl = {
1023 HTMLElement2_QueryInterface,
1024 HTMLElement2_AddRef,
1025 HTMLElement2_Release,
1026 HTMLElement2_GetTypeInfoCount,
1027 HTMLElement2_GetTypeInfo,
1028 HTMLElement2_GetIDsOfNames,
1029 HTMLElement2_Invoke,
1030 HTMLElement2_get_scopeName,
1031 HTMLElement2_setCapture,
1032 HTMLElement2_releaseCapture,
1033 HTMLElement2_put_onlosecapture,
1034 HTMLElement2_get_onlosecapture,
1035 HTMLElement2_componentFromPoint,
1036 HTMLElement2_doScroll,
1037 HTMLElement2_put_onscroll,
1038 HTMLElement2_get_onscroll,
1039 HTMLElement2_put_ondrag,
1040 HTMLElement2_get_ondrag,
1041 HTMLElement2_put_ondragend,
1042 HTMLElement2_get_ondragend,
1043 HTMLElement2_put_ondragenter,
1044 HTMLElement2_get_ondragenter,
1045 HTMLElement2_put_ondragover,
1046 HTMLElement2_get_ondragover,
1047 HTMLElement2_put_ondragleave,
1048 HTMLElement2_get_ondragleave,
1049 HTMLElement2_put_ondrop,
1050 HTMLElement2_get_ondrop,
1051 HTMLElement2_put_onbeforecut,
1052 HTMLElement2_get_onbeforecut,
1053 HTMLElement2_put_oncut,
1054 HTMLElement2_get_oncut,
1055 HTMLElement2_put_onbeforecopy,
1056 HTMLElement2_get_onbeforecopy,
1057 HTMLElement2_put_oncopy,
1058 HTMLElement2_get_oncopy,
1059 HTMLElement2_put_onbeforepaste,
1060 HTMLElement2_get_onbeforepaste,
1061 HTMLElement2_put_onpaste,
1062 HTMLElement2_get_onpaste,
1063 HTMLElement2_get_currentStyle,
1064 HTMLElement2_put_onpropertychange,
1065 HTMLElement2_get_onpropertychange,
1066 HTMLElement2_getClientRects,
1067 HTMLElement2_getBoundingClientRect,
1068 HTMLElement2_setExpression,
1069 HTMLElement2_getExpression,
1070 HTMLElement2_removeExpression,
1071 HTMLElement2_put_tabIndex,
1072 HTMLElement2_get_tabIndex,
1074 HTMLElement2_put_accessKey,
1075 HTMLElement2_get_accessKey,
1076 HTMLElement2_put_onblur,
1077 HTMLElement2_get_onblur,
1078 HTMLElement2_put_onfocus,
1079 HTMLElement2_get_onfocus,
1080 HTMLElement2_put_onresize,
1081 HTMLElement2_get_onresize,
1083 HTMLElement2_addFilter,
1084 HTMLElement2_removeFilter,
1085 HTMLElement2_get_clientHeight,
1086 HTMLElement2_get_clientWidth,
1087 HTMLElement2_get_clientTop,
1088 HTMLElement2_get_clientLeft,
1089 HTMLElement2_attachEvent,
1090 HTMLElement2_detachEvent,
1091 HTMLElement2_get_readyState,
1092 HTMLElement2_put_onreadystatechange,
1093 HTMLElement2_get_onreadystatechange,
1094 HTMLElement2_put_onrowsdelete,
1095 HTMLElement2_get_onrowsdelete,
1096 HTMLElement2_put_onrowsinserted,
1097 HTMLElement2_get_onrowsinserted,
1098 HTMLElement2_put_oncellchange,
1099 HTMLElement2_get_oncellchange,
1100 HTMLElement2_put_dir,
1101 HTMLElement2_get_dir,
1102 HTMLElement2_createControlRange,
1103 HTMLElement2_get_scrollHeight,
1104 HTMLElement2_get_scrollWidth,
1105 HTMLElement2_put_scrollTop,
1106 HTMLElement2_get_scrollTop,
1107 HTMLElement2_put_scrollLeft,
1108 HTMLElement2_get_scrollLeft,
1109 HTMLElement2_clearAttributes,
1110 HTMLElement2_mergeAttributes,
1111 HTMLElement2_put_oncontextmenu,
1112 HTMLElement2_get_oncontextmenu,
1113 HTMLElement2_insertAdjecentElement,
1114 HTMLElement2_applyElement,
1115 HTMLElement2_getAdjecentText,
1116 HTMLElement2_replaceAdjecentText,
1117 HTMLElement2_get_canHandleChildren,
1118 HTMLElement2_addBehavior,
1119 HTMLElement2_removeBehavior,
1120 HTMLElement2_get_runtimeStyle,
1121 HTMLElement2_get_behaviorUrns,
1122 HTMLElement2_put_tagUrn,
1123 HTMLElement2_get_tagUrn,
1124 HTMLElement2_put_onbeforeeditfocus,
1125 HTMLElement2_get_onbeforeeditfocus,
1126 HTMLElement2_get_readyStateValue,
1127 HTMLElement2_getElementsByTagName,
1130 void HTMLElement2_Init(HTMLElement *This)
1132 This->lpHTMLElement2Vtbl = &HTMLElement2Vtbl;