sync with trunk r46493
[reactos.git] / dll / win32 / 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 #include "htmlevent.h"
33
34 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
35
36 #define HTMLELEM2_THIS(iface) DEFINE_THIS(HTMLElement, HTMLElement2, iface)
37
38 static HRESULT WINAPI HTMLElement2_QueryInterface(IHTMLElement2 *iface,
39 REFIID riid, void **ppv)
40 {
41 HTMLElement *This = HTMLELEM2_THIS(iface);
42 return IHTMLElement_QueryInterface(HTMLELEM(This), riid, ppv);
43 }
44
45 static ULONG WINAPI HTMLElement2_AddRef(IHTMLElement2 *iface)
46 {
47 HTMLElement *This = HTMLELEM2_THIS(iface);
48 return IHTMLElement_AddRef(HTMLELEM(This));
49 }
50
51 static ULONG WINAPI HTMLElement2_Release(IHTMLElement2 *iface)
52 {
53 HTMLElement *This = HTMLELEM2_THIS(iface);
54 return IHTMLElement_Release(HTMLELEM(This));
55 }
56
57 static HRESULT WINAPI HTMLElement2_GetTypeInfoCount(IHTMLElement2 *iface, UINT *pctinfo)
58 {
59 HTMLElement *This = HTMLELEM2_THIS(iface);
60 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->node.dispex), pctinfo);
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 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->node.dispex), iTInfo, lcid, ppTInfo);
68 }
69
70 static HRESULT WINAPI HTMLElement2_GetIDsOfNames(IHTMLElement2 *iface, REFIID riid,
71 LPOLESTR *rgszNames, UINT cNames,
72 LCID lcid, DISPID *rgDispId)
73 {
74 HTMLElement *This = HTMLELEM2_THIS(iface);
75 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->node.dispex), riid, rgszNames, cNames, lcid, rgDispId);
76 }
77
78 static HRESULT WINAPI HTMLElement2_Invoke(IHTMLElement2 *iface, DISPID dispIdMember,
79 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
80 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
81 {
82 HTMLElement *This = HTMLELEM2_THIS(iface);
83 return IDispatchEx_Invoke(DISPATCHEX(&This->node.dispex), dispIdMember, riid, lcid,
84 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
85 }
86
87 static HRESULT WINAPI HTMLElement2_get_scopeName(IHTMLElement2 *iface, BSTR *p)
88 {
89 HTMLElement *This = HTMLELEM2_THIS(iface);
90 FIXME("(%p)->(%p)\n", This, p);
91 return E_NOTIMPL;
92 }
93
94 static HRESULT WINAPI HTMLElement2_setCapture(IHTMLElement2 *iface, VARIANT_BOOL containerCapture)
95 {
96 HTMLElement *This = HTMLELEM2_THIS(iface);
97 FIXME("(%p)->(%x)\n", This, containerCapture);
98 return E_NOTIMPL;
99 }
100
101 static HRESULT WINAPI HTMLElement2_releaseCapture(IHTMLElement2 *iface)
102 {
103 HTMLElement *This = HTMLELEM2_THIS(iface);
104 FIXME("(%p)\n", This);
105 return E_NOTIMPL;
106 }
107
108 static HRESULT WINAPI HTMLElement2_put_onlosecapture(IHTMLElement2 *iface, VARIANT v)
109 {
110 HTMLElement *This = HTMLELEM2_THIS(iface);
111 FIXME("(%p)->()\n", This);
112 return E_NOTIMPL;
113 }
114
115 static HRESULT WINAPI HTMLElement2_get_onlosecapture(IHTMLElement2 *iface, VARIANT *p)
116 {
117 HTMLElement *This = HTMLELEM2_THIS(iface);
118 FIXME("(%p)->(%p)\n", This, p);
119 return E_NOTIMPL;
120 }
121
122 static HRESULT WINAPI HTMLElement2_componentFromPoint(IHTMLElement2 *iface,
123 LONG x, LONG y, BSTR *component)
124 {
125 HTMLElement *This = HTMLELEM2_THIS(iface);
126 FIXME("(%p)->(%d %d %p)\n", This, x, y, component);
127 return E_NOTIMPL;
128 }
129
130 static HRESULT WINAPI HTMLElement2_doScroll(IHTMLElement2 *iface, VARIANT component)
131 {
132 HTMLElement *This = HTMLELEM2_THIS(iface);
133
134 TRACE("(%p)->(%s)\n", This, debugstr_variant(&component));
135
136 if(!This->node.doc->content_ready
137 || !This->node.doc->basedoc.doc_obj->in_place_active)
138 return E_PENDING;
139
140 WARN("stub\n");
141 return S_OK;
142 }
143
144 static HRESULT WINAPI HTMLElement2_put_onscroll(IHTMLElement2 *iface, VARIANT v)
145 {
146 HTMLElement *This = HTMLELEM2_THIS(iface);
147 FIXME("(%p)->()\n", This);
148 return E_NOTIMPL;
149 }
150
151 static HRESULT WINAPI HTMLElement2_get_onscroll(IHTMLElement2 *iface, VARIANT *p)
152 {
153 HTMLElement *This = HTMLELEM2_THIS(iface);
154 FIXME("(%p)->(%p)\n", This, p);
155 return E_NOTIMPL;
156 }
157
158 static HRESULT WINAPI HTMLElement2_put_ondrag(IHTMLElement2 *iface, VARIANT v)
159 {
160 HTMLElement *This = HTMLELEM2_THIS(iface);
161
162 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
163
164 return set_node_event(&This->node, EVENTID_DRAG, &v);
165 }
166
167 static HRESULT WINAPI HTMLElement2_get_ondrag(IHTMLElement2 *iface, VARIANT *p)
168 {
169 HTMLElement *This = HTMLELEM2_THIS(iface);
170
171 TRACE("(%p)->(%p)\n", This, p);
172
173 return get_node_event(&This->node, EVENTID_DRAG, p);
174 }
175
176 static HRESULT WINAPI HTMLElement2_put_ondragend(IHTMLElement2 *iface, VARIANT v)
177 {
178 HTMLElement *This = HTMLELEM2_THIS(iface);
179 FIXME("(%p)->()\n", This);
180 return E_NOTIMPL;
181 }
182
183 static HRESULT WINAPI HTMLElement2_get_ondragend(IHTMLElement2 *iface, VARIANT *p)
184 {
185 HTMLElement *This = HTMLELEM2_THIS(iface);
186 FIXME("(%p)->(%p)\n", This, p);
187 return E_NOTIMPL;
188 }
189
190 static HRESULT WINAPI HTMLElement2_put_ondragenter(IHTMLElement2 *iface, VARIANT v)
191 {
192 HTMLElement *This = HTMLELEM2_THIS(iface);
193 FIXME("(%p)->()\n", This);
194 return E_NOTIMPL;
195 }
196
197 static HRESULT WINAPI HTMLElement2_get_ondragenter(IHTMLElement2 *iface, VARIANT *p)
198 {
199 HTMLElement *This = HTMLELEM2_THIS(iface);
200 FIXME("(%p)->(%p)\n", This, p);
201 return E_NOTIMPL;
202 }
203
204 static HRESULT WINAPI HTMLElement2_put_ondragover(IHTMLElement2 *iface, VARIANT v)
205 {
206 HTMLElement *This = HTMLELEM2_THIS(iface);
207 FIXME("(%p)->()\n", This);
208 return E_NOTIMPL;
209 }
210
211 static HRESULT WINAPI HTMLElement2_get_ondragover(IHTMLElement2 *iface, VARIANT *p)
212 {
213 HTMLElement *This = HTMLELEM2_THIS(iface);
214 FIXME("(%p)->(%p)\n", This, p);
215 return E_NOTIMPL;
216 }
217
218 static HRESULT WINAPI HTMLElement2_put_ondragleave(IHTMLElement2 *iface, VARIANT v)
219 {
220 HTMLElement *This = HTMLELEM2_THIS(iface);
221 FIXME("(%p)->()\n", This);
222 return E_NOTIMPL;
223 }
224
225 static HRESULT WINAPI HTMLElement2_get_ondragleave(IHTMLElement2 *iface, VARIANT *p)
226 {
227 HTMLElement *This = HTMLELEM2_THIS(iface);
228 FIXME("(%p)->(%p)\n", This, p);
229 return E_NOTIMPL;
230 }
231
232 static HRESULT WINAPI HTMLElement2_put_ondrop(IHTMLElement2 *iface, VARIANT v)
233 {
234 HTMLElement *This = HTMLELEM2_THIS(iface);
235 FIXME("(%p)->()\n", This);
236 return E_NOTIMPL;
237 }
238
239 static HRESULT WINAPI HTMLElement2_get_ondrop(IHTMLElement2 *iface, VARIANT *p)
240 {
241 HTMLElement *This = HTMLELEM2_THIS(iface);
242 FIXME("(%p)->(%p)\n", This, p);
243 return E_NOTIMPL;
244 }
245
246 static HRESULT WINAPI HTMLElement2_put_onbeforecut(IHTMLElement2 *iface, VARIANT v)
247 {
248 HTMLElement *This = HTMLELEM2_THIS(iface);
249 FIXME("(%p)->()\n", This);
250 return E_NOTIMPL;
251 }
252
253 static HRESULT WINAPI HTMLElement2_get_onbeforecut(IHTMLElement2 *iface, VARIANT *p)
254 {
255 HTMLElement *This = HTMLELEM2_THIS(iface);
256 FIXME("(%p)->(%p)\n", This, p);
257 return E_NOTIMPL;
258 }
259
260 static HRESULT WINAPI HTMLElement2_put_oncut(IHTMLElement2 *iface, VARIANT v)
261 {
262 HTMLElement *This = HTMLELEM2_THIS(iface);
263 FIXME("(%p)->()\n", This);
264 return E_NOTIMPL;
265 }
266
267 static HRESULT WINAPI HTMLElement2_get_oncut(IHTMLElement2 *iface, VARIANT *p)
268 {
269 HTMLElement *This = HTMLELEM2_THIS(iface);
270 FIXME("(%p)->(%p)\n", This, p);
271 return E_NOTIMPL;
272 }
273
274 static HRESULT WINAPI HTMLElement2_put_onbeforecopy(IHTMLElement2 *iface, VARIANT v)
275 {
276 HTMLElement *This = HTMLELEM2_THIS(iface);
277 FIXME("(%p)->()\n", This);
278 return E_NOTIMPL;
279 }
280
281 static HRESULT WINAPI HTMLElement2_get_onbeforecopy(IHTMLElement2 *iface, VARIANT *p)
282 {
283 HTMLElement *This = HTMLELEM2_THIS(iface);
284 FIXME("(%p)->(%p)\n", This, p);
285 return E_NOTIMPL;
286 }
287
288 static HRESULT WINAPI HTMLElement2_put_oncopy(IHTMLElement2 *iface, VARIANT v)
289 {
290 HTMLElement *This = HTMLELEM2_THIS(iface);
291 FIXME("(%p)->()\n", This);
292 return E_NOTIMPL;
293 }
294
295 static HRESULT WINAPI HTMLElement2_get_oncopy(IHTMLElement2 *iface, VARIANT *p)
296 {
297 HTMLElement *This = HTMLELEM2_THIS(iface);
298 FIXME("(%p)->(%p)\n", This, p);
299 return E_NOTIMPL;
300 }
301
302 static HRESULT WINAPI HTMLElement2_put_onbeforepaste(IHTMLElement2 *iface, VARIANT v)
303 {
304 HTMLElement *This = HTMLELEM2_THIS(iface);
305 FIXME("(%p)->()\n", This);
306 return E_NOTIMPL;
307 }
308
309 static HRESULT WINAPI HTMLElement2_get_onbeforepaste(IHTMLElement2 *iface, VARIANT *p)
310 {
311 HTMLElement *This = HTMLELEM2_THIS(iface);
312 FIXME("(%p)->(%p)\n", This, p);
313 return E_NOTIMPL;
314 }
315
316 static HRESULT WINAPI HTMLElement2_put_onpaste(IHTMLElement2 *iface, VARIANT v)
317 {
318 HTMLElement *This = HTMLELEM2_THIS(iface);
319
320 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
321
322 return set_node_event(&This->node, EVENTID_PASTE, &v);
323 }
324
325 static HRESULT WINAPI HTMLElement2_get_onpaste(IHTMLElement2 *iface, VARIANT *p)
326 {
327 HTMLElement *This = HTMLELEM2_THIS(iface);
328
329 TRACE("(%p)->(%p)\n", This, p);
330
331 return get_node_event(&This->node, EVENTID_PASTE, p);
332 }
333
334 static HRESULT WINAPI HTMLElement2_get_currentStyle(IHTMLElement2 *iface, IHTMLCurrentStyle **p)
335 {
336 HTMLElement *This = HTMLELEM2_THIS(iface);
337
338 TRACE("(%p)->(%p)\n", This, p);
339
340 return HTMLCurrentStyle_Create(This, p);
341 }
342
343 static HRESULT WINAPI HTMLElement2_put_onpropertychange(IHTMLElement2 *iface, VARIANT v)
344 {
345 HTMLElement *This = HTMLELEM2_THIS(iface);
346 FIXME("(%p)->()\n", This);
347 return E_NOTIMPL;
348 }
349
350 static HRESULT WINAPI HTMLElement2_get_onpropertychange(IHTMLElement2 *iface, VARIANT *p)
351 {
352 HTMLElement *This = HTMLELEM2_THIS(iface);
353 FIXME("(%p)->(%p)\n", This, p);
354 return E_NOTIMPL;
355 }
356
357 static HRESULT WINAPI HTMLElement2_getClientRects(IHTMLElement2 *iface, IHTMLRectCollection **pRectCol)
358 {
359 HTMLElement *This = HTMLELEM2_THIS(iface);
360 FIXME("(%p)->(%p)\n", This, pRectCol);
361 return E_NOTIMPL;
362 }
363
364 static HRESULT WINAPI HTMLElement2_getBoundingClientRect(IHTMLElement2 *iface, IHTMLRect **pRect)
365 {
366 HTMLElement *This = HTMLELEM2_THIS(iface);
367 FIXME("(%p)->(%p)\n", This, pRect);
368 return E_NOTIMPL;
369 }
370
371 static HRESULT WINAPI HTMLElement2_setExpression(IHTMLElement2 *iface, BSTR propname,
372 BSTR expression, BSTR language)
373 {
374 HTMLElement *This = HTMLELEM2_THIS(iface);
375 FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(propname), debugstr_w(expression),
376 debugstr_w(language));
377 return E_NOTIMPL;
378 }
379
380 static HRESULT WINAPI HTMLElement2_getExpression(IHTMLElement2 *iface, BSTR propname,
381 VARIANT *expression)
382 {
383 HTMLElement *This = HTMLELEM2_THIS(iface);
384 FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), expression);
385 return E_NOTIMPL;
386 }
387
388 static HRESULT WINAPI HTMLElement2_removeExpression(IHTMLElement2 *iface, BSTR propname,
389 VARIANT_BOOL *pfSuccess)
390 {
391 HTMLElement *This = HTMLELEM2_THIS(iface);
392 FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), pfSuccess);
393 return E_NOTIMPL;
394 }
395
396 static HRESULT WINAPI HTMLElement2_put_tabIndex(IHTMLElement2 *iface, short v)
397 {
398 HTMLElement *This = HTMLELEM2_THIS(iface);
399 nsIDOMNSHTMLElement *nselem;
400 nsresult nsres;
401
402 TRACE("(%p)->(%d)\n", This, v);
403
404 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
405 if(NS_FAILED(nsres)) {
406 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
407 return S_OK;
408 }
409
410 nsres = nsIDOMNSHTMLElement_SetTabIndex(nselem, v);
411 nsIDOMNSHTMLElement_Release(nselem);
412 if(NS_FAILED(nsres))
413 ERR("GetTabIndex failed: %08x\n", nsres);
414
415 return S_OK;
416 }
417
418 static HRESULT WINAPI HTMLElement2_get_tabIndex(IHTMLElement2 *iface, short *p)
419 {
420 HTMLElement *This = HTMLELEM2_THIS(iface);
421 nsIDOMNSHTMLElement *nselem;
422 PRInt32 index = 0;
423 nsresult nsres;
424
425 TRACE("(%p)->(%p)\n", This, p);
426
427 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
428 if(NS_FAILED(nsres)) {
429 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
430 return E_FAIL;
431 }
432
433 nsres = nsIDOMNSHTMLElement_GetTabIndex(nselem, &index);
434 nsIDOMNSHTMLElement_Release(nselem);
435 if(NS_FAILED(nsres)) {
436 ERR("GetTabIndex failed: %08x\n", nsres);
437 return E_FAIL;
438 }
439
440 *p = index;
441 return S_OK;
442 }
443
444 static HRESULT WINAPI HTMLElement2_focus(IHTMLElement2 *iface)
445 {
446 HTMLElement *This = HTMLELEM2_THIS(iface);
447 nsIDOMNSHTMLElement *nselem;
448 nsresult nsres;
449
450 TRACE("(%p)\n", This);
451
452 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
453 if(NS_SUCCEEDED(nsres)) {
454 nsIDOMNSHTMLElement_Focus(nselem);
455 nsIDOMNSHTMLElement_Release(nselem);
456 }else {
457 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
458 }
459
460 return S_OK;
461 }
462
463 static HRESULT WINAPI HTMLElement2_put_accessKey(IHTMLElement2 *iface, BSTR v)
464 {
465 HTMLElement *This = HTMLELEM2_THIS(iface);
466 VARIANT var;
467
468 static WCHAR accessKeyW[] = {'a','c','c','e','s','s','K','e','y',0};
469
470 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
471
472 V_VT(&var) = VT_BSTR;
473 V_BSTR(&var) = v;
474 return IHTMLElement_setAttribute(HTMLELEM(This), accessKeyW, var, 0);
475 }
476
477 static HRESULT WINAPI HTMLElement2_get_accessKey(IHTMLElement2 *iface, BSTR *p)
478 {
479 HTMLElement *This = HTMLELEM2_THIS(iface);
480 FIXME("(%p)->(%p)\n", This, p);
481 return E_NOTIMPL;
482 }
483
484 static HRESULT WINAPI HTMLElement2_put_onblur(IHTMLElement2 *iface, VARIANT v)
485 {
486 HTMLElement *This = HTMLELEM2_THIS(iface);
487
488 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
489
490 return set_node_event(&This->node, EVENTID_BLUR, &v);
491 }
492
493 static HRESULT WINAPI HTMLElement2_get_onblur(IHTMLElement2 *iface, VARIANT *p)
494 {
495 HTMLElement *This = HTMLELEM2_THIS(iface);
496
497 TRACE("(%p)->(%p)\n", This, p);
498
499 return get_node_event(&This->node, EVENTID_BLUR, p);
500 }
501
502 static HRESULT WINAPI HTMLElement2_put_onfocus(IHTMLElement2 *iface, VARIANT v)
503 {
504 HTMLElement *This = HTMLELEM2_THIS(iface);
505
506 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
507
508 return set_node_event(&This->node, EVENTID_FOCUS, &v);
509 }
510
511 static HRESULT WINAPI HTMLElement2_get_onfocus(IHTMLElement2 *iface, VARIANT *p)
512 {
513 HTMLElement *This = HTMLELEM2_THIS(iface);
514
515 TRACE("(%p)->(%p)\n", This, p);
516
517 return get_node_event(&This->node, EVENTID_FOCUS, p);
518 }
519
520 static HRESULT WINAPI HTMLElement2_put_onresize(IHTMLElement2 *iface, VARIANT v)
521 {
522 HTMLElement *This = HTMLELEM2_THIS(iface);
523 FIXME("(%p)->()\n", This);
524 return E_NOTIMPL;
525 }
526
527 static HRESULT WINAPI HTMLElement2_get_onresize(IHTMLElement2 *iface, VARIANT *p)
528 {
529 HTMLElement *This = HTMLELEM2_THIS(iface);
530 FIXME("(%p)->(%p)\n", This, p);
531 return E_NOTIMPL;
532 }
533
534 static HRESULT WINAPI HTMLElement2_blur(IHTMLElement2 *iface)
535 {
536 HTMLElement *This = HTMLELEM2_THIS(iface);
537 FIXME("(%p)\n", This);
538 return E_NOTIMPL;
539 }
540
541 static HRESULT WINAPI HTMLElement2_addFilter(IHTMLElement2 *iface, IUnknown *pUnk)
542 {
543 HTMLElement *This = HTMLELEM2_THIS(iface);
544 FIXME("(%p)->(%p)\n", This, pUnk);
545 return E_NOTIMPL;
546 }
547
548 static HRESULT WINAPI HTMLElement2_removeFilter(IHTMLElement2 *iface, IUnknown *pUnk)
549 {
550 HTMLElement *This = HTMLELEM2_THIS(iface);
551 FIXME("(%p)->(%p)\n", This, pUnk);
552 return E_NOTIMPL;
553 }
554
555 static HRESULT WINAPI HTMLElement2_get_clientHeight(IHTMLElement2 *iface, LONG *p)
556 {
557 HTMLElement *This = HTMLELEM2_THIS(iface);
558 nsIDOMNSElement *nselem;
559 PRInt32 height=0;
560 nsresult nsres;
561
562 TRACE("(%p)->(%p)\n", This, p);
563
564 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem);
565 if(NS_SUCCEEDED(nsres)) {
566 nsIDOMNSElement_GetClientHeight(nselem, &height);
567 nsIDOMNSElement_Release(nselem);
568 }else {
569 ERR("Could not get nsIDOMNSElement: %08x\n", nsres);
570 }
571
572 *p = height;
573 return S_OK;
574 }
575
576 static HRESULT WINAPI HTMLElement2_get_clientWidth(IHTMLElement2 *iface, LONG *p)
577 {
578 HTMLElement *This = HTMLELEM2_THIS(iface);
579 nsIDOMNSElement *nselem;
580 PRInt32 width=0;
581 nsresult nsres;
582
583 TRACE("(%p)->(%p)\n", This, p);
584
585 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem);
586 if(NS_SUCCEEDED(nsres)) {
587 nsIDOMNSElement_GetClientWidth(nselem, &width);
588 nsIDOMNSElement_Release(nselem);
589 }else {
590 ERR("Could not get nsIDOMNSElement: %08x\n", nsres);
591 }
592
593 *p = width;
594 return S_OK;
595 }
596
597 static HRESULT WINAPI HTMLElement2_get_clientTop(IHTMLElement2 *iface, LONG *p)
598 {
599 HTMLElement *This = HTMLELEM2_THIS(iface);
600 nsIDOMNSElement *nselem;
601 PRInt32 client_top = 0;
602 nsresult nsres;
603
604 TRACE("(%p)->(%p)\n", This, p);
605
606 nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem);
607 if(NS_SUCCEEDED(nsres)) {
608 nsres = nsIDOMNSElement_GetClientTop(nselem, &client_top);
609 nsIDOMNSElement_Release(nselem);
610 if(NS_FAILED(nsres))
611 ERR("GetScrollHeight failed: %08x\n", nsres);
612 }else {
613 ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres);
614 }
615
616 *p = client_top;
617 TRACE("*p = %d\n", *p);
618 return S_OK;
619 }
620
621 static HRESULT WINAPI HTMLElement2_get_clientLeft(IHTMLElement2 *iface, LONG *p)
622 {
623 HTMLElement *This = HTMLELEM2_THIS(iface);
624 nsIDOMNSElement *nselem;
625 PRInt32 client_left = 0;
626 nsresult nsres;
627
628 TRACE("(%p)->(%p)\n", This, p);
629
630 nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem);
631 if(NS_SUCCEEDED(nsres)) {
632 nsres = nsIDOMNSElement_GetClientLeft(nselem, &client_left);
633 nsIDOMNSElement_Release(nselem);
634 if(NS_FAILED(nsres))
635 ERR("GetScrollHeight failed: %08x\n", nsres);
636 }else {
637 ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres);
638 }
639
640 *p = client_left;
641 TRACE("*p = %d\n", *p);
642 return S_OK;
643 }
644
645 static HRESULT WINAPI HTMLElement2_attachEvent(IHTMLElement2 *iface, BSTR event,
646 IDispatch *pDisp, VARIANT_BOOL *pfResult)
647 {
648 HTMLElement *This = HTMLELEM2_THIS(iface);
649
650 TRACE("(%p)->(%s %p %p)\n", This, debugstr_w(event), pDisp, pfResult);
651
652 return attach_event(get_node_event_target(&This->node), This->node.nsnode, &This->node.doc->basedoc, event, pDisp, pfResult);
653 }
654
655 static HRESULT WINAPI HTMLElement2_detachEvent(IHTMLElement2 *iface, BSTR event, IDispatch *pDisp)
656 {
657 HTMLElement *This = HTMLELEM2_THIS(iface);
658
659 TRACE("(%p)->(%s %p)\n", This, debugstr_w(event), pDisp);
660
661 return detach_event(*get_node_event_target(&This->node), &This->node.doc->basedoc, event, pDisp);
662 }
663
664 static HRESULT WINAPI HTMLElement2_get_readyState(IHTMLElement2 *iface, VARIANT *p)
665 {
666 HTMLElement *This = HTMLELEM2_THIS(iface);
667 BSTR str;
668
669 TRACE("(%p)->(%p)\n", This, p);
670
671 if(This->node.vtbl->get_readystate) {
672 HRESULT hres;
673
674 hres = This->node.vtbl->get_readystate(&This->node, &str);
675 if(FAILED(hres))
676 return hres;
677 }else {
678 static const WCHAR completeW[] = {'c','o','m','p','l','e','t','e',0};
679
680 str = SysAllocString(completeW);
681 if(!str)
682 return E_OUTOFMEMORY;
683 }
684
685 V_VT(p) = VT_BSTR;
686 V_BSTR(p) = str;
687 return S_OK;
688 }
689
690 static HRESULT WINAPI HTMLElement2_put_onreadystatechange(IHTMLElement2 *iface, VARIANT v)
691 {
692 HTMLElement *This = HTMLELEM2_THIS(iface);
693
694 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
695
696 return set_node_event(&This->node, EVENTID_READYSTATECHANGE, &v);
697 }
698
699 static HRESULT WINAPI HTMLElement2_get_onreadystatechange(IHTMLElement2 *iface, VARIANT *p)
700 {
701 HTMLElement *This = HTMLELEM2_THIS(iface);
702
703 TRACE("(%p)->(%p)\n", This, p);
704
705 return get_node_event(&This->node, EVENTID_READYSTATECHANGE, p);
706 }
707
708 static HRESULT WINAPI HTMLElement2_put_onrowsdelete(IHTMLElement2 *iface, VARIANT v)
709 {
710 HTMLElement *This = HTMLELEM2_THIS(iface);
711 FIXME("(%p)->()\n", This);
712 return E_NOTIMPL;
713 }
714
715 static HRESULT WINAPI HTMLElement2_get_onrowsdelete(IHTMLElement2 *iface, VARIANT *p)
716 {
717 HTMLElement *This = HTMLELEM2_THIS(iface);
718 FIXME("(%p)->(%p)\n", This, p);
719 return E_NOTIMPL;
720 }
721
722 static HRESULT WINAPI HTMLElement2_put_onrowsinserted(IHTMLElement2 *iface, VARIANT v)
723 {
724 HTMLElement *This = HTMLELEM2_THIS(iface);
725 FIXME("(%p)->()\n", This);
726 return E_NOTIMPL;
727 }
728
729 static HRESULT WINAPI HTMLElement2_get_onrowsinserted(IHTMLElement2 *iface, VARIANT *p)
730 {
731 HTMLElement *This = HTMLELEM2_THIS(iface);
732 FIXME("(%p)->(%p)\n", This, p);
733 return E_NOTIMPL;
734 }
735
736 static HRESULT WINAPI HTMLElement2_put_oncellchange(IHTMLElement2 *iface, VARIANT v)
737 {
738 HTMLElement *This = HTMLELEM2_THIS(iface);
739 FIXME("(%p)->()\n", This);
740 return E_NOTIMPL;
741 }
742
743 static HRESULT WINAPI HTMLElement2_get_oncellchange(IHTMLElement2 *iface, VARIANT *p)
744 {
745 HTMLElement *This = HTMLELEM2_THIS(iface);
746 FIXME("(%p)->(%p)\n", This, p);
747 return E_NOTIMPL;
748 }
749
750 static HRESULT WINAPI HTMLElement2_put_dir(IHTMLElement2 *iface, BSTR v)
751 {
752 HTMLElement *This = HTMLELEM2_THIS(iface);
753 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
754 return E_NOTIMPL;
755 }
756
757 static HRESULT WINAPI HTMLElement2_get_dir(IHTMLElement2 *iface, BSTR *p)
758 {
759 HTMLElement *This = HTMLELEM2_THIS(iface);
760
761 TRACE("(%p)->(%p)\n", This, p);
762
763 *p = NULL;
764
765 if(This->nselem) {
766 nsAString dir_str;
767 nsresult nsres;
768
769 nsAString_Init(&dir_str, NULL);
770
771 nsres = nsIDOMHTMLElement_GetDir(This->nselem, &dir_str);
772 if(NS_SUCCEEDED(nsres)) {
773 const PRUnichar *dir;
774 nsAString_GetData(&dir_str, &dir);
775 if(*dir)
776 *p = SysAllocString(dir);
777 }else {
778 ERR("GetDir failed: %08x\n", nsres);
779 }
780
781 nsAString_Finish(&dir_str);
782 }
783
784 TRACE("ret %s\n", debugstr_w(*p));
785 return S_OK;
786 }
787
788 static HRESULT WINAPI HTMLElement2_createControlRange(IHTMLElement2 *iface, IDispatch **range)
789 {
790 HTMLElement *This = HTMLELEM2_THIS(iface);
791 FIXME("(%p)->(%p)\n", This, range);
792 return E_NOTIMPL;
793 }
794
795 static HRESULT WINAPI HTMLElement2_get_scrollHeight(IHTMLElement2 *iface, LONG *p)
796 {
797 HTMLElement *This = HTMLELEM2_THIS(iface);
798 nsIDOMNSElement *nselem;
799 PRInt32 height = 0;
800 nsresult nsres;
801
802 TRACE("(%p)->(%p)\n", This, p);
803
804 nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem);
805 if(NS_SUCCEEDED(nsres)) {
806 nsres = nsIDOMNSElement_GetScrollHeight(nselem, &height);
807 nsIDOMNSElement_Release(nselem);
808 if(NS_FAILED(nsres))
809 ERR("GetScrollHeight failed: %08x\n", nsres);
810 }else {
811 ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres);
812 }
813
814 *p = height;
815 TRACE("*p = %d\n", *p);
816
817 return S_OK;
818 }
819
820 static HRESULT WINAPI HTMLElement2_get_scrollWidth(IHTMLElement2 *iface, LONG *p)
821 {
822 HTMLElement *This = HTMLELEM2_THIS(iface);
823 nsIDOMNSElement *nselem;
824 PRInt32 width = 0;
825 nsresult nsres;
826
827 TRACE("(%p)->(%p)\n", This, p);
828
829 nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem);
830 if(NS_SUCCEEDED(nsres)) {
831 nsres = nsIDOMNSElement_GetScrollWidth(nselem, &width);
832 nsIDOMNSElement_Release(nselem);
833 if(NS_FAILED(nsres))
834 ERR("GetScrollWidth failed: %08x\n", nsres);
835 }else {
836 ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres);
837 }
838
839 *p = width;
840 TRACE("*p = %d\n", *p);
841
842 return S_OK;
843 }
844
845 static HRESULT WINAPI HTMLElement2_put_scrollTop(IHTMLElement2 *iface, LONG v)
846 {
847 HTMLElement *This = HTMLELEM2_THIS(iface);
848 nsIDOMNSElement *nselem;
849 nsresult nsres;
850
851 TRACE("(%p)->(%d)\n", This, v);
852
853 if(!This->nselem) {
854 FIXME("NULL nselem\n");
855 return E_NOTIMPL;
856 }
857
858 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem);
859 if(NS_SUCCEEDED(nsres)) {
860 nsIDOMNSElement_SetScrollTop(nselem, v);
861 nsIDOMNSElement_Release(nselem);
862 }else {
863 ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres);
864 }
865
866 return S_OK;
867 }
868
869 static HRESULT WINAPI HTMLElement2_get_scrollTop(IHTMLElement2 *iface, LONG *p)
870 {
871 HTMLElement *This = HTMLELEM2_THIS(iface);
872 nsIDOMNSElement *nselem;
873 PRInt32 top = 0;
874 nsresult nsres;
875
876 TRACE("(%p)->(%p)\n", This, p);
877
878 nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem);
879 if(NS_SUCCEEDED(nsres)) {
880 nsres = nsIDOMNSElement_GetScrollTop(nselem, &top);
881 nsIDOMNSElement_Release(nselem);
882 if(NS_FAILED(nsres))
883 ERR("GetScrollTop failed: %08x\n", nsres);
884 }else {
885 ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres);
886 }
887
888 *p = top;
889 TRACE("*p = %d\n", *p);
890
891 return S_OK;
892 }
893
894 static HRESULT WINAPI HTMLElement2_put_scrollLeft(IHTMLElement2 *iface, LONG v)
895 {
896 HTMLElement *This = HTMLELEM2_THIS(iface);
897 nsIDOMNSElement *nselem;
898 nsresult nsres;
899
900 TRACE("(%p)->(%d)\n", This, v);
901
902 if(!This->nselem) {
903 FIXME("NULL nselem\n");
904 return E_NOTIMPL;
905 }
906
907 nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem);
908 if(NS_SUCCEEDED(nsres)) {
909 nsIDOMNSElement_SetScrollLeft(nselem, v);
910 nsIDOMNSElement_Release(nselem);
911 }else {
912 ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres);
913 }
914
915 return S_OK;
916 }
917
918 static HRESULT WINAPI HTMLElement2_get_scrollLeft(IHTMLElement2 *iface, LONG *p)
919 {
920 HTMLElement *This = HTMLELEM2_THIS(iface);
921 nsIDOMNSElement *nselem;
922 PRInt32 left = 0;
923 nsresult nsres;
924
925 TRACE("(%p)->(%p)\n", This, p);
926
927 if(!p)
928 return E_INVALIDARG;
929
930 if(!This->nselem)
931 {
932 FIXME("NULL nselem\n");
933 return E_NOTIMPL;
934 }
935
936 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem);
937 if(NS_SUCCEEDED(nsres))
938 {
939 nsres = nsIDOMNSElement_GetScrollLeft(nselem, &left);
940 nsIDOMNSElement_Release(nselem);
941 if(NS_FAILED(nsres))
942 left = 0;
943 }
944
945 *p = left;
946 TRACE("*p = %d\n", *p);
947
948 return S_OK;
949 }
950
951 static HRESULT WINAPI HTMLElement2_clearAttributes(IHTMLElement2 *iface)
952 {
953 HTMLElement *This = HTMLELEM2_THIS(iface);
954 FIXME("(%p)\n", This);
955 return E_NOTIMPL;
956 }
957
958 static HRESULT WINAPI HTMLElement2_mergeAttributes(IHTMLElement2 *iface, IHTMLElement *mergeThis)
959 {
960 HTMLElement *This = HTMLELEM2_THIS(iface);
961 FIXME("(%p)->(%p)\n", This, mergeThis);
962 return E_NOTIMPL;
963 }
964
965 static HRESULT WINAPI HTMLElement2_put_oncontextmenu(IHTMLElement2 *iface, VARIANT v)
966 {
967 HTMLElement *This = HTMLELEM2_THIS(iface);
968 FIXME("(%p)->()\n", This);
969 return E_NOTIMPL;
970 }
971
972 static HRESULT WINAPI HTMLElement2_get_oncontextmenu(IHTMLElement2 *iface, VARIANT *p)
973 {
974 HTMLElement *This = HTMLELEM2_THIS(iface);
975 FIXME("(%p)->(%p)\n", This, p);
976 return E_NOTIMPL;
977 }
978
979 static HRESULT WINAPI HTMLElement2_insertAdjecentElement(IHTMLElement2 *iface, BSTR where,
980 IHTMLElement *insertedElement, IHTMLElement **inserted)
981 {
982 HTMLElement *This = HTMLELEM2_THIS(iface);
983 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(where), insertedElement, inserted);
984 return E_NOTIMPL;
985 }
986
987 static HRESULT WINAPI HTMLElement2_applyElement(IHTMLElement2 *iface, IHTMLElement *apply,
988 BSTR where, IHTMLElement **applied)
989 {
990 HTMLElement *This = HTMLELEM2_THIS(iface);
991 FIXME("(%p)->(%p %s %p)\n", This, apply, debugstr_w(where), applied);
992 return E_NOTIMPL;
993 }
994
995 static HRESULT WINAPI HTMLElement2_getAdjecentText(IHTMLElement2 *iface, BSTR where, BSTR *text)
996 {
997 HTMLElement *This = HTMLELEM2_THIS(iface);
998 FIXME("(%p)->(%s %p)\n", This, debugstr_w(where), text);
999 return E_NOTIMPL;
1000 }
1001
1002 static HRESULT WINAPI HTMLElement2_replaceAdjecentText(IHTMLElement2 *iface, BSTR where,
1003 BSTR newText, BSTR *oldText)
1004 {
1005 HTMLElement *This = HTMLELEM2_THIS(iface);
1006 FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(where), debugstr_w(newText), oldText);
1007 return E_NOTIMPL;
1008 }
1009
1010 static HRESULT WINAPI HTMLElement2_get_canHandleChildren(IHTMLElement2 *iface, VARIANT_BOOL *p)
1011 {
1012 HTMLElement *This = HTMLELEM2_THIS(iface);
1013 FIXME("(%p)->(%p)\n", This, p);
1014 return E_NOTIMPL;
1015 }
1016
1017 static HRESULT WINAPI HTMLElement2_addBehavior(IHTMLElement2 *iface, BSTR bstrUrl,
1018 VARIANT *pvarFactory, LONG *pCookie)
1019 {
1020 HTMLElement *This = HTMLELEM2_THIS(iface);
1021 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(bstrUrl), pvarFactory, pCookie);
1022 return E_NOTIMPL;
1023 }
1024
1025 static HRESULT WINAPI HTMLElement2_removeBehavior(IHTMLElement2 *iface, LONG cookie,
1026 VARIANT_BOOL *pfResult)
1027 {
1028 HTMLElement *This = HTMLELEM2_THIS(iface);
1029 FIXME("(%p)->(%d %p)\n", This, cookie, pfResult);
1030 return E_NOTIMPL;
1031 }
1032
1033 static HRESULT WINAPI HTMLElement2_get_runtimeStyle(IHTMLElement2 *iface, IHTMLStyle **p)
1034 {
1035 HTMLElement *This = HTMLELEM2_THIS(iface);
1036 FIXME("(%p)->(%p)\n", This, p);
1037 return E_NOTIMPL;
1038 }
1039
1040 static HRESULT WINAPI HTMLElement2_get_behaviorUrns(IHTMLElement2 *iface, IDispatch **p)
1041 {
1042 HTMLElement *This = HTMLELEM2_THIS(iface);
1043 FIXME("(%p)->(%p)\n", This, p);
1044 return E_NOTIMPL;
1045 }
1046
1047 static HRESULT WINAPI HTMLElement2_put_tagUrn(IHTMLElement2 *iface, BSTR v)
1048 {
1049 HTMLElement *This = HTMLELEM2_THIS(iface);
1050 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1051 return E_NOTIMPL;
1052 }
1053
1054 static HRESULT WINAPI HTMLElement2_get_tagUrn(IHTMLElement2 *iface, BSTR *p)
1055 {
1056 HTMLElement *This = HTMLELEM2_THIS(iface);
1057 FIXME("(%p)->(%p)\n", This, p);
1058 return E_NOTIMPL;
1059 }
1060
1061 static HRESULT WINAPI HTMLElement2_put_onbeforeeditfocus(IHTMLElement2 *iface, VARIANT vv)
1062 {
1063 HTMLElement *This = HTMLELEM2_THIS(iface);
1064 FIXME("(%p)->()\n", This);
1065 return E_NOTIMPL;
1066 }
1067
1068 static HRESULT WINAPI HTMLElement2_get_onbeforeeditfocus(IHTMLElement2 *iface, VARIANT *p)
1069 {
1070 HTMLElement *This = HTMLELEM2_THIS(iface);
1071 FIXME("(%p)->(%p)\n", This, p);
1072 return E_NOTIMPL;
1073 }
1074
1075 static HRESULT WINAPI HTMLElement2_get_readyStateValue(IHTMLElement2 *iface, LONG *p)
1076 {
1077 HTMLElement *This = HTMLELEM2_THIS(iface);
1078 FIXME("(%p)->(%p)\n", This, p);
1079 return E_NOTIMPL;
1080 }
1081
1082 static HRESULT WINAPI HTMLElement2_getElementsByTagName(IHTMLElement2 *iface, BSTR v,
1083 IHTMLElementCollection **pelColl)
1084 {
1085 HTMLElement *This = HTMLELEM2_THIS(iface);
1086 nsIDOMNodeList *nslist;
1087 nsAString tag_str;
1088 nsresult nsres;
1089
1090 TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), pelColl);
1091
1092 nsAString_InitDepend(&tag_str, v);
1093 nsres = nsIDOMHTMLElement_GetElementsByTagName(This->nselem, &tag_str, &nslist);
1094 nsAString_Finish(&tag_str);
1095 if(NS_FAILED(nsres)) {
1096 ERR("GetElementByTagName failed: %08x\n", nsres);
1097 return E_FAIL;
1098 }
1099
1100 *pelColl = create_collection_from_nodelist(This->node.doc, (IUnknown*)HTMLELEM(This), nslist);
1101 nsIDOMNodeList_Release(nslist);
1102 return S_OK;
1103 }
1104
1105 #undef HTMLELEM2_THIS
1106
1107 static const IHTMLElement2Vtbl HTMLElement2Vtbl = {
1108 HTMLElement2_QueryInterface,
1109 HTMLElement2_AddRef,
1110 HTMLElement2_Release,
1111 HTMLElement2_GetTypeInfoCount,
1112 HTMLElement2_GetTypeInfo,
1113 HTMLElement2_GetIDsOfNames,
1114 HTMLElement2_Invoke,
1115 HTMLElement2_get_scopeName,
1116 HTMLElement2_setCapture,
1117 HTMLElement2_releaseCapture,
1118 HTMLElement2_put_onlosecapture,
1119 HTMLElement2_get_onlosecapture,
1120 HTMLElement2_componentFromPoint,
1121 HTMLElement2_doScroll,
1122 HTMLElement2_put_onscroll,
1123 HTMLElement2_get_onscroll,
1124 HTMLElement2_put_ondrag,
1125 HTMLElement2_get_ondrag,
1126 HTMLElement2_put_ondragend,
1127 HTMLElement2_get_ondragend,
1128 HTMLElement2_put_ondragenter,
1129 HTMLElement2_get_ondragenter,
1130 HTMLElement2_put_ondragover,
1131 HTMLElement2_get_ondragover,
1132 HTMLElement2_put_ondragleave,
1133 HTMLElement2_get_ondragleave,
1134 HTMLElement2_put_ondrop,
1135 HTMLElement2_get_ondrop,
1136 HTMLElement2_put_onbeforecut,
1137 HTMLElement2_get_onbeforecut,
1138 HTMLElement2_put_oncut,
1139 HTMLElement2_get_oncut,
1140 HTMLElement2_put_onbeforecopy,
1141 HTMLElement2_get_onbeforecopy,
1142 HTMLElement2_put_oncopy,
1143 HTMLElement2_get_oncopy,
1144 HTMLElement2_put_onbeforepaste,
1145 HTMLElement2_get_onbeforepaste,
1146 HTMLElement2_put_onpaste,
1147 HTMLElement2_get_onpaste,
1148 HTMLElement2_get_currentStyle,
1149 HTMLElement2_put_onpropertychange,
1150 HTMLElement2_get_onpropertychange,
1151 HTMLElement2_getClientRects,
1152 HTMLElement2_getBoundingClientRect,
1153 HTMLElement2_setExpression,
1154 HTMLElement2_getExpression,
1155 HTMLElement2_removeExpression,
1156 HTMLElement2_put_tabIndex,
1157 HTMLElement2_get_tabIndex,
1158 HTMLElement2_focus,
1159 HTMLElement2_put_accessKey,
1160 HTMLElement2_get_accessKey,
1161 HTMLElement2_put_onblur,
1162 HTMLElement2_get_onblur,
1163 HTMLElement2_put_onfocus,
1164 HTMLElement2_get_onfocus,
1165 HTMLElement2_put_onresize,
1166 HTMLElement2_get_onresize,
1167 HTMLElement2_blur,
1168 HTMLElement2_addFilter,
1169 HTMLElement2_removeFilter,
1170 HTMLElement2_get_clientHeight,
1171 HTMLElement2_get_clientWidth,
1172 HTMLElement2_get_clientTop,
1173 HTMLElement2_get_clientLeft,
1174 HTMLElement2_attachEvent,
1175 HTMLElement2_detachEvent,
1176 HTMLElement2_get_readyState,
1177 HTMLElement2_put_onreadystatechange,
1178 HTMLElement2_get_onreadystatechange,
1179 HTMLElement2_put_onrowsdelete,
1180 HTMLElement2_get_onrowsdelete,
1181 HTMLElement2_put_onrowsinserted,
1182 HTMLElement2_get_onrowsinserted,
1183 HTMLElement2_put_oncellchange,
1184 HTMLElement2_get_oncellchange,
1185 HTMLElement2_put_dir,
1186 HTMLElement2_get_dir,
1187 HTMLElement2_createControlRange,
1188 HTMLElement2_get_scrollHeight,
1189 HTMLElement2_get_scrollWidth,
1190 HTMLElement2_put_scrollTop,
1191 HTMLElement2_get_scrollTop,
1192 HTMLElement2_put_scrollLeft,
1193 HTMLElement2_get_scrollLeft,
1194 HTMLElement2_clearAttributes,
1195 HTMLElement2_mergeAttributes,
1196 HTMLElement2_put_oncontextmenu,
1197 HTMLElement2_get_oncontextmenu,
1198 HTMLElement2_insertAdjecentElement,
1199 HTMLElement2_applyElement,
1200 HTMLElement2_getAdjecentText,
1201 HTMLElement2_replaceAdjecentText,
1202 HTMLElement2_get_canHandleChildren,
1203 HTMLElement2_addBehavior,
1204 HTMLElement2_removeBehavior,
1205 HTMLElement2_get_runtimeStyle,
1206 HTMLElement2_get_behaviorUrns,
1207 HTMLElement2_put_tagUrn,
1208 HTMLElement2_get_tagUrn,
1209 HTMLElement2_put_onbeforeeditfocus,
1210 HTMLElement2_get_onbeforeeditfocus,
1211 HTMLElement2_get_readyStateValue,
1212 HTMLElement2_getElementsByTagName,
1213 };
1214
1215 void HTMLElement2_Init(HTMLElement *This)
1216 {
1217 This->lpHTMLElement2Vtbl = &HTMLElement2Vtbl;
1218 }