d3dcompiler: Implement D3DGetInputSignatureBlob().
[wine/multimedia.git] / dlls / mshtml / htmlelem2.c
blob0c2072361b0c3fb5721ceaae82b47b56ac3a0cfd
1 /*
2 * Copyright 2006-2010 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include <stdarg.h>
20 #include <math.h>
22 #define COBJMACROS
24 #include "windef.h"
25 #include "winbase.h"
26 #include "winuser.h"
27 #include "ole2.h"
29 #include "wine/debug.h"
30 #include "wine/unicode.h"
32 #include "mshtml_private.h"
33 #include "htmlevent.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
37 typedef struct {
38 DispatchEx dispex;
39 const IHTMLRectVtbl *lpIHTMLRectVtbl;
41 LONG ref;
43 nsIDOMClientRect *nsrect;
44 } HTMLRect;
46 #define HTMLRECT(x) ((IHTMLRect*) &(x)->lpIHTMLRectVtbl)
48 #define HTMLRECT_THIS(iface) DEFINE_THIS(HTMLRect, IHTMLRect, iface)
50 static HRESULT WINAPI HTMLRect_QueryInterface(IHTMLRect *iface, REFIID riid, void **ppv)
52 HTMLRect *This = HTMLRECT_THIS(iface);
54 if(IsEqualGUID(&IID_IUnknown, riid)) {
55 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
56 *ppv = HTMLRECT(This);
57 }else if(IsEqualGUID(&IID_IHTMLRect, riid)) {
58 TRACE("(%p)->(IID_IHTMLRect %p)\n", This, ppv);
59 *ppv = HTMLRECT(This);
60 }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
61 return *ppv ? S_OK : E_NOINTERFACE;
62 }else {
63 FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
64 *ppv = NULL;
65 return E_NOINTERFACE;
68 IUnknown_AddRef((IUnknown*)*ppv);
69 return S_OK;
72 static ULONG WINAPI HTMLRect_AddRef(IHTMLRect *iface)
74 HTMLRect *This = HTMLRECT_THIS(iface);
75 LONG ref = InterlockedIncrement(&This->ref);
77 TRACE("(%p) ref=%d\n", This, ref);
79 return ref;
82 static ULONG WINAPI HTMLRect_Release(IHTMLRect *iface)
84 HTMLRect *This = HTMLRECT_THIS(iface);
85 LONG ref = InterlockedDecrement(&This->ref);
87 TRACE("(%p) ref=%d\n", This, ref);
89 if(!ref) {
90 if(This->nsrect)
91 nsIDOMClientRect_Release(This->nsrect);
92 heap_free(This);
95 return ref;
98 static HRESULT WINAPI HTMLRect_GetTypeInfoCount(IHTMLRect *iface, UINT *pctinfo)
100 HTMLRect *This = HTMLRECT_THIS(iface);
101 FIXME("(%p)->(%p)\n", This, pctinfo);
102 return E_NOTIMPL;
105 static HRESULT WINAPI HTMLRect_GetTypeInfo(IHTMLRect *iface, UINT iTInfo,
106 LCID lcid, ITypeInfo **ppTInfo)
108 HTMLRect *This = HTMLRECT_THIS(iface);
110 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->dispex), iTInfo, lcid, ppTInfo);
113 static HRESULT WINAPI HTMLRect_GetIDsOfNames(IHTMLRect *iface, REFIID riid,
114 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
116 HTMLRect *This = HTMLRECT_THIS(iface);
118 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->dispex), riid, rgszNames, cNames, lcid, rgDispId);
121 static HRESULT WINAPI HTMLRect_Invoke(IHTMLRect *iface, DISPID dispIdMember,
122 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
123 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
125 HTMLRect *This = HTMLRECT_THIS(iface);
127 return IDispatchEx_Invoke(DISPATCHEX(&This->dispex), dispIdMember, riid, lcid, wFlags, pDispParams,
128 pVarResult, pExcepInfo, puArgErr);
131 static HRESULT WINAPI HTMLRect_put_left(IHTMLRect *iface, LONG v)
133 HTMLRect *This = HTMLRECT_THIS(iface);
134 FIXME("(%p)->(%d)\n", This, v);
135 return E_NOTIMPL;
138 static HRESULT WINAPI HTMLRect_get_left(IHTMLRect *iface, LONG *p)
140 HTMLRect *This = HTMLRECT_THIS(iface);
141 float left;
142 nsresult nsres;
144 TRACE("(%p)->(%p)\n", This, p);
146 nsres = nsIDOMClientRect_GetLeft(This->nsrect, &left);
147 if(NS_FAILED(nsres)) {
148 ERR("GetLeft failed: %08x\n", nsres);
149 return E_FAIL;
152 *p = floor(left+0.5);
153 return S_OK;
156 static HRESULT WINAPI HTMLRect_put_top(IHTMLRect *iface, LONG v)
158 HTMLRect *This = HTMLRECT_THIS(iface);
159 FIXME("(%p)->(%d)\n", This, v);
160 return E_NOTIMPL;
163 static HRESULT WINAPI HTMLRect_get_top(IHTMLRect *iface, LONG *p)
165 HTMLRect *This = HTMLRECT_THIS(iface);
166 float top;
167 nsresult nsres;
169 TRACE("(%p)->(%p)\n", This, p);
171 nsres = nsIDOMClientRect_GetTop(This->nsrect, &top);
172 if(NS_FAILED(nsres)) {
173 ERR("GetTop failed: %08x\n", nsres);
174 return E_FAIL;
177 *p = floor(top+0.5);
178 return S_OK;
181 static HRESULT WINAPI HTMLRect_put_right(IHTMLRect *iface, LONG v)
183 HTMLRect *This = HTMLRECT_THIS(iface);
184 FIXME("(%p)->(%d)\n", This, v);
185 return E_NOTIMPL;
188 static HRESULT WINAPI HTMLRect_get_right(IHTMLRect *iface, LONG *p)
190 HTMLRect *This = HTMLRECT_THIS(iface);
191 float right;
192 nsresult nsres;
194 TRACE("(%p)->(%p)\n", This, p);
196 nsres = nsIDOMClientRect_GetRight(This->nsrect, &right);
197 if(NS_FAILED(nsres)) {
198 ERR("GetRight failed: %08x\n", nsres);
199 return E_FAIL;
202 *p = floor(right+0.5);
203 return S_OK;
206 static HRESULT WINAPI HTMLRect_put_bottom(IHTMLRect *iface, LONG v)
208 HTMLRect *This = HTMLRECT_THIS(iface);
209 FIXME("(%p)->(%d)\n", This, v);
210 return E_NOTIMPL;
213 static HRESULT WINAPI HTMLRect_get_bottom(IHTMLRect *iface, LONG *p)
215 HTMLRect *This = HTMLRECT_THIS(iface);
216 float bottom;
217 nsresult nsres;
219 TRACE("(%p)->(%p)\n", This, p);
221 nsres = nsIDOMClientRect_GetBottom(This->nsrect, &bottom);
222 if(NS_FAILED(nsres)) {
223 ERR("GetBottom failed: %08x\n", nsres);
224 return E_FAIL;
227 *p = floor(bottom+0.5);
228 return S_OK;
231 #undef HTMLRECT_THIS
233 static const IHTMLRectVtbl HTMLRectVtbl = {
234 HTMLRect_QueryInterface,
235 HTMLRect_AddRef,
236 HTMLRect_Release,
237 HTMLRect_GetTypeInfoCount,
238 HTMLRect_GetTypeInfo,
239 HTMLRect_GetIDsOfNames,
240 HTMLRect_Invoke,
241 HTMLRect_put_left,
242 HTMLRect_get_left,
243 HTMLRect_put_top,
244 HTMLRect_get_top,
245 HTMLRect_put_right,
246 HTMLRect_get_right,
247 HTMLRect_put_bottom,
248 HTMLRect_get_bottom
251 static const tid_t HTMLRect_iface_tids[] = {
252 IHTMLRect_tid,
255 static dispex_static_data_t HTMLRect_dispex = {
256 NULL,
257 IHTMLRect_tid,
258 NULL,
259 HTMLRect_iface_tids
262 static HRESULT create_html_rect(nsIDOMClientRect *nsrect, IHTMLRect **ret)
264 HTMLRect *rect;
266 rect = heap_alloc_zero(sizeof(HTMLRect));
267 if(!rect)
268 return E_OUTOFMEMORY;
270 rect->lpIHTMLRectVtbl = &HTMLRectVtbl;
271 rect->ref = 1;
273 init_dispex(&rect->dispex, (IUnknown*)HTMLRECT(rect), &HTMLRect_dispex);
275 nsIDOMClientRect_AddRef(nsrect);
276 rect->nsrect = nsrect;
278 *ret = HTMLRECT(rect);
279 return S_OK;
282 #define HTMLELEM2_THIS(iface) DEFINE_THIS(HTMLElement, HTMLElement2, iface)
284 static HRESULT WINAPI HTMLElement2_QueryInterface(IHTMLElement2 *iface,
285 REFIID riid, void **ppv)
287 HTMLElement *This = HTMLELEM2_THIS(iface);
288 return IHTMLElement_QueryInterface(HTMLELEM(This), riid, ppv);
291 static ULONG WINAPI HTMLElement2_AddRef(IHTMLElement2 *iface)
293 HTMLElement *This = HTMLELEM2_THIS(iface);
294 return IHTMLElement_AddRef(HTMLELEM(This));
297 static ULONG WINAPI HTMLElement2_Release(IHTMLElement2 *iface)
299 HTMLElement *This = HTMLELEM2_THIS(iface);
300 return IHTMLElement_Release(HTMLELEM(This));
303 static HRESULT WINAPI HTMLElement2_GetTypeInfoCount(IHTMLElement2 *iface, UINT *pctinfo)
305 HTMLElement *This = HTMLELEM2_THIS(iface);
306 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->node.dispex), pctinfo);
309 static HRESULT WINAPI HTMLElement2_GetTypeInfo(IHTMLElement2 *iface, UINT iTInfo,
310 LCID lcid, ITypeInfo **ppTInfo)
312 HTMLElement *This = HTMLELEM2_THIS(iface);
313 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->node.dispex), iTInfo, lcid, ppTInfo);
316 static HRESULT WINAPI HTMLElement2_GetIDsOfNames(IHTMLElement2 *iface, REFIID riid,
317 LPOLESTR *rgszNames, UINT cNames,
318 LCID lcid, DISPID *rgDispId)
320 HTMLElement *This = HTMLELEM2_THIS(iface);
321 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->node.dispex), riid, rgszNames, cNames, lcid, rgDispId);
324 static HRESULT WINAPI HTMLElement2_Invoke(IHTMLElement2 *iface, DISPID dispIdMember,
325 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
326 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
328 HTMLElement *This = HTMLELEM2_THIS(iface);
329 return IDispatchEx_Invoke(DISPATCHEX(&This->node.dispex), dispIdMember, riid, lcid,
330 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
333 static HRESULT WINAPI HTMLElement2_get_scopeName(IHTMLElement2 *iface, BSTR *p)
335 HTMLElement *This = HTMLELEM2_THIS(iface);
336 FIXME("(%p)->(%p)\n", This, p);
337 return E_NOTIMPL;
340 static HRESULT WINAPI HTMLElement2_setCapture(IHTMLElement2 *iface, VARIANT_BOOL containerCapture)
342 HTMLElement *This = HTMLELEM2_THIS(iface);
343 FIXME("(%p)->(%x)\n", This, containerCapture);
344 return E_NOTIMPL;
347 static HRESULT WINAPI HTMLElement2_releaseCapture(IHTMLElement2 *iface)
349 HTMLElement *This = HTMLELEM2_THIS(iface);
350 FIXME("(%p)\n", This);
351 return E_NOTIMPL;
354 static HRESULT WINAPI HTMLElement2_put_onlosecapture(IHTMLElement2 *iface, VARIANT v)
356 HTMLElement *This = HTMLELEM2_THIS(iface);
357 FIXME("(%p)->()\n", This);
358 return E_NOTIMPL;
361 static HRESULT WINAPI HTMLElement2_get_onlosecapture(IHTMLElement2 *iface, VARIANT *p)
363 HTMLElement *This = HTMLELEM2_THIS(iface);
364 FIXME("(%p)->(%p)\n", This, p);
365 return E_NOTIMPL;
368 static HRESULT WINAPI HTMLElement2_componentFromPoint(IHTMLElement2 *iface,
369 LONG x, LONG y, BSTR *component)
371 HTMLElement *This = HTMLELEM2_THIS(iface);
372 FIXME("(%p)->(%d %d %p)\n", This, x, y, component);
373 return E_NOTIMPL;
376 static HRESULT WINAPI HTMLElement2_doScroll(IHTMLElement2 *iface, VARIANT component)
378 HTMLElement *This = HTMLELEM2_THIS(iface);
380 TRACE("(%p)->(%s)\n", This, debugstr_variant(&component));
382 if(!This->node.doc->content_ready
383 || !This->node.doc->basedoc.doc_obj->in_place_active)
384 return E_PENDING;
386 WARN("stub\n");
387 return S_OK;
390 static HRESULT WINAPI HTMLElement2_put_onscroll(IHTMLElement2 *iface, VARIANT v)
392 HTMLElement *This = HTMLELEM2_THIS(iface);
393 FIXME("(%p)->()\n", This);
394 return E_NOTIMPL;
397 static HRESULT WINAPI HTMLElement2_get_onscroll(IHTMLElement2 *iface, VARIANT *p)
399 HTMLElement *This = HTMLELEM2_THIS(iface);
400 FIXME("(%p)->(%p)\n", This, p);
401 return E_NOTIMPL;
404 static HRESULT WINAPI HTMLElement2_put_ondrag(IHTMLElement2 *iface, VARIANT v)
406 HTMLElement *This = HTMLELEM2_THIS(iface);
408 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
410 return set_node_event(&This->node, EVENTID_DRAG, &v);
413 static HRESULT WINAPI HTMLElement2_get_ondrag(IHTMLElement2 *iface, VARIANT *p)
415 HTMLElement *This = HTMLELEM2_THIS(iface);
417 TRACE("(%p)->(%p)\n", This, p);
419 return get_node_event(&This->node, EVENTID_DRAG, p);
422 static HRESULT WINAPI HTMLElement2_put_ondragend(IHTMLElement2 *iface, VARIANT v)
424 HTMLElement *This = HTMLELEM2_THIS(iface);
425 FIXME("(%p)->()\n", This);
426 return E_NOTIMPL;
429 static HRESULT WINAPI HTMLElement2_get_ondragend(IHTMLElement2 *iface, VARIANT *p)
431 HTMLElement *This = HTMLELEM2_THIS(iface);
432 FIXME("(%p)->(%p)\n", This, p);
433 return E_NOTIMPL;
436 static HRESULT WINAPI HTMLElement2_put_ondragenter(IHTMLElement2 *iface, VARIANT v)
438 HTMLElement *This = HTMLELEM2_THIS(iface);
439 FIXME("(%p)->()\n", This);
440 return E_NOTIMPL;
443 static HRESULT WINAPI HTMLElement2_get_ondragenter(IHTMLElement2 *iface, VARIANT *p)
445 HTMLElement *This = HTMLELEM2_THIS(iface);
446 FIXME("(%p)->(%p)\n", This, p);
447 return E_NOTIMPL;
450 static HRESULT WINAPI HTMLElement2_put_ondragover(IHTMLElement2 *iface, VARIANT v)
452 HTMLElement *This = HTMLELEM2_THIS(iface);
453 FIXME("(%p)->()\n", This);
454 return E_NOTIMPL;
457 static HRESULT WINAPI HTMLElement2_get_ondragover(IHTMLElement2 *iface, VARIANT *p)
459 HTMLElement *This = HTMLELEM2_THIS(iface);
460 FIXME("(%p)->(%p)\n", This, p);
461 return E_NOTIMPL;
464 static HRESULT WINAPI HTMLElement2_put_ondragleave(IHTMLElement2 *iface, VARIANT v)
466 HTMLElement *This = HTMLELEM2_THIS(iface);
467 FIXME("(%p)->()\n", This);
468 return E_NOTIMPL;
471 static HRESULT WINAPI HTMLElement2_get_ondragleave(IHTMLElement2 *iface, VARIANT *p)
473 HTMLElement *This = HTMLELEM2_THIS(iface);
474 FIXME("(%p)->(%p)\n", This, p);
475 return E_NOTIMPL;
478 static HRESULT WINAPI HTMLElement2_put_ondrop(IHTMLElement2 *iface, VARIANT v)
480 HTMLElement *This = HTMLELEM2_THIS(iface);
481 FIXME("(%p)->()\n", This);
482 return E_NOTIMPL;
485 static HRESULT WINAPI HTMLElement2_get_ondrop(IHTMLElement2 *iface, VARIANT *p)
487 HTMLElement *This = HTMLELEM2_THIS(iface);
488 FIXME("(%p)->(%p)\n", This, p);
489 return E_NOTIMPL;
492 static HRESULT WINAPI HTMLElement2_put_onbeforecut(IHTMLElement2 *iface, VARIANT v)
494 HTMLElement *This = HTMLELEM2_THIS(iface);
495 FIXME("(%p)->()\n", This);
496 return E_NOTIMPL;
499 static HRESULT WINAPI HTMLElement2_get_onbeforecut(IHTMLElement2 *iface, VARIANT *p)
501 HTMLElement *This = HTMLELEM2_THIS(iface);
502 FIXME("(%p)->(%p)\n", This, p);
503 return E_NOTIMPL;
506 static HRESULT WINAPI HTMLElement2_put_oncut(IHTMLElement2 *iface, VARIANT v)
508 HTMLElement *This = HTMLELEM2_THIS(iface);
509 FIXME("(%p)->()\n", This);
510 return E_NOTIMPL;
513 static HRESULT WINAPI HTMLElement2_get_oncut(IHTMLElement2 *iface, VARIANT *p)
515 HTMLElement *This = HTMLELEM2_THIS(iface);
516 FIXME("(%p)->(%p)\n", This, p);
517 return E_NOTIMPL;
520 static HRESULT WINAPI HTMLElement2_put_onbeforecopy(IHTMLElement2 *iface, VARIANT v)
522 HTMLElement *This = HTMLELEM2_THIS(iface);
523 FIXME("(%p)->()\n", This);
524 return E_NOTIMPL;
527 static HRESULT WINAPI HTMLElement2_get_onbeforecopy(IHTMLElement2 *iface, VARIANT *p)
529 HTMLElement *This = HTMLELEM2_THIS(iface);
530 FIXME("(%p)->(%p)\n", This, p);
531 return E_NOTIMPL;
534 static HRESULT WINAPI HTMLElement2_put_oncopy(IHTMLElement2 *iface, VARIANT v)
536 HTMLElement *This = HTMLELEM2_THIS(iface);
537 FIXME("(%p)->()\n", This);
538 return E_NOTIMPL;
541 static HRESULT WINAPI HTMLElement2_get_oncopy(IHTMLElement2 *iface, VARIANT *p)
543 HTMLElement *This = HTMLELEM2_THIS(iface);
544 FIXME("(%p)->(%p)\n", This, p);
545 return E_NOTIMPL;
548 static HRESULT WINAPI HTMLElement2_put_onbeforepaste(IHTMLElement2 *iface, VARIANT v)
550 HTMLElement *This = HTMLELEM2_THIS(iface);
551 FIXME("(%p)->()\n", This);
552 return E_NOTIMPL;
555 static HRESULT WINAPI HTMLElement2_get_onbeforepaste(IHTMLElement2 *iface, VARIANT *p)
557 HTMLElement *This = HTMLELEM2_THIS(iface);
558 FIXME("(%p)->(%p)\n", This, p);
559 return E_NOTIMPL;
562 static HRESULT WINAPI HTMLElement2_put_onpaste(IHTMLElement2 *iface, VARIANT v)
564 HTMLElement *This = HTMLELEM2_THIS(iface);
566 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
568 return set_node_event(&This->node, EVENTID_PASTE, &v);
571 static HRESULT WINAPI HTMLElement2_get_onpaste(IHTMLElement2 *iface, VARIANT *p)
573 HTMLElement *This = HTMLELEM2_THIS(iface);
575 TRACE("(%p)->(%p)\n", This, p);
577 return get_node_event(&This->node, EVENTID_PASTE, p);
580 static HRESULT WINAPI HTMLElement2_get_currentStyle(IHTMLElement2 *iface, IHTMLCurrentStyle **p)
582 HTMLElement *This = HTMLELEM2_THIS(iface);
584 TRACE("(%p)->(%p)\n", This, p);
586 return HTMLCurrentStyle_Create(This, p);
589 static HRESULT WINAPI HTMLElement2_put_onpropertychange(IHTMLElement2 *iface, VARIANT v)
591 HTMLElement *This = HTMLELEM2_THIS(iface);
592 FIXME("(%p)->()\n", This);
593 return E_NOTIMPL;
596 static HRESULT WINAPI HTMLElement2_get_onpropertychange(IHTMLElement2 *iface, VARIANT *p)
598 HTMLElement *This = HTMLELEM2_THIS(iface);
599 FIXME("(%p)->(%p)\n", This, p);
600 return E_NOTIMPL;
603 static HRESULT WINAPI HTMLElement2_getClientRects(IHTMLElement2 *iface, IHTMLRectCollection **pRectCol)
605 HTMLElement *This = HTMLELEM2_THIS(iface);
606 FIXME("(%p)->(%p)\n", This, pRectCol);
607 return E_NOTIMPL;
610 static HRESULT WINAPI HTMLElement2_getBoundingClientRect(IHTMLElement2 *iface, IHTMLRect **pRect)
612 HTMLElement *This = HTMLELEM2_THIS(iface);
613 nsIDOMNSElement *nselem;
614 nsIDOMClientRect *nsrect;
615 nsresult nsres;
616 HRESULT hres;
618 TRACE("(%p)->(%p)\n", This, pRect);
620 nsres = nsIDOMHTMLElement_QueryInterface(This->node.nsnode, &IID_nsIDOMNSElement,
621 (void**)&nselem);
622 if(NS_FAILED(nsres)) {
623 ERR("Could not get nsIDOMNSElement iface: %08x\n", nsres);
624 return E_FAIL;
627 nsres = nsIDOMNSElement_GetBoundingClientRect(nselem, &nsrect);
628 nsIDOMNSElement_Release(nselem);
629 if(NS_FAILED(nsres) || !nsrect) {
630 ERR("GetBoindingClientRect failed: %08x\n", nsres);
631 return E_FAIL;
634 hres = create_html_rect(nsrect, pRect);
636 nsIDOMClientRect_Release(nsrect);
637 return hres;
640 static HRESULT WINAPI HTMLElement2_setExpression(IHTMLElement2 *iface, BSTR propname,
641 BSTR expression, BSTR language)
643 HTMLElement *This = HTMLELEM2_THIS(iface);
644 FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(propname), debugstr_w(expression),
645 debugstr_w(language));
646 return E_NOTIMPL;
649 static HRESULT WINAPI HTMLElement2_getExpression(IHTMLElement2 *iface, BSTR propname,
650 VARIANT *expression)
652 HTMLElement *This = HTMLELEM2_THIS(iface);
653 FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), expression);
654 return E_NOTIMPL;
657 static HRESULT WINAPI HTMLElement2_removeExpression(IHTMLElement2 *iface, BSTR propname,
658 VARIANT_BOOL *pfSuccess)
660 HTMLElement *This = HTMLELEM2_THIS(iface);
661 FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), pfSuccess);
662 return E_NOTIMPL;
665 static HRESULT WINAPI HTMLElement2_put_tabIndex(IHTMLElement2 *iface, short v)
667 HTMLElement *This = HTMLELEM2_THIS(iface);
668 nsIDOMNSHTMLElement *nselem;
669 nsresult nsres;
671 TRACE("(%p)->(%d)\n", This, v);
673 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
674 if(NS_FAILED(nsres)) {
675 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
676 return S_OK;
679 nsres = nsIDOMNSHTMLElement_SetTabIndex(nselem, v);
680 nsIDOMNSHTMLElement_Release(nselem);
681 if(NS_FAILED(nsres))
682 ERR("GetTabIndex failed: %08x\n", nsres);
684 return S_OK;
687 static HRESULT WINAPI HTMLElement2_get_tabIndex(IHTMLElement2 *iface, short *p)
689 HTMLElement *This = HTMLELEM2_THIS(iface);
690 nsIDOMNSHTMLElement *nselem;
691 PRInt32 index = 0;
692 nsresult nsres;
694 TRACE("(%p)->(%p)\n", This, p);
696 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
697 if(NS_FAILED(nsres)) {
698 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
699 return E_FAIL;
702 nsres = nsIDOMNSHTMLElement_GetTabIndex(nselem, &index);
703 nsIDOMNSHTMLElement_Release(nselem);
704 if(NS_FAILED(nsres)) {
705 ERR("GetTabIndex failed: %08x\n", nsres);
706 return E_FAIL;
709 *p = index;
710 return S_OK;
713 static HRESULT WINAPI HTMLElement2_focus(IHTMLElement2 *iface)
715 HTMLElement *This = HTMLELEM2_THIS(iface);
716 nsIDOMNSHTMLElement *nselem;
717 nsresult nsres;
719 TRACE("(%p)\n", This);
721 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
722 if(NS_SUCCEEDED(nsres)) {
723 nsIDOMNSHTMLElement_Focus(nselem);
724 nsIDOMNSHTMLElement_Release(nselem);
725 }else {
726 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
729 return S_OK;
732 static HRESULT WINAPI HTMLElement2_put_accessKey(IHTMLElement2 *iface, BSTR v)
734 HTMLElement *This = HTMLELEM2_THIS(iface);
735 VARIANT var;
737 static WCHAR accessKeyW[] = {'a','c','c','e','s','s','K','e','y',0};
739 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
741 V_VT(&var) = VT_BSTR;
742 V_BSTR(&var) = v;
743 return IHTMLElement_setAttribute(HTMLELEM(This), accessKeyW, var, 0);
746 static HRESULT WINAPI HTMLElement2_get_accessKey(IHTMLElement2 *iface, BSTR *p)
748 HTMLElement *This = HTMLELEM2_THIS(iface);
749 FIXME("(%p)->(%p)\n", This, p);
750 return E_NOTIMPL;
753 static HRESULT WINAPI HTMLElement2_put_onblur(IHTMLElement2 *iface, VARIANT v)
755 HTMLElement *This = HTMLELEM2_THIS(iface);
757 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
759 return set_node_event(&This->node, EVENTID_BLUR, &v);
762 static HRESULT WINAPI HTMLElement2_get_onblur(IHTMLElement2 *iface, VARIANT *p)
764 HTMLElement *This = HTMLELEM2_THIS(iface);
766 TRACE("(%p)->(%p)\n", This, p);
768 return get_node_event(&This->node, EVENTID_BLUR, p);
771 static HRESULT WINAPI HTMLElement2_put_onfocus(IHTMLElement2 *iface, VARIANT v)
773 HTMLElement *This = HTMLELEM2_THIS(iface);
775 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
777 return set_node_event(&This->node, EVENTID_FOCUS, &v);
780 static HRESULT WINAPI HTMLElement2_get_onfocus(IHTMLElement2 *iface, VARIANT *p)
782 HTMLElement *This = HTMLELEM2_THIS(iface);
784 TRACE("(%p)->(%p)\n", This, p);
786 return get_node_event(&This->node, EVENTID_FOCUS, p);
789 static HRESULT WINAPI HTMLElement2_put_onresize(IHTMLElement2 *iface, VARIANT v)
791 HTMLElement *This = HTMLELEM2_THIS(iface);
792 FIXME("(%p)->()\n", This);
793 return E_NOTIMPL;
796 static HRESULT WINAPI HTMLElement2_get_onresize(IHTMLElement2 *iface, VARIANT *p)
798 HTMLElement *This = HTMLELEM2_THIS(iface);
799 FIXME("(%p)->(%p)\n", This, p);
800 return E_NOTIMPL;
803 static HRESULT WINAPI HTMLElement2_blur(IHTMLElement2 *iface)
805 HTMLElement *This = HTMLELEM2_THIS(iface);
806 FIXME("(%p)\n", This);
807 return E_NOTIMPL;
810 static HRESULT WINAPI HTMLElement2_addFilter(IHTMLElement2 *iface, IUnknown *pUnk)
812 HTMLElement *This = HTMLELEM2_THIS(iface);
813 FIXME("(%p)->(%p)\n", This, pUnk);
814 return E_NOTIMPL;
817 static HRESULT WINAPI HTMLElement2_removeFilter(IHTMLElement2 *iface, IUnknown *pUnk)
819 HTMLElement *This = HTMLELEM2_THIS(iface);
820 FIXME("(%p)->(%p)\n", This, pUnk);
821 return E_NOTIMPL;
824 static HRESULT WINAPI HTMLElement2_get_clientHeight(IHTMLElement2 *iface, LONG *p)
826 HTMLElement *This = HTMLELEM2_THIS(iface);
827 nsIDOMNSElement *nselem;
828 PRInt32 height=0;
829 nsresult nsres;
831 TRACE("(%p)->(%p)\n", This, p);
833 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem);
834 if(NS_SUCCEEDED(nsres)) {
835 nsIDOMNSElement_GetClientHeight(nselem, &height);
836 nsIDOMNSElement_Release(nselem);
837 }else {
838 ERR("Could not get nsIDOMNSElement: %08x\n", nsres);
841 *p = height;
842 return S_OK;
845 static HRESULT WINAPI HTMLElement2_get_clientWidth(IHTMLElement2 *iface, LONG *p)
847 HTMLElement *This = HTMLELEM2_THIS(iface);
848 nsIDOMNSElement *nselem;
849 PRInt32 width=0;
850 nsresult nsres;
852 TRACE("(%p)->(%p)\n", This, p);
854 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem);
855 if(NS_SUCCEEDED(nsres)) {
856 nsIDOMNSElement_GetClientWidth(nselem, &width);
857 nsIDOMNSElement_Release(nselem);
858 }else {
859 ERR("Could not get nsIDOMNSElement: %08x\n", nsres);
862 *p = width;
863 return S_OK;
866 static HRESULT WINAPI HTMLElement2_get_clientTop(IHTMLElement2 *iface, LONG *p)
868 HTMLElement *This = HTMLELEM2_THIS(iface);
869 nsIDOMNSElement *nselem;
870 PRInt32 client_top = 0;
871 nsresult nsres;
873 TRACE("(%p)->(%p)\n", This, p);
875 nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem);
876 if(NS_SUCCEEDED(nsres)) {
877 nsres = nsIDOMNSElement_GetClientTop(nselem, &client_top);
878 nsIDOMNSElement_Release(nselem);
879 if(NS_FAILED(nsres))
880 ERR("GetScrollHeight failed: %08x\n", nsres);
881 }else {
882 ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres);
885 *p = client_top;
886 TRACE("*p = %d\n", *p);
887 return S_OK;
890 static HRESULT WINAPI HTMLElement2_get_clientLeft(IHTMLElement2 *iface, LONG *p)
892 HTMLElement *This = HTMLELEM2_THIS(iface);
893 nsIDOMNSElement *nselem;
894 PRInt32 client_left = 0;
895 nsresult nsres;
897 TRACE("(%p)->(%p)\n", This, p);
899 nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem);
900 if(NS_SUCCEEDED(nsres)) {
901 nsres = nsIDOMNSElement_GetClientLeft(nselem, &client_left);
902 nsIDOMNSElement_Release(nselem);
903 if(NS_FAILED(nsres))
904 ERR("GetScrollHeight failed: %08x\n", nsres);
905 }else {
906 ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres);
909 *p = client_left;
910 TRACE("*p = %d\n", *p);
911 return S_OK;
914 static HRESULT WINAPI HTMLElement2_attachEvent(IHTMLElement2 *iface, BSTR event,
915 IDispatch *pDisp, VARIANT_BOOL *pfResult)
917 HTMLElement *This = HTMLELEM2_THIS(iface);
919 TRACE("(%p)->(%s %p %p)\n", This, debugstr_w(event), pDisp, pfResult);
921 return attach_event(get_node_event_target(&This->node), This->node.nsnode, &This->node.doc->basedoc, event, pDisp, pfResult);
924 static HRESULT WINAPI HTMLElement2_detachEvent(IHTMLElement2 *iface, BSTR event, IDispatch *pDisp)
926 HTMLElement *This = HTMLELEM2_THIS(iface);
928 TRACE("(%p)->(%s %p)\n", This, debugstr_w(event), pDisp);
930 return detach_event(*get_node_event_target(&This->node), &This->node.doc->basedoc, event, pDisp);
933 static HRESULT WINAPI HTMLElement2_get_readyState(IHTMLElement2 *iface, VARIANT *p)
935 HTMLElement *This = HTMLELEM2_THIS(iface);
936 BSTR str;
938 TRACE("(%p)->(%p)\n", This, p);
940 if(This->node.vtbl->get_readystate) {
941 HRESULT hres;
943 hres = This->node.vtbl->get_readystate(&This->node, &str);
944 if(FAILED(hres))
945 return hres;
946 }else {
947 static const WCHAR completeW[] = {'c','o','m','p','l','e','t','e',0};
949 str = SysAllocString(completeW);
950 if(!str)
951 return E_OUTOFMEMORY;
954 V_VT(p) = VT_BSTR;
955 V_BSTR(p) = str;
956 return S_OK;
959 static HRESULT WINAPI HTMLElement2_put_onreadystatechange(IHTMLElement2 *iface, VARIANT v)
961 HTMLElement *This = HTMLELEM2_THIS(iface);
963 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
965 return set_node_event(&This->node, EVENTID_READYSTATECHANGE, &v);
968 static HRESULT WINAPI HTMLElement2_get_onreadystatechange(IHTMLElement2 *iface, VARIANT *p)
970 HTMLElement *This = HTMLELEM2_THIS(iface);
972 TRACE("(%p)->(%p)\n", This, p);
974 return get_node_event(&This->node, EVENTID_READYSTATECHANGE, p);
977 static HRESULT WINAPI HTMLElement2_put_onrowsdelete(IHTMLElement2 *iface, VARIANT v)
979 HTMLElement *This = HTMLELEM2_THIS(iface);
980 FIXME("(%p)->()\n", This);
981 return E_NOTIMPL;
984 static HRESULT WINAPI HTMLElement2_get_onrowsdelete(IHTMLElement2 *iface, VARIANT *p)
986 HTMLElement *This = HTMLELEM2_THIS(iface);
987 FIXME("(%p)->(%p)\n", This, p);
988 return E_NOTIMPL;
991 static HRESULT WINAPI HTMLElement2_put_onrowsinserted(IHTMLElement2 *iface, VARIANT v)
993 HTMLElement *This = HTMLELEM2_THIS(iface);
994 FIXME("(%p)->()\n", This);
995 return E_NOTIMPL;
998 static HRESULT WINAPI HTMLElement2_get_onrowsinserted(IHTMLElement2 *iface, VARIANT *p)
1000 HTMLElement *This = HTMLELEM2_THIS(iface);
1001 FIXME("(%p)->(%p)\n", This, p);
1002 return E_NOTIMPL;
1005 static HRESULT WINAPI HTMLElement2_put_oncellchange(IHTMLElement2 *iface, VARIANT v)
1007 HTMLElement *This = HTMLELEM2_THIS(iface);
1008 FIXME("(%p)->()\n", This);
1009 return E_NOTIMPL;
1012 static HRESULT WINAPI HTMLElement2_get_oncellchange(IHTMLElement2 *iface, VARIANT *p)
1014 HTMLElement *This = HTMLELEM2_THIS(iface);
1015 FIXME("(%p)->(%p)\n", This, p);
1016 return E_NOTIMPL;
1019 static HRESULT WINAPI HTMLElement2_put_dir(IHTMLElement2 *iface, BSTR v)
1021 HTMLElement *This = HTMLELEM2_THIS(iface);
1022 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1023 return E_NOTIMPL;
1026 static HRESULT WINAPI HTMLElement2_get_dir(IHTMLElement2 *iface, BSTR *p)
1028 HTMLElement *This = HTMLELEM2_THIS(iface);
1030 TRACE("(%p)->(%p)\n", This, p);
1032 *p = NULL;
1034 if(This->nselem) {
1035 nsAString dir_str;
1036 nsresult nsres;
1038 nsAString_Init(&dir_str, NULL);
1040 nsres = nsIDOMHTMLElement_GetDir(This->nselem, &dir_str);
1041 if(NS_SUCCEEDED(nsres)) {
1042 const PRUnichar *dir;
1043 nsAString_GetData(&dir_str, &dir);
1044 if(*dir)
1045 *p = SysAllocString(dir);
1046 }else {
1047 ERR("GetDir failed: %08x\n", nsres);
1050 nsAString_Finish(&dir_str);
1053 TRACE("ret %s\n", debugstr_w(*p));
1054 return S_OK;
1057 static HRESULT WINAPI HTMLElement2_createControlRange(IHTMLElement2 *iface, IDispatch **range)
1059 HTMLElement *This = HTMLELEM2_THIS(iface);
1060 FIXME("(%p)->(%p)\n", This, range);
1061 return E_NOTIMPL;
1064 static HRESULT WINAPI HTMLElement2_get_scrollHeight(IHTMLElement2 *iface, LONG *p)
1066 HTMLElement *This = HTMLELEM2_THIS(iface);
1067 nsIDOMNSElement *nselem;
1068 PRInt32 height = 0;
1069 nsresult nsres;
1071 TRACE("(%p)->(%p)\n", This, p);
1073 nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem);
1074 if(NS_SUCCEEDED(nsres)) {
1075 nsres = nsIDOMNSElement_GetScrollHeight(nselem, &height);
1076 nsIDOMNSElement_Release(nselem);
1077 if(NS_FAILED(nsres))
1078 ERR("GetScrollHeight failed: %08x\n", nsres);
1079 }else {
1080 ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres);
1083 *p = height;
1084 TRACE("*p = %d\n", *p);
1086 return S_OK;
1089 static HRESULT WINAPI HTMLElement2_get_scrollWidth(IHTMLElement2 *iface, LONG *p)
1091 HTMLElement *This = HTMLELEM2_THIS(iface);
1092 nsIDOMNSElement *nselem;
1093 PRInt32 width = 0;
1094 nsresult nsres;
1096 TRACE("(%p)->(%p)\n", This, p);
1098 nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem);
1099 if(NS_SUCCEEDED(nsres)) {
1100 nsres = nsIDOMNSElement_GetScrollWidth(nselem, &width);
1101 nsIDOMNSElement_Release(nselem);
1102 if(NS_FAILED(nsres))
1103 ERR("GetScrollWidth failed: %08x\n", nsres);
1104 }else {
1105 ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres);
1108 *p = width;
1109 TRACE("*p = %d\n", *p);
1111 return S_OK;
1114 static HRESULT WINAPI HTMLElement2_put_scrollTop(IHTMLElement2 *iface, LONG v)
1116 HTMLElement *This = HTMLELEM2_THIS(iface);
1117 nsIDOMNSElement *nselem;
1118 nsresult nsres;
1120 TRACE("(%p)->(%d)\n", This, v);
1122 if(!This->nselem) {
1123 FIXME("NULL nselem\n");
1124 return E_NOTIMPL;
1127 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem);
1128 if(NS_SUCCEEDED(nsres)) {
1129 nsIDOMNSElement_SetScrollTop(nselem, v);
1130 nsIDOMNSElement_Release(nselem);
1131 }else {
1132 ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres);
1135 return S_OK;
1138 static HRESULT WINAPI HTMLElement2_get_scrollTop(IHTMLElement2 *iface, LONG *p)
1140 HTMLElement *This = HTMLELEM2_THIS(iface);
1141 nsIDOMNSElement *nselem;
1142 PRInt32 top = 0;
1143 nsresult nsres;
1145 TRACE("(%p)->(%p)\n", This, p);
1147 nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem);
1148 if(NS_SUCCEEDED(nsres)) {
1149 nsres = nsIDOMNSElement_GetScrollTop(nselem, &top);
1150 nsIDOMNSElement_Release(nselem);
1151 if(NS_FAILED(nsres))
1152 ERR("GetScrollTop failed: %08x\n", nsres);
1153 }else {
1154 ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres);
1157 *p = top;
1158 TRACE("*p = %d\n", *p);
1160 return S_OK;
1163 static HRESULT WINAPI HTMLElement2_put_scrollLeft(IHTMLElement2 *iface, LONG v)
1165 HTMLElement *This = HTMLELEM2_THIS(iface);
1166 nsIDOMNSElement *nselem;
1167 nsresult nsres;
1169 TRACE("(%p)->(%d)\n", This, v);
1171 if(!This->nselem) {
1172 FIXME("NULL nselem\n");
1173 return E_NOTIMPL;
1176 nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem);
1177 if(NS_SUCCEEDED(nsres)) {
1178 nsIDOMNSElement_SetScrollLeft(nselem, v);
1179 nsIDOMNSElement_Release(nselem);
1180 }else {
1181 ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres);
1184 return S_OK;
1187 static HRESULT WINAPI HTMLElement2_get_scrollLeft(IHTMLElement2 *iface, LONG *p)
1189 HTMLElement *This = HTMLELEM2_THIS(iface);
1190 nsIDOMNSElement *nselem;
1191 PRInt32 left = 0;
1192 nsresult nsres;
1194 TRACE("(%p)->(%p)\n", This, p);
1196 if(!p)
1197 return E_INVALIDARG;
1199 if(!This->nselem)
1201 FIXME("NULL nselem\n");
1202 return E_NOTIMPL;
1205 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem);
1206 if(NS_SUCCEEDED(nsres))
1208 nsres = nsIDOMNSElement_GetScrollLeft(nselem, &left);
1209 nsIDOMNSElement_Release(nselem);
1210 if(NS_FAILED(nsres))
1211 left = 0;
1214 *p = left;
1215 TRACE("*p = %d\n", *p);
1217 return S_OK;
1220 static HRESULT WINAPI HTMLElement2_clearAttributes(IHTMLElement2 *iface)
1222 HTMLElement *This = HTMLELEM2_THIS(iface);
1223 FIXME("(%p)\n", This);
1224 return E_NOTIMPL;
1227 static HRESULT WINAPI HTMLElement2_mergeAttributes(IHTMLElement2 *iface, IHTMLElement *mergeThis)
1229 HTMLElement *This = HTMLELEM2_THIS(iface);
1230 FIXME("(%p)->(%p)\n", This, mergeThis);
1231 return E_NOTIMPL;
1234 static HRESULT WINAPI HTMLElement2_put_oncontextmenu(IHTMLElement2 *iface, VARIANT v)
1236 HTMLElement *This = HTMLELEM2_THIS(iface);
1237 FIXME("(%p)->()\n", This);
1238 return E_NOTIMPL;
1241 static HRESULT WINAPI HTMLElement2_get_oncontextmenu(IHTMLElement2 *iface, VARIANT *p)
1243 HTMLElement *This = HTMLELEM2_THIS(iface);
1244 FIXME("(%p)->(%p)\n", This, p);
1245 return E_NOTIMPL;
1248 static HRESULT WINAPI HTMLElement2_insertAdjecentElement(IHTMLElement2 *iface, BSTR where,
1249 IHTMLElement *insertedElement, IHTMLElement **inserted)
1251 HTMLElement *This = HTMLELEM2_THIS(iface);
1252 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(where), insertedElement, inserted);
1253 return E_NOTIMPL;
1256 static HRESULT WINAPI HTMLElement2_applyElement(IHTMLElement2 *iface, IHTMLElement *apply,
1257 BSTR where, IHTMLElement **applied)
1259 HTMLElement *This = HTMLELEM2_THIS(iface);
1260 FIXME("(%p)->(%p %s %p)\n", This, apply, debugstr_w(where), applied);
1261 return E_NOTIMPL;
1264 static HRESULT WINAPI HTMLElement2_getAdjecentText(IHTMLElement2 *iface, BSTR where, BSTR *text)
1266 HTMLElement *This = HTMLELEM2_THIS(iface);
1267 FIXME("(%p)->(%s %p)\n", This, debugstr_w(where), text);
1268 return E_NOTIMPL;
1271 static HRESULT WINAPI HTMLElement2_replaceAdjecentText(IHTMLElement2 *iface, BSTR where,
1272 BSTR newText, BSTR *oldText)
1274 HTMLElement *This = HTMLELEM2_THIS(iface);
1275 FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(where), debugstr_w(newText), oldText);
1276 return E_NOTIMPL;
1279 static HRESULT WINAPI HTMLElement2_get_canHandleChildren(IHTMLElement2 *iface, VARIANT_BOOL *p)
1281 HTMLElement *This = HTMLELEM2_THIS(iface);
1282 FIXME("(%p)->(%p)\n", This, p);
1283 return E_NOTIMPL;
1286 static HRESULT WINAPI HTMLElement2_addBehavior(IHTMLElement2 *iface, BSTR bstrUrl,
1287 VARIANT *pvarFactory, LONG *pCookie)
1289 HTMLElement *This = HTMLELEM2_THIS(iface);
1290 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(bstrUrl), pvarFactory, pCookie);
1291 return E_NOTIMPL;
1294 static HRESULT WINAPI HTMLElement2_removeBehavior(IHTMLElement2 *iface, LONG cookie,
1295 VARIANT_BOOL *pfResult)
1297 HTMLElement *This = HTMLELEM2_THIS(iface);
1298 FIXME("(%p)->(%d %p)\n", This, cookie, pfResult);
1299 return E_NOTIMPL;
1302 static HRESULT WINAPI HTMLElement2_get_runtimeStyle(IHTMLElement2 *iface, IHTMLStyle **p)
1304 HTMLElement *This = HTMLELEM2_THIS(iface);
1305 FIXME("(%p)->(%p)\n", This, p);
1306 return E_NOTIMPL;
1309 static HRESULT WINAPI HTMLElement2_get_behaviorUrns(IHTMLElement2 *iface, IDispatch **p)
1311 HTMLElement *This = HTMLELEM2_THIS(iface);
1312 FIXME("(%p)->(%p)\n", This, p);
1313 return E_NOTIMPL;
1316 static HRESULT WINAPI HTMLElement2_put_tagUrn(IHTMLElement2 *iface, BSTR v)
1318 HTMLElement *This = HTMLELEM2_THIS(iface);
1319 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1320 return E_NOTIMPL;
1323 static HRESULT WINAPI HTMLElement2_get_tagUrn(IHTMLElement2 *iface, BSTR *p)
1325 HTMLElement *This = HTMLELEM2_THIS(iface);
1326 FIXME("(%p)->(%p)\n", This, p);
1327 return E_NOTIMPL;
1330 static HRESULT WINAPI HTMLElement2_put_onbeforeeditfocus(IHTMLElement2 *iface, VARIANT vv)
1332 HTMLElement *This = HTMLELEM2_THIS(iface);
1333 FIXME("(%p)->()\n", This);
1334 return E_NOTIMPL;
1337 static HRESULT WINAPI HTMLElement2_get_onbeforeeditfocus(IHTMLElement2 *iface, VARIANT *p)
1339 HTMLElement *This = HTMLELEM2_THIS(iface);
1340 FIXME("(%p)->(%p)\n", This, p);
1341 return E_NOTIMPL;
1344 static HRESULT WINAPI HTMLElement2_get_readyStateValue(IHTMLElement2 *iface, LONG *p)
1346 HTMLElement *This = HTMLELEM2_THIS(iface);
1347 FIXME("(%p)->(%p)\n", This, p);
1348 return E_NOTIMPL;
1351 static HRESULT WINAPI HTMLElement2_getElementsByTagName(IHTMLElement2 *iface, BSTR v,
1352 IHTMLElementCollection **pelColl)
1354 HTMLElement *This = HTMLELEM2_THIS(iface);
1355 nsIDOMNodeList *nslist;
1356 nsAString tag_str;
1357 nsresult nsres;
1359 TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), pelColl);
1361 nsAString_InitDepend(&tag_str, v);
1362 nsres = nsIDOMHTMLElement_GetElementsByTagName(This->nselem, &tag_str, &nslist);
1363 nsAString_Finish(&tag_str);
1364 if(NS_FAILED(nsres)) {
1365 ERR("GetElementByTagName failed: %08x\n", nsres);
1366 return E_FAIL;
1369 *pelColl = create_collection_from_nodelist(This->node.doc, (IUnknown*)HTMLELEM(This), nslist);
1370 nsIDOMNodeList_Release(nslist);
1371 return S_OK;
1374 #undef HTMLELEM2_THIS
1376 static const IHTMLElement2Vtbl HTMLElement2Vtbl = {
1377 HTMLElement2_QueryInterface,
1378 HTMLElement2_AddRef,
1379 HTMLElement2_Release,
1380 HTMLElement2_GetTypeInfoCount,
1381 HTMLElement2_GetTypeInfo,
1382 HTMLElement2_GetIDsOfNames,
1383 HTMLElement2_Invoke,
1384 HTMLElement2_get_scopeName,
1385 HTMLElement2_setCapture,
1386 HTMLElement2_releaseCapture,
1387 HTMLElement2_put_onlosecapture,
1388 HTMLElement2_get_onlosecapture,
1389 HTMLElement2_componentFromPoint,
1390 HTMLElement2_doScroll,
1391 HTMLElement2_put_onscroll,
1392 HTMLElement2_get_onscroll,
1393 HTMLElement2_put_ondrag,
1394 HTMLElement2_get_ondrag,
1395 HTMLElement2_put_ondragend,
1396 HTMLElement2_get_ondragend,
1397 HTMLElement2_put_ondragenter,
1398 HTMLElement2_get_ondragenter,
1399 HTMLElement2_put_ondragover,
1400 HTMLElement2_get_ondragover,
1401 HTMLElement2_put_ondragleave,
1402 HTMLElement2_get_ondragleave,
1403 HTMLElement2_put_ondrop,
1404 HTMLElement2_get_ondrop,
1405 HTMLElement2_put_onbeforecut,
1406 HTMLElement2_get_onbeforecut,
1407 HTMLElement2_put_oncut,
1408 HTMLElement2_get_oncut,
1409 HTMLElement2_put_onbeforecopy,
1410 HTMLElement2_get_onbeforecopy,
1411 HTMLElement2_put_oncopy,
1412 HTMLElement2_get_oncopy,
1413 HTMLElement2_put_onbeforepaste,
1414 HTMLElement2_get_onbeforepaste,
1415 HTMLElement2_put_onpaste,
1416 HTMLElement2_get_onpaste,
1417 HTMLElement2_get_currentStyle,
1418 HTMLElement2_put_onpropertychange,
1419 HTMLElement2_get_onpropertychange,
1420 HTMLElement2_getClientRects,
1421 HTMLElement2_getBoundingClientRect,
1422 HTMLElement2_setExpression,
1423 HTMLElement2_getExpression,
1424 HTMLElement2_removeExpression,
1425 HTMLElement2_put_tabIndex,
1426 HTMLElement2_get_tabIndex,
1427 HTMLElement2_focus,
1428 HTMLElement2_put_accessKey,
1429 HTMLElement2_get_accessKey,
1430 HTMLElement2_put_onblur,
1431 HTMLElement2_get_onblur,
1432 HTMLElement2_put_onfocus,
1433 HTMLElement2_get_onfocus,
1434 HTMLElement2_put_onresize,
1435 HTMLElement2_get_onresize,
1436 HTMLElement2_blur,
1437 HTMLElement2_addFilter,
1438 HTMLElement2_removeFilter,
1439 HTMLElement2_get_clientHeight,
1440 HTMLElement2_get_clientWidth,
1441 HTMLElement2_get_clientTop,
1442 HTMLElement2_get_clientLeft,
1443 HTMLElement2_attachEvent,
1444 HTMLElement2_detachEvent,
1445 HTMLElement2_get_readyState,
1446 HTMLElement2_put_onreadystatechange,
1447 HTMLElement2_get_onreadystatechange,
1448 HTMLElement2_put_onrowsdelete,
1449 HTMLElement2_get_onrowsdelete,
1450 HTMLElement2_put_onrowsinserted,
1451 HTMLElement2_get_onrowsinserted,
1452 HTMLElement2_put_oncellchange,
1453 HTMLElement2_get_oncellchange,
1454 HTMLElement2_put_dir,
1455 HTMLElement2_get_dir,
1456 HTMLElement2_createControlRange,
1457 HTMLElement2_get_scrollHeight,
1458 HTMLElement2_get_scrollWidth,
1459 HTMLElement2_put_scrollTop,
1460 HTMLElement2_get_scrollTop,
1461 HTMLElement2_put_scrollLeft,
1462 HTMLElement2_get_scrollLeft,
1463 HTMLElement2_clearAttributes,
1464 HTMLElement2_mergeAttributes,
1465 HTMLElement2_put_oncontextmenu,
1466 HTMLElement2_get_oncontextmenu,
1467 HTMLElement2_insertAdjecentElement,
1468 HTMLElement2_applyElement,
1469 HTMLElement2_getAdjecentText,
1470 HTMLElement2_replaceAdjecentText,
1471 HTMLElement2_get_canHandleChildren,
1472 HTMLElement2_addBehavior,
1473 HTMLElement2_removeBehavior,
1474 HTMLElement2_get_runtimeStyle,
1475 HTMLElement2_get_behaviorUrns,
1476 HTMLElement2_put_tagUrn,
1477 HTMLElement2_get_tagUrn,
1478 HTMLElement2_put_onbeforeeditfocus,
1479 HTMLElement2_get_onbeforeeditfocus,
1480 HTMLElement2_get_readyStateValue,
1481 HTMLElement2_getElementsByTagName,
1484 void HTMLElement2_Init(HTMLElement *This)
1486 This->lpHTMLElement2Vtbl = &HTMLElement2Vtbl;