winex11: add owned windows to taskbar if owner is not mapped
[wine] / dlls / mshtml / htmlelem2.c
1 /*
2  * Copyright 2006 Jacek Caban for CodeWeavers
3  *
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.
8  *
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.
13  *
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
17  */
18
19 #include <stdarg.h>
20
21 #define COBJMACROS
22
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winuser.h"
26 #include "ole2.h"
27
28 #include "wine/debug.h"
29 #include "wine/unicode.h"
30
31 #include "mshtml_private.h"
32
33 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
34
35 #define HTMLELEM2_THIS(iface) DEFINE_THIS(HTMLElement, HTMLElement2, iface)
36
37 static HRESULT WINAPI HTMLElement2_QueryInterface(IHTMLElement2 *iface,
38                                                   REFIID riid, void **ppv)
39 {
40     HTMLElement *This = HTMLELEM2_THIS(iface);
41     return IHTMLElement_QueryInterface(HTMLELEM(This), riid, ppv);
42 }
43
44 static ULONG WINAPI HTMLElement2_AddRef(IHTMLElement2 *iface)
45 {
46     HTMLElement *This = HTMLELEM2_THIS(iface);
47     return IHTMLElement_AddRef(HTMLELEM(This));
48 }
49
50 static ULONG WINAPI HTMLElement2_Release(IHTMLElement2 *iface)
51 {
52     HTMLElement *This = HTMLELEM2_THIS(iface);
53     return IHTMLElement_Release(HTMLELEM(This));
54 }
55
56 static HRESULT WINAPI HTMLElement2_GetTypeInfoCount(IHTMLElement2 *iface, UINT *pctinfo)
57 {
58     HTMLElement *This = HTMLELEM2_THIS(iface);
59     FIXME("(%p)->(%p)\n", This, pctinfo);
60     return E_NOTIMPL;
61 }
62
63 static HRESULT WINAPI HTMLElement2_GetTypeInfo(IHTMLElement2 *iface, UINT iTInfo,
64                                                LCID lcid, ITypeInfo **ppTInfo)
65 {
66     HTMLElement *This = HTMLELEM2_THIS(iface);
67     FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
68     return E_NOTIMPL;
69 }
70
71 static HRESULT WINAPI HTMLElement2_GetIDsOfNames(IHTMLElement2 *iface, REFIID riid,
72                                                 LPOLESTR *rgszNames, UINT cNames,
73                                                 LCID lcid, DISPID *rgDispId)
74 {
75     HTMLElement *This = HTMLELEM2_THIS(iface);
76     FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
77                                         lcid, rgDispId);
78     return E_NOTIMPL;
79 }
80
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)
84 {
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);
88     return E_NOTIMPL;
89 }
90
91 static HRESULT WINAPI HTMLElement2_get_scopeName(IHTMLElement2 *iface, BSTR *p)
92 {
93     HTMLElement *This = HTMLELEM2_THIS(iface);
94     FIXME("(%p)->(%p)\n", This, p);
95     return E_NOTIMPL;
96 }
97
98 static HRESULT WINAPI HTMLElement2_setCapture(IHTMLElement2 *iface, VARIANT_BOOL containerCapture)
99 {
100     HTMLElement *This = HTMLELEM2_THIS(iface);
101     FIXME("(%p)->(%x)\n", This, containerCapture);
102     return E_NOTIMPL;
103 }
104
105 static HRESULT WINAPI HTMLElement2_releaseCapture(IHTMLElement2 *iface)
106 {
107     HTMLElement *This = HTMLELEM2_THIS(iface);
108     FIXME("(%p)\n", This);
109     return E_NOTIMPL;
110 }
111
112 static HRESULT WINAPI HTMLElement2_put_onlosecapture(IHTMLElement2 *iface, VARIANT v)
113 {
114     HTMLElement *This = HTMLELEM2_THIS(iface);
115     FIXME("(%p)->()\n", This);
116     return E_NOTIMPL;
117 }
118
119 static HRESULT WINAPI HTMLElement2_get_onlosecapture(IHTMLElement2 *iface, VARIANT *p)
120 {
121     HTMLElement *This = HTMLELEM2_THIS(iface);
122     FIXME("(%p)->(%p)\n", This, p);
123     return E_NOTIMPL;
124 }
125
126 static HRESULT WINAPI HTMLElement2_componentFromPoint(IHTMLElement2 *iface,
127                                                       long x, long y, BSTR *component)
128 {
129     HTMLElement *This = HTMLELEM2_THIS(iface);
130     FIXME("(%p)->(%ld %ld %p)\n", This, x, y, component);
131     return E_NOTIMPL;
132 }
133
134 static HRESULT WINAPI HTMLElement2_doScroll(IHTMLElement2 *iface, VARIANT component)
135 {
136     HTMLElement *This = HTMLELEM2_THIS(iface);
137     FIXME("(%p)->()\n", This);
138     return E_NOTIMPL;
139 }
140
141 static HRESULT WINAPI HTMLElement2_put_onscroll(IHTMLElement2 *iface, VARIANT v)
142 {
143     HTMLElement *This = HTMLELEM2_THIS(iface);
144     FIXME("(%p)->()\n", This);
145     return E_NOTIMPL;
146 }
147
148 static HRESULT WINAPI HTMLElement2_get_onscroll(IHTMLElement2 *iface, VARIANT *p)
149 {
150     HTMLElement *This = HTMLELEM2_THIS(iface);
151     FIXME("(%p)->(%p)\n", This, p);
152     return E_NOTIMPL;
153 }
154
155 static HRESULT WINAPI HTMLElement2_put_ondrag(IHTMLElement2 *iface, VARIANT v)
156 {
157     HTMLElement *This = HTMLELEM2_THIS(iface);
158     FIXME("(%p)->()\n", This);
159     return E_NOTIMPL;
160 }
161
162 static HRESULT WINAPI HTMLElement2_get_ondrag(IHTMLElement2 *iface, VARIANT *p)
163 {
164     HTMLElement *This = HTMLELEM2_THIS(iface);
165     FIXME("(%p)->(%p)\n", This, p);
166     return E_NOTIMPL;
167 }
168
169 static HRESULT WINAPI HTMLElement2_put_ondragend(IHTMLElement2 *iface, VARIANT v)
170 {
171     HTMLElement *This = HTMLELEM2_THIS(iface);
172     FIXME("(%p)->()\n", This);
173     return E_NOTIMPL;
174 }
175
176 static HRESULT WINAPI HTMLElement2_get_ondragend(IHTMLElement2 *iface, VARIANT *p)
177 {
178     HTMLElement *This = HTMLELEM2_THIS(iface);
179     FIXME("(%p)->(%p)\n", This, p);
180     return E_NOTIMPL;
181 }
182
183 static HRESULT WINAPI HTMLElement2_put_ondragenter(IHTMLElement2 *iface, VARIANT v)
184 {
185     HTMLElement *This = HTMLELEM2_THIS(iface);
186     FIXME("(%p)->()\n", This);
187     return E_NOTIMPL;
188 }
189
190 static HRESULT WINAPI HTMLElement2_get_ondragenter(IHTMLElement2 *iface, VARIANT *p)
191 {
192     HTMLElement *This = HTMLELEM2_THIS(iface);
193     FIXME("(%p)->(%p)\n", This, p);
194     return E_NOTIMPL;
195 }
196
197 static HRESULT WINAPI HTMLElement2_put_ondragover(IHTMLElement2 *iface, VARIANT v)
198 {
199     HTMLElement *This = HTMLELEM2_THIS(iface);
200     FIXME("(%p)->()\n", This);
201     return E_NOTIMPL;
202 }
203
204 static HRESULT WINAPI HTMLElement2_get_ondragover(IHTMLElement2 *iface, VARIANT *p)
205 {
206     HTMLElement *This = HTMLELEM2_THIS(iface);
207     FIXME("(%p)->(%p)\n", This, p);
208     return E_NOTIMPL;
209 }
210
211 static HRESULT WINAPI HTMLElement2_put_ondragleave(IHTMLElement2 *iface, VARIANT v)
212 {
213     HTMLElement *This = HTMLELEM2_THIS(iface);
214     FIXME("(%p)->()\n", This);
215     return E_NOTIMPL;
216 }
217
218 static HRESULT WINAPI HTMLElement2_get_ondragleave(IHTMLElement2 *iface, VARIANT *p)
219 {
220     HTMLElement *This = HTMLELEM2_THIS(iface);
221     FIXME("(%p)->(%p)\n", This, p);
222     return E_NOTIMPL;
223 }
224
225 static HRESULT WINAPI HTMLElement2_put_ondrop(IHTMLElement2 *iface, VARIANT v)
226 {
227     HTMLElement *This = HTMLELEM2_THIS(iface);
228     FIXME("(%p)->()\n", This);
229     return E_NOTIMPL;
230 }
231
232 static HRESULT WINAPI HTMLElement2_get_ondrop(IHTMLElement2 *iface, VARIANT *p)
233 {
234     HTMLElement *This = HTMLELEM2_THIS(iface);
235     FIXME("(%p)->(%p)\n", This, p);
236     return E_NOTIMPL;
237 }
238
239 static HRESULT WINAPI HTMLElement2_put_onbeforecut(IHTMLElement2 *iface, VARIANT v)
240 {
241     HTMLElement *This = HTMLELEM2_THIS(iface);
242     FIXME("(%p)->()\n", This);
243     return E_NOTIMPL;
244 }
245
246 static HRESULT WINAPI HTMLElement2_get_onbeforecut(IHTMLElement2 *iface, VARIANT *p)
247 {
248     HTMLElement *This = HTMLELEM2_THIS(iface);
249     FIXME("(%p)->(%p)\n", This, p);
250     return E_NOTIMPL;
251 }
252
253 static HRESULT WINAPI HTMLElement2_put_oncut(IHTMLElement2 *iface, VARIANT v)
254 {
255     HTMLElement *This = HTMLELEM2_THIS(iface);
256     FIXME("(%p)->()\n", This);
257     return E_NOTIMPL;
258 }
259
260 static HRESULT WINAPI HTMLElement2_get_oncut(IHTMLElement2 *iface, VARIANT *p)
261 {
262     HTMLElement *This = HTMLELEM2_THIS(iface);
263     FIXME("(%p)->(%p)\n", This, p);
264     return E_NOTIMPL;
265 }
266
267 static HRESULT WINAPI HTMLElement2_put_onbeforecopy(IHTMLElement2 *iface, VARIANT v)
268 {
269     HTMLElement *This = HTMLELEM2_THIS(iface);
270     FIXME("(%p)->()\n", This);
271     return E_NOTIMPL;
272 }
273
274 static HRESULT WINAPI HTMLElement2_get_onbeforecopy(IHTMLElement2 *iface, VARIANT *p)
275 {
276     HTMLElement *This = HTMLELEM2_THIS(iface);
277     FIXME("(%p)->(%p)\n", This, p);
278     return E_NOTIMPL;
279 }
280
281 static HRESULT WINAPI HTMLElement2_put_oncopy(IHTMLElement2 *iface, VARIANT v)
282 {
283     HTMLElement *This = HTMLELEM2_THIS(iface);
284     FIXME("(%p)->()\n", This);
285     return E_NOTIMPL;
286 }
287
288 static HRESULT WINAPI HTMLElement2_get_oncopy(IHTMLElement2 *iface, VARIANT *p)
289 {
290     HTMLElement *This = HTMLELEM2_THIS(iface);
291     FIXME("(%p)->(%p)\n", This, p);
292     return E_NOTIMPL;
293 }
294
295 static HRESULT WINAPI HTMLElement2_put_onbeforepaste(IHTMLElement2 *iface, VARIANT v)
296 {
297     HTMLElement *This = HTMLELEM2_THIS(iface);
298     FIXME("(%p)->()\n", This);
299     return E_NOTIMPL;
300 }
301
302 static HRESULT WINAPI HTMLElement2_get_onbeforepaste(IHTMLElement2 *iface, VARIANT *p)
303 {
304     HTMLElement *This = HTMLELEM2_THIS(iface);
305     FIXME("(%p)->(%p)\n", This, p);
306     return E_NOTIMPL;
307 }
308
309 static HRESULT WINAPI HTMLElement2_put_onpaste(IHTMLElement2 *iface, VARIANT v)
310 {
311     HTMLElement *This = HTMLELEM2_THIS(iface);
312     FIXME("(%p)->()\n", This);
313     return E_NOTIMPL;
314 }
315
316 static HRESULT WINAPI HTMLElement2_get_onpaste(IHTMLElement2 *iface, VARIANT *p)
317 {
318     HTMLElement *This = HTMLELEM2_THIS(iface);
319     FIXME("(%p)->(%p)\n", This, p);
320     return E_NOTIMPL;
321 }
322
323 static HRESULT WINAPI HTMLElement2_get_currentStyle(IHTMLElement2 *iface, IHTMLCurrentStyle **p)
324 {
325     HTMLElement *This = HTMLELEM2_THIS(iface);
326     FIXME("(%p)->(%p)\n", This, p);
327     return E_NOTIMPL;
328 }
329
330 static HRESULT WINAPI HTMLElement2_put_onpropertychange(IHTMLElement2 *iface, VARIANT v)
331 {
332     HTMLElement *This = HTMLELEM2_THIS(iface);
333     FIXME("(%p)->()\n", This);
334     return E_NOTIMPL;
335 }
336
337 static HRESULT WINAPI HTMLElement2_get_onpropertychange(IHTMLElement2 *iface, VARIANT *p)
338 {
339     HTMLElement *This = HTMLELEM2_THIS(iface);
340     FIXME("(%p)->(%p)\n", This, p);
341     return E_NOTIMPL;
342 }
343
344 static HRESULT WINAPI HTMLElement2_getClientRects(IHTMLElement2 *iface, IHTMLRectCollection **pRectCol)
345 {
346     HTMLElement *This = HTMLELEM2_THIS(iface);
347     FIXME("(%p)->(%p)\n", This, pRectCol);
348     return E_NOTIMPL;
349 }
350
351 static HRESULT WINAPI HTMLElement2_getBoundingClientRect(IHTMLElement2 *iface, IHTMLRect **pRect)
352 {
353     HTMLElement *This = HTMLELEM2_THIS(iface);
354     FIXME("(%p)->(%p)\n", This, pRect);
355     return E_NOTIMPL;
356 }
357
358 static HRESULT WINAPI HTMLElement2_setExpression(IHTMLElement2 *iface, BSTR propname,
359                                                  BSTR expression, BSTR language)
360 {
361     HTMLElement *This = HTMLELEM2_THIS(iface);
362     FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(propname), debugstr_w(expression),
363           debugstr_w(language));
364     return E_NOTIMPL;
365 }
366
367 static HRESULT WINAPI HTMLElement2_getExpression(IHTMLElement2 *iface, BSTR propname,
368                                                  VARIANT *expression)
369 {
370     HTMLElement *This = HTMLELEM2_THIS(iface);
371     FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), expression);
372     return E_NOTIMPL;
373 }
374
375 static HRESULT WINAPI HTMLElement2_removeExpression(IHTMLElement2 *iface, BSTR propname,
376                                                     VARIANT_BOOL *pfSuccess)
377 {
378     HTMLElement *This = HTMLELEM2_THIS(iface);
379     FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), pfSuccess);
380     return E_NOTIMPL;
381 }
382
383 static HRESULT WINAPI HTMLElement2_put_tabIndex(IHTMLElement2 *iface, short v)
384 {
385     HTMLElement *This = HTMLELEM2_THIS(iface);
386     FIXME("(%p)->(%d)\n", This, v);
387     return E_NOTIMPL;
388 }
389
390 static HRESULT WINAPI HTMLElement2_get_tabIndex(IHTMLElement2 *iface, short *p)
391 {
392     HTMLElement *This = HTMLELEM2_THIS(iface);
393     FIXME("(%p)->(%p)\n", This, p);
394     return E_NOTIMPL;
395 }
396
397 static HRESULT WINAPI HTMLElement2_focus(IHTMLElement2 *iface)
398 {
399     HTMLElement *This = HTMLELEM2_THIS(iface);
400     FIXME("(%p)\n", This);
401     return E_NOTIMPL;
402 }
403
404 static HRESULT WINAPI HTMLElement2_put_accessKey(IHTMLElement2 *iface, BSTR v)
405 {
406     HTMLElement *This = HTMLELEM2_THIS(iface);
407     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
408     return E_NOTIMPL;
409 }
410
411 static HRESULT WINAPI HTMLElement2_get_accessKey(IHTMLElement2 *iface, BSTR *p)
412 {
413     HTMLElement *This = HTMLELEM2_THIS(iface);
414     FIXME("(%p)->(%p)\n", This, p);
415     return E_NOTIMPL;
416 }
417
418 static HRESULT WINAPI HTMLElement2_put_onblur(IHTMLElement2 *iface, VARIANT v)
419 {
420     HTMLElement *This = HTMLELEM2_THIS(iface);
421     FIXME("(%p)->()\n", This);
422     return E_NOTIMPL;
423 }
424
425 static HRESULT WINAPI HTMLElement2_get_onblur(IHTMLElement2 *iface, VARIANT *p)
426 {
427     HTMLElement *This = HTMLELEM2_THIS(iface);
428     FIXME("(%p)->(%p)\n", This, p);
429     return E_NOTIMPL;
430 }
431
432 static HRESULT WINAPI HTMLElement2_put_onfocus(IHTMLElement2 *iface, VARIANT v)
433 {
434     HTMLElement *This = HTMLELEM2_THIS(iface);
435     FIXME("(%p)->()\n", This);
436     return E_NOTIMPL;
437 }
438
439 static HRESULT WINAPI HTMLElement2_get_onfocus(IHTMLElement2 *iface, VARIANT *p)
440 {
441     HTMLElement *This = HTMLELEM2_THIS(iface);
442     FIXME("(%p)->(%p)\n", This, p);
443     return E_NOTIMPL;
444 }
445
446 static HRESULT WINAPI HTMLElement2_put_onresize(IHTMLElement2 *iface, VARIANT v)
447 {
448     HTMLElement *This = HTMLELEM2_THIS(iface);
449     FIXME("(%p)->()\n", This);
450     return E_NOTIMPL;
451 }
452
453 static HRESULT WINAPI HTMLElement2_get_onresize(IHTMLElement2 *iface, VARIANT *p)
454 {
455     HTMLElement *This = HTMLELEM2_THIS(iface);
456     FIXME("(%p)->(%p)\n", This, p);
457     return E_NOTIMPL;
458 }
459
460 static HRESULT WINAPI HTMLElement2_blur(IHTMLElement2 *iface)
461 {
462     HTMLElement *This = HTMLELEM2_THIS(iface);
463     FIXME("(%p)\n", This);
464     return E_NOTIMPL;
465 }
466
467 static HRESULT WINAPI HTMLElement2_addFilter(IHTMLElement2 *iface, IUnknown *pUnk)
468 {
469     HTMLElement *This = HTMLELEM2_THIS(iface);
470     FIXME("(%p)->(%p)\n", This, pUnk);
471     return E_NOTIMPL;
472 }
473
474 static HRESULT WINAPI HTMLElement2_removeFilter(IHTMLElement2 *iface, IUnknown *pUnk)
475 {
476     HTMLElement *This = HTMLELEM2_THIS(iface);
477     FIXME("(%p)->(%p)\n", This, pUnk);
478     return E_NOTIMPL;
479 }
480
481 static HRESULT WINAPI HTMLElement2_get_clientHeight(IHTMLElement2 *iface, long *p)
482 {
483     HTMLElement *This = HTMLELEM2_THIS(iface);
484     FIXME("(%p)->(%p)\n", This, p);
485     return E_NOTIMPL;
486 }
487
488 static HRESULT WINAPI HTMLElement2_get_clientWidth(IHTMLElement2 *iface, long *p)
489 {
490     HTMLElement *This = HTMLELEM2_THIS(iface);
491     FIXME("(%p)->(%p)\n", This, p);
492     return E_NOTIMPL;
493 }
494
495 static HRESULT WINAPI HTMLElement2_get_clientTop(IHTMLElement2 *iface, long *p)
496 {
497     HTMLElement *This = HTMLELEM2_THIS(iface);
498     FIXME("(%p)->(%p)\n", This, p);
499     return E_NOTIMPL;
500 }
501
502 static HRESULT WINAPI HTMLElement2_get_clientLeft(IHTMLElement2 *iface, long *p)
503 {
504     HTMLElement *This = HTMLELEM2_THIS(iface);
505     FIXME("(%p)->(%p)\n", This, p);
506     return E_NOTIMPL;
507 }
508
509 static HRESULT WINAPI HTMLElement2_attachEvent(IHTMLElement2 *iface, BSTR event,
510                                                IDispatch *pDisp, VARIANT_BOOL *pfResult)
511 {
512     HTMLElement *This = HTMLELEM2_THIS(iface);
513     FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(event), pDisp, pfResult);
514     return E_NOTIMPL;
515 }
516
517 static HRESULT WINAPI HTMLElement2_detachEvent(IHTMLElement2 *iface, BSTR event, IDispatch *pDisp)
518 {
519     HTMLElement *This = HTMLELEM2_THIS(iface);
520     FIXME("(%p)->(%s %p)\n", This, debugstr_w(event), pDisp);
521     return E_NOTIMPL;
522 }
523
524 static HRESULT WINAPI HTMLElement2_get_readyState(IHTMLElement2 *iface, VARIANT *p)
525 {
526     HTMLElement *This = HTMLELEM2_THIS(iface);
527     FIXME("(%p)->(%p)\n", This, p);
528     return E_NOTIMPL;
529 }
530
531 static HRESULT WINAPI HTMLElement2_put_onreadystatechange(IHTMLElement2 *iface, VARIANT v)
532 {
533     HTMLElement *This = HTMLELEM2_THIS(iface);
534     FIXME("(%p)->()\n", This);
535     return E_NOTIMPL;
536 }
537
538 static HRESULT WINAPI HTMLElement2_get_onreadystatechange(IHTMLElement2 *iface, VARIANT *p)
539 {
540     HTMLElement *This = HTMLELEM2_THIS(iface);
541     FIXME("(%p)->(%p)\n", This, p);
542     return E_NOTIMPL;
543 }
544
545 static HRESULT WINAPI HTMLElement2_put_onrowsdelete(IHTMLElement2 *iface, VARIANT v)
546 {
547     HTMLElement *This = HTMLELEM2_THIS(iface);
548     FIXME("(%p)->()\n", This);
549     return E_NOTIMPL;
550 }
551
552 static HRESULT WINAPI HTMLElement2_get_onrowsdelete(IHTMLElement2 *iface, VARIANT *p)
553 {
554     HTMLElement *This = HTMLELEM2_THIS(iface);
555     FIXME("(%p)->(%p)\n", This, p);
556     return E_NOTIMPL;
557 }
558
559 static HRESULT WINAPI HTMLElement2_put_onrowsinserted(IHTMLElement2 *iface, VARIANT v)
560 {
561     HTMLElement *This = HTMLELEM2_THIS(iface);
562     FIXME("(%p)->()\n", This);
563     return E_NOTIMPL;
564 }
565
566 static HRESULT WINAPI HTMLElement2_get_onrowsinserted(IHTMLElement2 *iface, VARIANT *p)
567 {
568     HTMLElement *This = HTMLELEM2_THIS(iface);
569     FIXME("(%p)->(%p)\n", This, p);
570     return E_NOTIMPL;
571 }
572
573 static HRESULT WINAPI HTMLElement2_put_oncellchange(IHTMLElement2 *iface, VARIANT v)
574 {
575     HTMLElement *This = HTMLELEM2_THIS(iface);
576     FIXME("(%p)->()\n", This);
577     return E_NOTIMPL;
578 }
579
580 static HRESULT WINAPI HTMLElement2_get_oncellchange(IHTMLElement2 *iface, VARIANT *p)
581 {
582     HTMLElement *This = HTMLELEM2_THIS(iface);
583     FIXME("(%p)->(%p)\n", This, p);
584     return E_NOTIMPL;
585 }
586
587 static HRESULT WINAPI HTMLElement2_put_dir(IHTMLElement2 *iface, BSTR v)
588 {
589     HTMLElement *This = HTMLELEM2_THIS(iface);
590     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
591     return E_NOTIMPL;
592 }
593
594 static HRESULT WINAPI HTMLElement2_get_dir(IHTMLElement2 *iface, BSTR *p)
595 {
596     HTMLElement *This = HTMLELEM2_THIS(iface);
597
598     TRACE("(%p)->(%p)\n", This, p);
599
600     *p = NULL;
601
602     if(This->nselem) {
603         nsAString dir_str;
604         nsresult nsres;
605
606         nsAString_Init(&dir_str, NULL);
607
608         nsres = nsIDOMHTMLElement_GetDir(This->nselem, &dir_str);
609         if(NS_SUCCEEDED(nsres)) {
610             const PRUnichar *dir;
611             nsAString_GetData(&dir_str, &dir);
612             if(*dir)
613                 *p = SysAllocString(dir);
614         }else {
615             ERR("GetDir failed: %08x\n", nsres);
616         }
617
618         nsAString_Finish(&dir_str);
619     }
620
621     TRACE("ret %s\n", debugstr_w(*p));
622     return S_OK;
623 }
624
625 static HRESULT WINAPI HTMLElement2_createControlRange(IHTMLElement2 *iface, IDispatch **range)
626 {
627     HTMLElement *This = HTMLELEM2_THIS(iface);
628     FIXME("(%p)->(%p)\n", This, range);
629     return E_NOTIMPL;
630 }
631
632 static HRESULT WINAPI HTMLElement2_get_scrollHeight(IHTMLElement2 *iface, long *p)
633 {
634     HTMLElement *This = HTMLELEM2_THIS(iface);
635     FIXME("(%p)->(%p)\n", This, p);
636     return E_NOTIMPL;
637 }
638
639 static HRESULT WINAPI HTMLElement2_get_scrollWidth(IHTMLElement2 *iface, long *p)
640 {
641     HTMLElement *This = HTMLELEM2_THIS(iface);
642     FIXME("(%p)->(%p)\n", This, p);
643     return E_NOTIMPL;
644 }
645
646 static HRESULT WINAPI HTMLElement2_put_scrollTop(IHTMLElement2 *iface, long v)
647 {
648     HTMLElement *This = HTMLELEM2_THIS(iface);
649     nsIDOMNSHTMLElement *nselem;
650     nsresult nsres;
651
652     TRACE("(%p)->(%ld)\n", This, v);
653
654     nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
655     if(NS_SUCCEEDED(nsres)) {
656         nsIDOMNSHTMLElement_SetScrollTop(nselem, v);
657         nsIDOMNSHTMLElement_Release(nselem);
658     }else {
659         ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
660     }
661
662     return S_OK;
663 }
664
665 static HRESULT WINAPI HTMLElement2_get_scrollTop(IHTMLElement2 *iface, long *p)
666 {
667     HTMLElement *This = HTMLELEM2_THIS(iface);
668     FIXME("(%p)->(%p)\n", This, p);
669     return E_NOTIMPL;
670 }
671
672 static HRESULT WINAPI HTMLElement2_put_scrollLeft(IHTMLElement2 *iface, long v)
673 {
674     HTMLElement *This = HTMLELEM2_THIS(iface);
675     nsIDOMNSHTMLElement *nselem;
676     nsresult nsres;
677
678     TRACE("(%p)->(%ld)\n", This, v);
679
680     nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
681     if(NS_SUCCEEDED(nsres)) {
682         nsIDOMNSHTMLElement_SetScrollLeft(nselem, v);
683         nsIDOMNSHTMLElement_Release(nselem);
684     }else {
685         ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
686     }
687
688     return S_OK;
689 }
690
691 static HRESULT WINAPI HTMLElement2_get_scrollLeft(IHTMLElement2 *iface, long *p)
692 {
693     HTMLElement *This = HTMLELEM2_THIS(iface);
694     FIXME("(%p)->(%p)\n", This, p);
695     return E_NOTIMPL;
696 }
697
698 static HRESULT WINAPI HTMLElement2_clearAttributes(IHTMLElement2 *iface)
699 {
700     HTMLElement *This = HTMLELEM2_THIS(iface);
701     FIXME("(%p)\n", This);
702     return E_NOTIMPL;
703 }
704
705 static HRESULT WINAPI HTMLElement2_mergeAttributes(IHTMLElement2 *iface, IHTMLElement *mergeThis)
706 {
707     HTMLElement *This = HTMLELEM2_THIS(iface);
708     FIXME("(%p)->(%p)\n", This, mergeThis);
709     return E_NOTIMPL;
710 }
711
712 static HRESULT WINAPI HTMLElement2_put_oncontextmenu(IHTMLElement2 *iface, VARIANT v)
713 {
714     HTMLElement *This = HTMLELEM2_THIS(iface);
715     FIXME("(%p)->()\n", This);
716     return E_NOTIMPL;
717 }
718
719 static HRESULT WINAPI HTMLElement2_get_oncontextmenu(IHTMLElement2 *iface, VARIANT *p)
720 {
721     HTMLElement *This = HTMLELEM2_THIS(iface);
722     FIXME("(%p)->(%p)\n", This, p);
723     return E_NOTIMPL;
724 }
725
726 static HRESULT WINAPI HTMLElement2_insertAdjecentElement(IHTMLElement2 *iface, BSTR where,
727         IHTMLElement *insertedElement, IHTMLElement **inserted)
728 {
729     HTMLElement *This = HTMLELEM2_THIS(iface);
730     FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(where), insertedElement, inserted);
731     return E_NOTIMPL;
732 }
733
734 static HRESULT WINAPI HTMLElement2_applyElement(IHTMLElement2 *iface, IHTMLElement *apply,
735                                                 BSTR where, IHTMLElement **applied)
736 {
737     HTMLElement *This = HTMLELEM2_THIS(iface);
738     FIXME("(%p)->(%p %s %p)\n", This, apply, debugstr_w(where), applied);
739     return E_NOTIMPL;
740 }
741
742 static HRESULT WINAPI HTMLElement2_getAdjecentText(IHTMLElement2 *iface, BSTR where, BSTR *text)
743 {
744     HTMLElement *This = HTMLELEM2_THIS(iface);
745     FIXME("(%p)->(%s %p)\n", This, debugstr_w(where), text);
746     return E_NOTIMPL;
747 }
748
749 static HRESULT WINAPI HTMLElement2_replaceAdjecentText(IHTMLElement2 *iface, BSTR where,
750                                                        BSTR newText, BSTR *oldText)
751 {
752     HTMLElement *This = HTMLELEM2_THIS(iface);
753     FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(where), debugstr_w(newText), oldText);
754     return E_NOTIMPL;
755 }
756
757 static HRESULT WINAPI HTMLElement2_get_canHandleChildren(IHTMLElement2 *iface, VARIANT_BOOL *p)
758 {
759     HTMLElement *This = HTMLELEM2_THIS(iface);
760     FIXME("(%p)->(%p)\n", This, p);
761     return E_NOTIMPL;
762 }
763
764 static HRESULT WINAPI HTMLElement2_addBehavior(IHTMLElement2 *iface, BSTR bstrUrl,
765                                                VARIANT *pvarFactory, long *pCookie)
766 {
767     HTMLElement *This = HTMLELEM2_THIS(iface);
768     FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(bstrUrl), pvarFactory, pCookie);
769     return E_NOTIMPL;
770 }
771
772 static HRESULT WINAPI HTMLElement2_removeBehavior(IHTMLElement2 *iface, long cookie,
773                                                   VARIANT_BOOL *pfResult)
774 {
775     HTMLElement *This = HTMLELEM2_THIS(iface);
776     FIXME("(%p)->(%ld %p)\n", This, cookie, pfResult);
777     return E_NOTIMPL;
778 }
779
780 static HRESULT WINAPI HTMLElement2_get_runtimeStyle(IHTMLElement2 *iface, IHTMLStyle **p)
781 {
782     HTMLElement *This = HTMLELEM2_THIS(iface);
783     FIXME("(%p)->(%p)\n", This, p);
784     return E_NOTIMPL;
785 }
786
787 static HRESULT WINAPI HTMLElement2_get_behaviorUrns(IHTMLElement2 *iface, IDispatch **p)
788 {
789     HTMLElement *This = HTMLELEM2_THIS(iface);
790     FIXME("(%p)->(%p)\n", This, p);
791     return E_NOTIMPL;
792 }
793
794 static HRESULT WINAPI HTMLElement2_put_tagUrn(IHTMLElement2 *iface, BSTR v)
795 {
796     HTMLElement *This = HTMLELEM2_THIS(iface);
797     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
798     return E_NOTIMPL;
799 }
800
801 static HRESULT WINAPI HTMLElement2_get_tagUrn(IHTMLElement2 *iface, BSTR *p)
802 {
803     HTMLElement *This = HTMLELEM2_THIS(iface);
804     FIXME("(%p)->(%p)\n", This, p);
805     return E_NOTIMPL;
806 }
807
808 static HRESULT WINAPI HTMLElement2_put_onbeforeeditfocus(IHTMLElement2 *iface, VARIANT vv)
809 {
810     HTMLElement *This = HTMLELEM2_THIS(iface);
811     FIXME("(%p)->()\n", This);
812     return E_NOTIMPL;
813 }
814
815 static HRESULT WINAPI HTMLElement2_get_onbeforeeditfocus(IHTMLElement2 *iface, VARIANT *p)
816 {
817     HTMLElement *This = HTMLELEM2_THIS(iface);
818     FIXME("(%p)->(%p)\n", This, p);
819     return E_NOTIMPL;
820 }
821
822 static HRESULT WINAPI HTMLElement2_get_readyStateValue(IHTMLElement2 *iface, long *p)
823 {
824     HTMLElement *This = HTMLELEM2_THIS(iface);
825     FIXME("(%p)->(%p)\n", This, p);
826     return E_NOTIMPL;
827 }
828
829 static HRESULT WINAPI HTMLElement2_getElementByTagName(IHTMLElement2 *iface, BSTR v,
830                                                        IHTMLElementCollection **pelColl)
831 {
832     HTMLElement *This = HTMLELEM2_THIS(iface);
833     FIXME("(%p)->(%s %p)\n", This, debugstr_w(v), pelColl);
834     return E_NOTIMPL;
835 }
836
837 #undef HTMLELEM2_THIS
838
839 static const IHTMLElement2Vtbl HTMLElement2Vtbl = {
840     HTMLElement2_QueryInterface,
841     HTMLElement2_AddRef,
842     HTMLElement2_Release,
843     HTMLElement2_GetTypeInfoCount,
844     HTMLElement2_GetTypeInfo,
845     HTMLElement2_GetIDsOfNames,
846     HTMLElement2_Invoke,
847     HTMLElement2_get_scopeName,
848     HTMLElement2_setCapture,
849     HTMLElement2_releaseCapture,
850     HTMLElement2_put_onlosecapture,
851     HTMLElement2_get_onlosecapture,
852     HTMLElement2_componentFromPoint,
853     HTMLElement2_doScroll,
854     HTMLElement2_put_onscroll,
855     HTMLElement2_get_onscroll,
856     HTMLElement2_put_ondrag,
857     HTMLElement2_get_ondrag,
858     HTMLElement2_put_ondragend,
859     HTMLElement2_get_ondragend,
860     HTMLElement2_put_ondragenter,
861     HTMLElement2_get_ondragenter,
862     HTMLElement2_put_ondragover,
863     HTMLElement2_get_ondragover,
864     HTMLElement2_put_ondragleave,
865     HTMLElement2_get_ondragleave,
866     HTMLElement2_put_ondrop,
867     HTMLElement2_get_ondrop,
868     HTMLElement2_put_onbeforecut,
869     HTMLElement2_get_onbeforecut,
870     HTMLElement2_put_oncut,
871     HTMLElement2_get_oncut,
872     HTMLElement2_put_onbeforecopy,
873     HTMLElement2_get_onbeforecopy,
874     HTMLElement2_put_oncopy,
875     HTMLElement2_get_oncopy,
876     HTMLElement2_put_onbeforepaste,
877     HTMLElement2_get_onbeforepaste,
878     HTMLElement2_put_onpaste,
879     HTMLElement2_get_onpaste,
880     HTMLElement2_get_currentStyle,
881     HTMLElement2_put_onpropertychange,
882     HTMLElement2_get_onpropertychange,
883     HTMLElement2_getClientRects,
884     HTMLElement2_getBoundingClientRect,
885     HTMLElement2_setExpression,
886     HTMLElement2_getExpression,
887     HTMLElement2_removeExpression,
888     HTMLElement2_put_tabIndex,
889     HTMLElement2_get_tabIndex,
890     HTMLElement2_focus,
891     HTMLElement2_put_accessKey,
892     HTMLElement2_get_accessKey,
893     HTMLElement2_put_onblur,
894     HTMLElement2_get_onblur,
895     HTMLElement2_put_onfocus,
896     HTMLElement2_get_onfocus,
897     HTMLElement2_put_onresize,
898     HTMLElement2_get_onresize,
899     HTMLElement2_blur,
900     HTMLElement2_addFilter,
901     HTMLElement2_removeFilter,
902     HTMLElement2_get_clientHeight,
903     HTMLElement2_get_clientWidth,
904     HTMLElement2_get_clientTop,
905     HTMLElement2_get_clientLeft,
906     HTMLElement2_attachEvent,
907     HTMLElement2_detachEvent,
908     HTMLElement2_get_readyState,
909     HTMLElement2_put_onreadystatechange,
910     HTMLElement2_get_onreadystatechange,
911     HTMLElement2_put_onrowsdelete,
912     HTMLElement2_get_onrowsdelete,
913     HTMLElement2_put_onrowsinserted,
914     HTMLElement2_get_onrowsinserted,
915     HTMLElement2_put_oncellchange,
916     HTMLElement2_get_oncellchange,
917     HTMLElement2_put_dir,
918     HTMLElement2_get_dir,
919     HTMLElement2_createControlRange,
920     HTMLElement2_get_scrollHeight,
921     HTMLElement2_get_scrollWidth,
922     HTMLElement2_put_scrollTop,
923     HTMLElement2_get_scrollTop,
924     HTMLElement2_put_scrollLeft,
925     HTMLElement2_get_scrollLeft,
926     HTMLElement2_clearAttributes,
927     HTMLElement2_mergeAttributes,
928     HTMLElement2_put_oncontextmenu,
929     HTMLElement2_get_oncontextmenu,
930     HTMLElement2_insertAdjecentElement,
931     HTMLElement2_applyElement,
932     HTMLElement2_getAdjecentText,
933     HTMLElement2_replaceAdjecentText,
934     HTMLElement2_get_canHandleChildren,
935     HTMLElement2_addBehavior,
936     HTMLElement2_removeBehavior,
937     HTMLElement2_get_runtimeStyle,
938     HTMLElement2_get_behaviorUrns,
939     HTMLElement2_put_tagUrn,
940     HTMLElement2_get_tagUrn,
941     HTMLElement2_put_onbeforeeditfocus,
942     HTMLElement2_get_onbeforeeditfocus,
943     HTMLElement2_get_readyStateValue,
944     HTMLElement2_getElementByTagName,
945 };
946
947 void HTMLElement2_Init(HTMLElement *This)
948 {
949     This->lpHTMLElement2Vtbl = &HTMLElement2Vtbl;
950 }