d3dcompiler_43: Use BOOL type where appropriate.
[wine.git] / dlls / mshtml / htmlelem2.c
blob81d956021f98d1cfe887a3a4e8e1b4548e0b6deb
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 <assert.h>
21 #include <math.h>
23 #define COBJMACROS
25 #include "windef.h"
26 #include "winbase.h"
27 #include "winuser.h"
28 #include "ole2.h"
30 #include "wine/debug.h"
32 #include "mshtml_private.h"
33 #include "htmlevent.h"
34 #include "htmlstyle.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
38 typedef struct {
39 DispatchEx dispex;
40 IHTMLRect IHTMLRect_iface;
42 LONG ref;
44 nsIDOMClientRect *nsrect;
45 } HTMLRect;
47 static inline HTMLRect *impl_from_IHTMLRect(IHTMLRect *iface)
49 return CONTAINING_RECORD(iface, HTMLRect, IHTMLRect_iface);
52 static HRESULT WINAPI HTMLRect_QueryInterface(IHTMLRect *iface, REFIID riid, void **ppv)
54 HTMLRect *This = impl_from_IHTMLRect(iface);
56 if(IsEqualGUID(&IID_IUnknown, riid)) {
57 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
58 *ppv = &This->IHTMLRect_iface;
59 }else if(IsEqualGUID(&IID_IHTMLRect, riid)) {
60 TRACE("(%p)->(IID_IHTMLRect %p)\n", This, ppv);
61 *ppv = &This->IHTMLRect_iface;
62 }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
63 return *ppv ? S_OK : E_NOINTERFACE;
64 }else {
65 FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
66 *ppv = NULL;
67 return E_NOINTERFACE;
70 IUnknown_AddRef((IUnknown*)*ppv);
71 return S_OK;
74 static ULONG WINAPI HTMLRect_AddRef(IHTMLRect *iface)
76 HTMLRect *This = impl_from_IHTMLRect(iface);
77 LONG ref = InterlockedIncrement(&This->ref);
79 TRACE("(%p) ref=%d\n", This, ref);
81 return ref;
84 static ULONG WINAPI HTMLRect_Release(IHTMLRect *iface)
86 HTMLRect *This = impl_from_IHTMLRect(iface);
87 LONG ref = InterlockedDecrement(&This->ref);
89 TRACE("(%p) ref=%d\n", This, ref);
91 if(!ref) {
92 if(This->nsrect)
93 nsIDOMClientRect_Release(This->nsrect);
94 heap_free(This);
97 return ref;
100 static HRESULT WINAPI HTMLRect_GetTypeInfoCount(IHTMLRect *iface, UINT *pctinfo)
102 HTMLRect *This = impl_from_IHTMLRect(iface);
103 FIXME("(%p)->(%p)\n", This, pctinfo);
104 return E_NOTIMPL;
107 static HRESULT WINAPI HTMLRect_GetTypeInfo(IHTMLRect *iface, UINT iTInfo,
108 LCID lcid, ITypeInfo **ppTInfo)
110 HTMLRect *This = impl_from_IHTMLRect(iface);
112 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
115 static HRESULT WINAPI HTMLRect_GetIDsOfNames(IHTMLRect *iface, REFIID riid,
116 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
118 HTMLRect *This = impl_from_IHTMLRect(iface);
120 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
121 lcid, rgDispId);
124 static HRESULT WINAPI HTMLRect_Invoke(IHTMLRect *iface, DISPID dispIdMember,
125 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
126 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
128 HTMLRect *This = impl_from_IHTMLRect(iface);
130 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags,
131 pDispParams, pVarResult, pExcepInfo, puArgErr);
134 static HRESULT WINAPI HTMLRect_put_left(IHTMLRect *iface, LONG v)
136 HTMLRect *This = impl_from_IHTMLRect(iface);
137 FIXME("(%p)->(%d)\n", This, v);
138 return E_NOTIMPL;
141 static HRESULT WINAPI HTMLRect_get_left(IHTMLRect *iface, LONG *p)
143 HTMLRect *This = impl_from_IHTMLRect(iface);
144 float left;
145 nsresult nsres;
147 TRACE("(%p)->(%p)\n", This, p);
149 nsres = nsIDOMClientRect_GetLeft(This->nsrect, &left);
150 if(NS_FAILED(nsres)) {
151 ERR("GetLeft failed: %08x\n", nsres);
152 return E_FAIL;
155 *p = floor(left+0.5);
156 return S_OK;
159 static HRESULT WINAPI HTMLRect_put_top(IHTMLRect *iface, LONG v)
161 HTMLRect *This = impl_from_IHTMLRect(iface);
162 FIXME("(%p)->(%d)\n", This, v);
163 return E_NOTIMPL;
166 static HRESULT WINAPI HTMLRect_get_top(IHTMLRect *iface, LONG *p)
168 HTMLRect *This = impl_from_IHTMLRect(iface);
169 float top;
170 nsresult nsres;
172 TRACE("(%p)->(%p)\n", This, p);
174 nsres = nsIDOMClientRect_GetTop(This->nsrect, &top);
175 if(NS_FAILED(nsres)) {
176 ERR("GetTop failed: %08x\n", nsres);
177 return E_FAIL;
180 *p = floor(top+0.5);
181 return S_OK;
184 static HRESULT WINAPI HTMLRect_put_right(IHTMLRect *iface, LONG v)
186 HTMLRect *This = impl_from_IHTMLRect(iface);
187 FIXME("(%p)->(%d)\n", This, v);
188 return E_NOTIMPL;
191 static HRESULT WINAPI HTMLRect_get_right(IHTMLRect *iface, LONG *p)
193 HTMLRect *This = impl_from_IHTMLRect(iface);
194 float right;
195 nsresult nsres;
197 TRACE("(%p)->(%p)\n", This, p);
199 nsres = nsIDOMClientRect_GetRight(This->nsrect, &right);
200 if(NS_FAILED(nsres)) {
201 ERR("GetRight failed: %08x\n", nsres);
202 return E_FAIL;
205 *p = floor(right+0.5);
206 return S_OK;
209 static HRESULT WINAPI HTMLRect_put_bottom(IHTMLRect *iface, LONG v)
211 HTMLRect *This = impl_from_IHTMLRect(iface);
212 FIXME("(%p)->(%d)\n", This, v);
213 return E_NOTIMPL;
216 static HRESULT WINAPI HTMLRect_get_bottom(IHTMLRect *iface, LONG *p)
218 HTMLRect *This = impl_from_IHTMLRect(iface);
219 float bottom;
220 nsresult nsres;
222 TRACE("(%p)->(%p)\n", This, p);
224 nsres = nsIDOMClientRect_GetBottom(This->nsrect, &bottom);
225 if(NS_FAILED(nsres)) {
226 ERR("GetBottom failed: %08x\n", nsres);
227 return E_FAIL;
230 *p = floor(bottom+0.5);
231 return S_OK;
234 static const IHTMLRectVtbl HTMLRectVtbl = {
235 HTMLRect_QueryInterface,
236 HTMLRect_AddRef,
237 HTMLRect_Release,
238 HTMLRect_GetTypeInfoCount,
239 HTMLRect_GetTypeInfo,
240 HTMLRect_GetIDsOfNames,
241 HTMLRect_Invoke,
242 HTMLRect_put_left,
243 HTMLRect_get_left,
244 HTMLRect_put_top,
245 HTMLRect_get_top,
246 HTMLRect_put_right,
247 HTMLRect_get_right,
248 HTMLRect_put_bottom,
249 HTMLRect_get_bottom
252 static const tid_t HTMLRect_iface_tids[] = {
253 IHTMLRect_tid,
256 static dispex_static_data_t HTMLRect_dispex = {
257 NULL,
258 IHTMLRect_tid,
259 NULL,
260 HTMLRect_iface_tids
263 static HRESULT create_html_rect(nsIDOMClientRect *nsrect, IHTMLRect **ret)
265 HTMLRect *rect;
267 rect = heap_alloc_zero(sizeof(HTMLRect));
268 if(!rect)
269 return E_OUTOFMEMORY;
271 rect->IHTMLRect_iface.lpVtbl = &HTMLRectVtbl;
272 rect->ref = 1;
274 init_dispex(&rect->dispex, (IUnknown*)&rect->IHTMLRect_iface, &HTMLRect_dispex);
276 nsIDOMClientRect_AddRef(nsrect);
277 rect->nsrect = nsrect;
279 *ret = &rect->IHTMLRect_iface;
280 return S_OK;
283 static inline HTMLElement *impl_from_IHTMLElement2(IHTMLElement2 *iface)
285 return CONTAINING_RECORD(iface, HTMLElement, IHTMLElement2_iface);
288 static HRESULT WINAPI HTMLElement2_QueryInterface(IHTMLElement2 *iface,
289 REFIID riid, void **ppv)
291 HTMLElement *This = impl_from_IHTMLElement2(iface);
292 return IHTMLElement_QueryInterface(&This->IHTMLElement_iface, riid, ppv);
295 static ULONG WINAPI HTMLElement2_AddRef(IHTMLElement2 *iface)
297 HTMLElement *This = impl_from_IHTMLElement2(iface);
298 return IHTMLElement_AddRef(&This->IHTMLElement_iface);
301 static ULONG WINAPI HTMLElement2_Release(IHTMLElement2 *iface)
303 HTMLElement *This = impl_from_IHTMLElement2(iface);
304 return IHTMLElement_Release(&This->IHTMLElement_iface);
307 static HRESULT WINAPI HTMLElement2_GetTypeInfoCount(IHTMLElement2 *iface, UINT *pctinfo)
309 HTMLElement *This = impl_from_IHTMLElement2(iface);
310 return IDispatchEx_GetTypeInfoCount(&This->node.dispex.IDispatchEx_iface, pctinfo);
313 static HRESULT WINAPI HTMLElement2_GetTypeInfo(IHTMLElement2 *iface, UINT iTInfo,
314 LCID lcid, ITypeInfo **ppTInfo)
316 HTMLElement *This = impl_from_IHTMLElement2(iface);
317 return IDispatchEx_GetTypeInfo(&This->node.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
320 static HRESULT WINAPI HTMLElement2_GetIDsOfNames(IHTMLElement2 *iface, REFIID riid,
321 LPOLESTR *rgszNames, UINT cNames,
322 LCID lcid, DISPID *rgDispId)
324 HTMLElement *This = impl_from_IHTMLElement2(iface);
325 return IDispatchEx_GetIDsOfNames(&This->node.dispex.IDispatchEx_iface, riid, rgszNames, cNames,
326 lcid, rgDispId);
329 static HRESULT WINAPI HTMLElement2_Invoke(IHTMLElement2 *iface, DISPID dispIdMember,
330 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
331 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
333 HTMLElement *This = impl_from_IHTMLElement2(iface);
334 return IDispatchEx_Invoke(&This->node.dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
335 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
338 static HRESULT WINAPI HTMLElement2_get_scopeName(IHTMLElement2 *iface, BSTR *p)
340 HTMLElement *This = impl_from_IHTMLElement2(iface);
341 FIXME("(%p)->(%p)\n", This, p);
342 return E_NOTIMPL;
345 static HRESULT WINAPI HTMLElement2_setCapture(IHTMLElement2 *iface, VARIANT_BOOL containerCapture)
347 HTMLElement *This = impl_from_IHTMLElement2(iface);
348 FIXME("(%p)->(%x)\n", This, containerCapture);
349 return E_NOTIMPL;
352 static HRESULT WINAPI HTMLElement2_releaseCapture(IHTMLElement2 *iface)
354 HTMLElement *This = impl_from_IHTMLElement2(iface);
355 FIXME("(%p)\n", This);
356 return E_NOTIMPL;
359 static HRESULT WINAPI HTMLElement2_put_onlosecapture(IHTMLElement2 *iface, VARIANT v)
361 HTMLElement *This = impl_from_IHTMLElement2(iface);
362 FIXME("(%p)->()\n", This);
363 return E_NOTIMPL;
366 static HRESULT WINAPI HTMLElement2_get_onlosecapture(IHTMLElement2 *iface, VARIANT *p)
368 HTMLElement *This = impl_from_IHTMLElement2(iface);
369 FIXME("(%p)->(%p)\n", This, p);
370 return E_NOTIMPL;
373 static HRESULT WINAPI HTMLElement2_componentFromPoint(IHTMLElement2 *iface,
374 LONG x, LONG y, BSTR *component)
376 HTMLElement *This = impl_from_IHTMLElement2(iface);
377 FIXME("(%p)->(%d %d %p)\n", This, x, y, component);
378 return E_NOTIMPL;
381 static HRESULT WINAPI HTMLElement2_doScroll(IHTMLElement2 *iface, VARIANT component)
383 HTMLElement *This = impl_from_IHTMLElement2(iface);
385 TRACE("(%p)->(%s)\n", This, debugstr_variant(&component));
387 if(!This->node.doc->content_ready
388 || !This->node.doc->basedoc.doc_obj->in_place_active)
389 return E_PENDING;
391 WARN("stub\n");
392 return S_OK;
395 static HRESULT WINAPI HTMLElement2_put_onscroll(IHTMLElement2 *iface, VARIANT v)
397 HTMLElement *This = impl_from_IHTMLElement2(iface);
398 FIXME("(%p)->()\n", This);
399 return E_NOTIMPL;
402 static HRESULT WINAPI HTMLElement2_get_onscroll(IHTMLElement2 *iface, VARIANT *p)
404 HTMLElement *This = impl_from_IHTMLElement2(iface);
405 FIXME("(%p)->(%p)\n", This, p);
406 return E_NOTIMPL;
409 static HRESULT WINAPI HTMLElement2_put_ondrag(IHTMLElement2 *iface, VARIANT v)
411 HTMLElement *This = impl_from_IHTMLElement2(iface);
413 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
415 return set_node_event(&This->node, EVENTID_DRAG, &v);
418 static HRESULT WINAPI HTMLElement2_get_ondrag(IHTMLElement2 *iface, VARIANT *p)
420 HTMLElement *This = impl_from_IHTMLElement2(iface);
422 TRACE("(%p)->(%p)\n", This, p);
424 return get_node_event(&This->node, EVENTID_DRAG, p);
427 static HRESULT WINAPI HTMLElement2_put_ondragend(IHTMLElement2 *iface, VARIANT v)
429 HTMLElement *This = impl_from_IHTMLElement2(iface);
430 FIXME("(%p)->()\n", This);
431 return E_NOTIMPL;
434 static HRESULT WINAPI HTMLElement2_get_ondragend(IHTMLElement2 *iface, VARIANT *p)
436 HTMLElement *This = impl_from_IHTMLElement2(iface);
437 FIXME("(%p)->(%p)\n", This, p);
438 return E_NOTIMPL;
441 static HRESULT WINAPI HTMLElement2_put_ondragenter(IHTMLElement2 *iface, VARIANT v)
443 HTMLElement *This = impl_from_IHTMLElement2(iface);
444 FIXME("(%p)->()\n", This);
445 return E_NOTIMPL;
448 static HRESULT WINAPI HTMLElement2_get_ondragenter(IHTMLElement2 *iface, VARIANT *p)
450 HTMLElement *This = impl_from_IHTMLElement2(iface);
451 FIXME("(%p)->(%p)\n", This, p);
452 return E_NOTIMPL;
455 static HRESULT WINAPI HTMLElement2_put_ondragover(IHTMLElement2 *iface, VARIANT v)
457 HTMLElement *This = impl_from_IHTMLElement2(iface);
458 FIXME("(%p)->()\n", This);
459 return E_NOTIMPL;
462 static HRESULT WINAPI HTMLElement2_get_ondragover(IHTMLElement2 *iface, VARIANT *p)
464 HTMLElement *This = impl_from_IHTMLElement2(iface);
465 FIXME("(%p)->(%p)\n", This, p);
466 return E_NOTIMPL;
469 static HRESULT WINAPI HTMLElement2_put_ondragleave(IHTMLElement2 *iface, VARIANT v)
471 HTMLElement *This = impl_from_IHTMLElement2(iface);
472 FIXME("(%p)->()\n", This);
473 return E_NOTIMPL;
476 static HRESULT WINAPI HTMLElement2_get_ondragleave(IHTMLElement2 *iface, VARIANT *p)
478 HTMLElement *This = impl_from_IHTMLElement2(iface);
479 FIXME("(%p)->(%p)\n", This, p);
480 return E_NOTIMPL;
483 static HRESULT WINAPI HTMLElement2_put_ondrop(IHTMLElement2 *iface, VARIANT v)
485 HTMLElement *This = impl_from_IHTMLElement2(iface);
486 FIXME("(%p)->()\n", This);
487 return E_NOTIMPL;
490 static HRESULT WINAPI HTMLElement2_get_ondrop(IHTMLElement2 *iface, VARIANT *p)
492 HTMLElement *This = impl_from_IHTMLElement2(iface);
493 FIXME("(%p)->(%p)\n", This, p);
494 return E_NOTIMPL;
497 static HRESULT WINAPI HTMLElement2_put_onbeforecut(IHTMLElement2 *iface, VARIANT v)
499 HTMLElement *This = impl_from_IHTMLElement2(iface);
500 FIXME("(%p)->()\n", This);
501 return E_NOTIMPL;
504 static HRESULT WINAPI HTMLElement2_get_onbeforecut(IHTMLElement2 *iface, VARIANT *p)
506 HTMLElement *This = impl_from_IHTMLElement2(iface);
507 FIXME("(%p)->(%p)\n", This, p);
508 return E_NOTIMPL;
511 static HRESULT WINAPI HTMLElement2_put_oncut(IHTMLElement2 *iface, VARIANT v)
513 HTMLElement *This = impl_from_IHTMLElement2(iface);
514 FIXME("(%p)->()\n", This);
515 return E_NOTIMPL;
518 static HRESULT WINAPI HTMLElement2_get_oncut(IHTMLElement2 *iface, VARIANT *p)
520 HTMLElement *This = impl_from_IHTMLElement2(iface);
521 FIXME("(%p)->(%p)\n", This, p);
522 return E_NOTIMPL;
525 static HRESULT WINAPI HTMLElement2_put_onbeforecopy(IHTMLElement2 *iface, VARIANT v)
527 HTMLElement *This = impl_from_IHTMLElement2(iface);
528 FIXME("(%p)->()\n", This);
529 return E_NOTIMPL;
532 static HRESULT WINAPI HTMLElement2_get_onbeforecopy(IHTMLElement2 *iface, VARIANT *p)
534 HTMLElement *This = impl_from_IHTMLElement2(iface);
535 FIXME("(%p)->(%p)\n", This, p);
536 return E_NOTIMPL;
539 static HRESULT WINAPI HTMLElement2_put_oncopy(IHTMLElement2 *iface, VARIANT v)
541 HTMLElement *This = impl_from_IHTMLElement2(iface);
542 FIXME("(%p)->()\n", This);
543 return E_NOTIMPL;
546 static HRESULT WINAPI HTMLElement2_get_oncopy(IHTMLElement2 *iface, VARIANT *p)
548 HTMLElement *This = impl_from_IHTMLElement2(iface);
549 FIXME("(%p)->(%p)\n", This, p);
550 return E_NOTIMPL;
553 static HRESULT WINAPI HTMLElement2_put_onbeforepaste(IHTMLElement2 *iface, VARIANT v)
555 HTMLElement *This = impl_from_IHTMLElement2(iface);
556 FIXME("(%p)->()\n", This);
557 return E_NOTIMPL;
560 static HRESULT WINAPI HTMLElement2_get_onbeforepaste(IHTMLElement2 *iface, VARIANT *p)
562 HTMLElement *This = impl_from_IHTMLElement2(iface);
563 FIXME("(%p)->(%p)\n", This, p);
564 return E_NOTIMPL;
567 static HRESULT WINAPI HTMLElement2_put_onpaste(IHTMLElement2 *iface, VARIANT v)
569 HTMLElement *This = impl_from_IHTMLElement2(iface);
571 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
573 return set_node_event(&This->node, EVENTID_PASTE, &v);
576 static HRESULT WINAPI HTMLElement2_get_onpaste(IHTMLElement2 *iface, VARIANT *p)
578 HTMLElement *This = impl_from_IHTMLElement2(iface);
580 TRACE("(%p)->(%p)\n", This, p);
582 return get_node_event(&This->node, EVENTID_PASTE, p);
585 static HRESULT WINAPI HTMLElement2_get_currentStyle(IHTMLElement2 *iface, IHTMLCurrentStyle **p)
587 HTMLElement *This = impl_from_IHTMLElement2(iface);
589 TRACE("(%p)->(%p)\n", This, p);
591 return HTMLCurrentStyle_Create(This, p);
594 static HRESULT WINAPI HTMLElement2_put_onpropertychange(IHTMLElement2 *iface, VARIANT v)
596 HTMLElement *This = impl_from_IHTMLElement2(iface);
597 FIXME("(%p)->()\n", This);
598 return E_NOTIMPL;
601 static HRESULT WINAPI HTMLElement2_get_onpropertychange(IHTMLElement2 *iface, VARIANT *p)
603 HTMLElement *This = impl_from_IHTMLElement2(iface);
604 FIXME("(%p)->(%p)\n", This, p);
605 return E_NOTIMPL;
608 static HRESULT WINAPI HTMLElement2_getClientRects(IHTMLElement2 *iface, IHTMLRectCollection **pRectCol)
610 HTMLElement *This = impl_from_IHTMLElement2(iface);
611 FIXME("(%p)->(%p)\n", This, pRectCol);
612 return E_NOTIMPL;
615 static HRESULT WINAPI HTMLElement2_getBoundingClientRect(IHTMLElement2 *iface, IHTMLRect **pRect)
617 HTMLElement *This = impl_from_IHTMLElement2(iface);
618 nsIDOMClientRect *nsrect;
619 nsresult nsres;
620 HRESULT hres;
622 TRACE("(%p)->(%p)\n", This, pRect);
624 nsres = nsIDOMHTMLElement_GetBoundingClientRect(This->nselem, &nsrect);
625 if(NS_FAILED(nsres) || !nsrect) {
626 ERR("GetBoindingClientRect failed: %08x\n", nsres);
627 return E_FAIL;
630 hres = create_html_rect(nsrect, pRect);
632 nsIDOMClientRect_Release(nsrect);
633 return hres;
636 static HRESULT WINAPI HTMLElement2_setExpression(IHTMLElement2 *iface, BSTR propname,
637 BSTR expression, BSTR language)
639 HTMLElement *This = impl_from_IHTMLElement2(iface);
640 FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(propname), debugstr_w(expression),
641 debugstr_w(language));
642 return E_NOTIMPL;
645 static HRESULT WINAPI HTMLElement2_getExpression(IHTMLElement2 *iface, BSTR propname,
646 VARIANT *expression)
648 HTMLElement *This = impl_from_IHTMLElement2(iface);
649 FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), expression);
650 return E_NOTIMPL;
653 static HRESULT WINAPI HTMLElement2_removeExpression(IHTMLElement2 *iface, BSTR propname,
654 VARIANT_BOOL *pfSuccess)
656 HTMLElement *This = impl_from_IHTMLElement2(iface);
657 FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), pfSuccess);
658 return E_NOTIMPL;
661 static HRESULT WINAPI HTMLElement2_put_tabIndex(IHTMLElement2 *iface, short v)
663 HTMLElement *This = impl_from_IHTMLElement2(iface);
664 nsresult nsres;
666 TRACE("(%p)->(%d)\n", This, v);
668 nsres = nsIDOMHTMLElement_SetTabIndex(This->nselem, v);
669 if(NS_FAILED(nsres))
670 ERR("GetTabIndex failed: %08x\n", nsres);
672 return S_OK;
675 static HRESULT WINAPI HTMLElement2_get_tabIndex(IHTMLElement2 *iface, short *p)
677 HTMLElement *This = impl_from_IHTMLElement2(iface);
678 LONG index;
679 nsresult nsres;
681 TRACE("(%p)->(%p)\n", This, p);
683 nsres = nsIDOMHTMLElement_GetTabIndex(This->nselem, &index);
684 if(NS_FAILED(nsres)) {
685 ERR("GetTabIndex failed: %08x\n", nsres);
686 return E_FAIL;
689 *p = index;
690 return S_OK;
693 static HRESULT WINAPI HTMLElement2_focus(IHTMLElement2 *iface)
695 HTMLElement *This = impl_from_IHTMLElement2(iface);
696 nsresult nsres;
698 TRACE("(%p)\n", This);
700 nsres = nsIDOMHTMLElement_Focus(This->nselem);
701 if(NS_FAILED(nsres))
702 ERR("Focus failed: %08x\n", nsres);
704 return S_OK;
707 static HRESULT WINAPI HTMLElement2_put_accessKey(IHTMLElement2 *iface, BSTR v)
709 HTMLElement *This = impl_from_IHTMLElement2(iface);
710 VARIANT var;
712 static WCHAR accessKeyW[] = {'a','c','c','e','s','s','K','e','y',0};
714 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
716 V_VT(&var) = VT_BSTR;
717 V_BSTR(&var) = v;
718 return IHTMLElement_setAttribute(&This->IHTMLElement_iface, accessKeyW, var, 0);
721 static HRESULT WINAPI HTMLElement2_get_accessKey(IHTMLElement2 *iface, BSTR *p)
723 HTMLElement *This = impl_from_IHTMLElement2(iface);
724 FIXME("(%p)->(%p)\n", This, p);
725 return E_NOTIMPL;
728 static HRESULT WINAPI HTMLElement2_put_onblur(IHTMLElement2 *iface, VARIANT v)
730 HTMLElement *This = impl_from_IHTMLElement2(iface);
732 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
734 return set_node_event(&This->node, EVENTID_BLUR, &v);
737 static HRESULT WINAPI HTMLElement2_get_onblur(IHTMLElement2 *iface, VARIANT *p)
739 HTMLElement *This = impl_from_IHTMLElement2(iface);
741 TRACE("(%p)->(%p)\n", This, p);
743 return get_node_event(&This->node, EVENTID_BLUR, p);
746 static HRESULT WINAPI HTMLElement2_put_onfocus(IHTMLElement2 *iface, VARIANT v)
748 HTMLElement *This = impl_from_IHTMLElement2(iface);
750 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
752 return set_node_event(&This->node, EVENTID_FOCUS, &v);
755 static HRESULT WINAPI HTMLElement2_get_onfocus(IHTMLElement2 *iface, VARIANT *p)
757 HTMLElement *This = impl_from_IHTMLElement2(iface);
759 TRACE("(%p)->(%p)\n", This, p);
761 return get_node_event(&This->node, EVENTID_FOCUS, p);
764 static HRESULT WINAPI HTMLElement2_put_onresize(IHTMLElement2 *iface, VARIANT v)
766 HTMLElement *This = impl_from_IHTMLElement2(iface);
767 FIXME("(%p)->()\n", This);
768 return E_NOTIMPL;
771 static HRESULT WINAPI HTMLElement2_get_onresize(IHTMLElement2 *iface, VARIANT *p)
773 HTMLElement *This = impl_from_IHTMLElement2(iface);
774 FIXME("(%p)->(%p)\n", This, p);
775 return E_NOTIMPL;
778 static HRESULT WINAPI HTMLElement2_blur(IHTMLElement2 *iface)
780 HTMLElement *This = impl_from_IHTMLElement2(iface);
781 nsresult nsres;
783 TRACE("(%p)\n", This);
785 nsres = nsIDOMHTMLElement_Blur(This->nselem);
786 if(NS_FAILED(nsres)) {
787 ERR("Blur failed: %08x\n", nsres);
788 return E_FAIL;
791 return S_OK;
794 static HRESULT WINAPI HTMLElement2_addFilter(IHTMLElement2 *iface, IUnknown *pUnk)
796 HTMLElement *This = impl_from_IHTMLElement2(iface);
797 FIXME("(%p)->(%p)\n", This, pUnk);
798 return E_NOTIMPL;
801 static HRESULT WINAPI HTMLElement2_removeFilter(IHTMLElement2 *iface, IUnknown *pUnk)
803 HTMLElement *This = impl_from_IHTMLElement2(iface);
804 FIXME("(%p)->(%p)\n", This, pUnk);
805 return E_NOTIMPL;
808 static HRESULT WINAPI HTMLElement2_get_clientHeight(IHTMLElement2 *iface, LONG *p)
810 HTMLElement *This = impl_from_IHTMLElement2(iface);
811 nsresult nsres;
813 TRACE("(%p)->(%p)\n", This, p);
815 nsres = nsIDOMHTMLElement_GetClientHeight(This->nselem, p);
816 assert(nsres == NS_OK);
817 return S_OK;
820 static HRESULT WINAPI HTMLElement2_get_clientWidth(IHTMLElement2 *iface, LONG *p)
822 HTMLElement *This = impl_from_IHTMLElement2(iface);
823 nsresult nsres;
825 TRACE("(%p)->(%p)\n", This, p);
827 nsres = nsIDOMHTMLElement_GetClientWidth(This->nselem, p);
828 assert(nsres == NS_OK);
829 return S_OK;
832 static HRESULT WINAPI HTMLElement2_get_clientTop(IHTMLElement2 *iface, LONG *p)
834 HTMLElement *This = impl_from_IHTMLElement2(iface);
835 nsresult nsres;
837 TRACE("(%p)->(%p)\n", This, p);
839 nsres = nsIDOMHTMLElement_GetClientTop(This->nselem, p);
840 assert(nsres == NS_OK);
842 TRACE("*p = %d\n", *p);
843 return S_OK;
846 static HRESULT WINAPI HTMLElement2_get_clientLeft(IHTMLElement2 *iface, LONG *p)
848 HTMLElement *This = impl_from_IHTMLElement2(iface);
849 nsresult nsres;
851 TRACE("(%p)->(%p)\n", This, p);
853 nsres = nsIDOMHTMLElement_GetClientLeft(This->nselem, p);
854 assert(nsres == NS_OK);
856 TRACE("*p = %d\n", *p);
857 return S_OK;
860 static HRESULT WINAPI HTMLElement2_attachEvent(IHTMLElement2 *iface, BSTR event,
861 IDispatch *pDisp, VARIANT_BOOL *pfResult)
863 HTMLElement *This = impl_from_IHTMLElement2(iface);
865 TRACE("(%p)->(%s %p %p)\n", This, debugstr_w(event), pDisp, pfResult);
867 return attach_event(get_node_event_target(&This->node), This->node.nsnode, &This->node.doc->basedoc, event, pDisp, pfResult);
870 static HRESULT WINAPI HTMLElement2_detachEvent(IHTMLElement2 *iface, BSTR event, IDispatch *pDisp)
872 HTMLElement *This = impl_from_IHTMLElement2(iface);
874 TRACE("(%p)->(%s %p)\n", This, debugstr_w(event), pDisp);
876 return detach_event(*get_node_event_target(&This->node), &This->node.doc->basedoc, event, pDisp);
879 static HRESULT WINAPI HTMLElement2_get_readyState(IHTMLElement2 *iface, VARIANT *p)
881 HTMLElement *This = impl_from_IHTMLElement2(iface);
882 BSTR str;
884 TRACE("(%p)->(%p)\n", This, p);
886 if(This->node.vtbl->get_readystate) {
887 HRESULT hres;
889 hres = This->node.vtbl->get_readystate(&This->node, &str);
890 if(FAILED(hres))
891 return hres;
892 }else {
893 static const WCHAR completeW[] = {'c','o','m','p','l','e','t','e',0};
895 str = SysAllocString(completeW);
896 if(!str)
897 return E_OUTOFMEMORY;
900 V_VT(p) = VT_BSTR;
901 V_BSTR(p) = str;
902 return S_OK;
905 static HRESULT WINAPI HTMLElement2_put_onreadystatechange(IHTMLElement2 *iface, VARIANT v)
907 HTMLElement *This = impl_from_IHTMLElement2(iface);
909 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
911 return set_node_event(&This->node, EVENTID_READYSTATECHANGE, &v);
914 static HRESULT WINAPI HTMLElement2_get_onreadystatechange(IHTMLElement2 *iface, VARIANT *p)
916 HTMLElement *This = impl_from_IHTMLElement2(iface);
918 TRACE("(%p)->(%p)\n", This, p);
920 return get_node_event(&This->node, EVENTID_READYSTATECHANGE, p);
923 static HRESULT WINAPI HTMLElement2_put_onrowsdelete(IHTMLElement2 *iface, VARIANT v)
925 HTMLElement *This = impl_from_IHTMLElement2(iface);
926 FIXME("(%p)->()\n", This);
927 return E_NOTIMPL;
930 static HRESULT WINAPI HTMLElement2_get_onrowsdelete(IHTMLElement2 *iface, VARIANT *p)
932 HTMLElement *This = impl_from_IHTMLElement2(iface);
933 FIXME("(%p)->(%p)\n", This, p);
934 return E_NOTIMPL;
937 static HRESULT WINAPI HTMLElement2_put_onrowsinserted(IHTMLElement2 *iface, VARIANT v)
939 HTMLElement *This = impl_from_IHTMLElement2(iface);
940 FIXME("(%p)->()\n", This);
941 return E_NOTIMPL;
944 static HRESULT WINAPI HTMLElement2_get_onrowsinserted(IHTMLElement2 *iface, VARIANT *p)
946 HTMLElement *This = impl_from_IHTMLElement2(iface);
947 FIXME("(%p)->(%p)\n", This, p);
948 return E_NOTIMPL;
951 static HRESULT WINAPI HTMLElement2_put_oncellchange(IHTMLElement2 *iface, VARIANT v)
953 HTMLElement *This = impl_from_IHTMLElement2(iface);
954 FIXME("(%p)->()\n", This);
955 return E_NOTIMPL;
958 static HRESULT WINAPI HTMLElement2_get_oncellchange(IHTMLElement2 *iface, VARIANT *p)
960 HTMLElement *This = impl_from_IHTMLElement2(iface);
961 FIXME("(%p)->(%p)\n", This, p);
962 return E_NOTIMPL;
965 static HRESULT WINAPI HTMLElement2_put_dir(IHTMLElement2 *iface, BSTR v)
967 HTMLElement *This = impl_from_IHTMLElement2(iface);
968 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
969 return E_NOTIMPL;
972 static HRESULT WINAPI HTMLElement2_get_dir(IHTMLElement2 *iface, BSTR *p)
974 HTMLElement *This = impl_from_IHTMLElement2(iface);
975 nsAString dir_str;
976 nsresult nsres;
978 TRACE("(%p)->(%p)\n", This, p);
980 if(!This->nselem) {
981 *p = NULL;
982 return S_OK;
985 nsAString_Init(&dir_str, NULL);
986 nsres = nsIDOMHTMLElement_GetDir(This->nselem, &dir_str);
987 return return_nsstr(nsres, &dir_str, p);
990 static HRESULT WINAPI HTMLElement2_createControlRange(IHTMLElement2 *iface, IDispatch **range)
992 HTMLElement *This = impl_from_IHTMLElement2(iface);
993 FIXME("(%p)->(%p)\n", This, range);
994 return E_NOTIMPL;
997 static HRESULT WINAPI HTMLElement2_get_scrollHeight(IHTMLElement2 *iface, LONG *p)
999 HTMLElement *This = impl_from_IHTMLElement2(iface);
1000 nsresult nsres;
1002 TRACE("(%p)->(%p)\n", This, p);
1004 nsres = nsIDOMHTMLElement_GetScrollHeight(This->nselem, p);
1005 assert(nsres == NS_OK);
1007 TRACE("*p = %d\n", *p);
1008 return S_OK;
1011 static HRESULT WINAPI HTMLElement2_get_scrollWidth(IHTMLElement2 *iface, LONG *p)
1013 HTMLElement *This = impl_from_IHTMLElement2(iface);
1014 nsresult nsres;
1016 TRACE("(%p)->(%p)\n", This, p);
1018 nsres = nsIDOMHTMLElement_GetScrollWidth(This->nselem, p);
1019 assert(nsres == NS_OK);
1021 TRACE("*p = %d\n", *p);
1022 return S_OK;
1025 static HRESULT WINAPI HTMLElement2_put_scrollTop(IHTMLElement2 *iface, LONG v)
1027 HTMLElement *This = impl_from_IHTMLElement2(iface);
1029 TRACE("(%p)->(%d)\n", This, v);
1031 if(!This->nselem) {
1032 FIXME("NULL nselem\n");
1033 return E_NOTIMPL;
1036 nsIDOMHTMLElement_SetScrollTop(This->nselem, v);
1037 return S_OK;
1040 static HRESULT WINAPI HTMLElement2_get_scrollTop(IHTMLElement2 *iface, LONG *p)
1042 HTMLElement *This = impl_from_IHTMLElement2(iface);
1043 nsresult nsres;
1045 TRACE("(%p)->(%p)\n", This, p);
1047 nsres = nsIDOMHTMLElement_GetScrollTop(This->nselem, p);
1048 assert(nsres == NS_OK);
1050 TRACE("*p = %d\n", *p);
1051 return S_OK;
1054 static HRESULT WINAPI HTMLElement2_put_scrollLeft(IHTMLElement2 *iface, LONG v)
1056 HTMLElement *This = impl_from_IHTMLElement2(iface);
1058 TRACE("(%p)->(%d)\n", This, v);
1060 if(!This->nselem) {
1061 FIXME("NULL nselem\n");
1062 return E_NOTIMPL;
1065 nsIDOMHTMLElement_SetScrollLeft(This->nselem, v);
1066 return S_OK;
1069 static HRESULT WINAPI HTMLElement2_get_scrollLeft(IHTMLElement2 *iface, LONG *p)
1071 HTMLElement *This = impl_from_IHTMLElement2(iface);
1072 nsresult nsres;
1074 TRACE("(%p)->(%p)\n", This, p);
1076 if(!p)
1077 return E_INVALIDARG;
1079 if(!This->nselem)
1081 FIXME("NULL nselem\n");
1082 return E_NOTIMPL;
1085 nsres = nsIDOMHTMLElement_GetScrollLeft(This->nselem, p);
1086 assert(nsres == NS_OK);
1088 TRACE("*p = %d\n", *p);
1089 return S_OK;
1092 static HRESULT WINAPI HTMLElement2_clearAttributes(IHTMLElement2 *iface)
1094 HTMLElement *This = impl_from_IHTMLElement2(iface);
1095 FIXME("(%p)\n", This);
1096 return E_NOTIMPL;
1099 static HRESULT WINAPI HTMLElement2_mergeAttributes(IHTMLElement2 *iface, IHTMLElement *mergeThis)
1101 HTMLElement *This = impl_from_IHTMLElement2(iface);
1102 FIXME("(%p)->(%p)\n", This, mergeThis);
1103 return E_NOTIMPL;
1106 static HRESULT WINAPI HTMLElement2_put_oncontextmenu(IHTMLElement2 *iface, VARIANT v)
1108 HTMLElement *This = impl_from_IHTMLElement2(iface);
1109 FIXME("(%p)->()\n", This);
1110 return E_NOTIMPL;
1113 static HRESULT WINAPI HTMLElement2_get_oncontextmenu(IHTMLElement2 *iface, VARIANT *p)
1115 HTMLElement *This = impl_from_IHTMLElement2(iface);
1116 FIXME("(%p)->(%p)\n", This, p);
1117 return E_NOTIMPL;
1120 static HRESULT WINAPI HTMLElement2_insertAdjacentElement(IHTMLElement2 *iface, BSTR where,
1121 IHTMLElement *insertedElement, IHTMLElement **inserted)
1123 HTMLElement *This = impl_from_IHTMLElement2(iface);
1124 HTMLDOMNode *ret_node;
1125 HTMLElement *elem;
1126 HRESULT hres;
1128 TRACE("(%p)->(%s %p %p)\n", This, debugstr_w(where), insertedElement, inserted);
1130 elem = unsafe_impl_from_IHTMLElement(insertedElement);
1131 if(!elem)
1132 return E_INVALIDARG;
1134 hres = insert_adjacent_node(This, where, elem->node.nsnode, &ret_node);
1135 if(FAILED(hres))
1136 return hres;
1138 hres = IHTMLDOMNode_QueryInterface(&ret_node->IHTMLDOMNode_iface, &IID_IHTMLElement, (void**)inserted);
1139 IHTMLDOMNode_Release(&ret_node->IHTMLDOMNode_iface);
1140 return hres;
1143 static HRESULT WINAPI HTMLElement2_applyElement(IHTMLElement2 *iface, IHTMLElement *apply,
1144 BSTR where, IHTMLElement **applied)
1146 HTMLElement *This = impl_from_IHTMLElement2(iface);
1147 FIXME("(%p)->(%p %s %p)\n", This, apply, debugstr_w(where), applied);
1148 return E_NOTIMPL;
1151 static HRESULT WINAPI HTMLElement2_getAdjacentText(IHTMLElement2 *iface, BSTR where, BSTR *text)
1153 HTMLElement *This = impl_from_IHTMLElement2(iface);
1154 FIXME("(%p)->(%s %p)\n", This, debugstr_w(where), text);
1155 return E_NOTIMPL;
1158 static HRESULT WINAPI HTMLElement2_replaceAdjacentText(IHTMLElement2 *iface, BSTR where,
1159 BSTR newText, BSTR *oldText)
1161 HTMLElement *This = impl_from_IHTMLElement2(iface);
1162 FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(where), debugstr_w(newText), oldText);
1163 return E_NOTIMPL;
1166 static HRESULT WINAPI HTMLElement2_get_canHandleChildren(IHTMLElement2 *iface, VARIANT_BOOL *p)
1168 HTMLElement *This = impl_from_IHTMLElement2(iface);
1169 FIXME("(%p)->(%p)\n", This, p);
1170 return E_NOTIMPL;
1173 static HRESULT WINAPI HTMLElement2_addBehavior(IHTMLElement2 *iface, BSTR bstrUrl,
1174 VARIANT *pvarFactory, LONG *pCookie)
1176 HTMLElement *This = impl_from_IHTMLElement2(iface);
1177 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(bstrUrl), pvarFactory, pCookie);
1178 return E_NOTIMPL;
1181 static HRESULT WINAPI HTMLElement2_removeBehavior(IHTMLElement2 *iface, LONG cookie,
1182 VARIANT_BOOL *pfResult)
1184 HTMLElement *This = impl_from_IHTMLElement2(iface);
1185 FIXME("(%p)->(%d %p)\n", This, cookie, pfResult);
1186 return E_NOTIMPL;
1189 static HRESULT WINAPI HTMLElement2_get_runtimeStyle(IHTMLElement2 *iface, IHTMLStyle **p)
1191 HTMLElement *This = impl_from_IHTMLElement2(iface);
1193 FIXME("(%p)->(%p): hack\n", This, p);
1195 /* We can't implement correct behavior on top of Gecko (although we could
1196 try a bit harder). Making runtimeStyle behave like regular style is
1197 enough for most use cases. */
1198 if(!This->runtime_style) {
1199 HRESULT hres;
1201 hres = HTMLStyle_Create(This, &This->runtime_style);
1202 if(FAILED(hres))
1203 return hres;
1206 *p = &This->runtime_style->IHTMLStyle_iface;
1207 IHTMLStyle_AddRef(*p);
1208 return S_OK;
1211 static HRESULT WINAPI HTMLElement2_get_behaviorUrns(IHTMLElement2 *iface, IDispatch **p)
1213 HTMLElement *This = impl_from_IHTMLElement2(iface);
1214 FIXME("(%p)->(%p)\n", This, p);
1215 return E_NOTIMPL;
1218 static HRESULT WINAPI HTMLElement2_put_tagUrn(IHTMLElement2 *iface, BSTR v)
1220 HTMLElement *This = impl_from_IHTMLElement2(iface);
1221 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1222 return E_NOTIMPL;
1225 static HRESULT WINAPI HTMLElement2_get_tagUrn(IHTMLElement2 *iface, BSTR *p)
1227 HTMLElement *This = impl_from_IHTMLElement2(iface);
1228 FIXME("(%p)->(%p)\n", This, p);
1229 return E_NOTIMPL;
1232 static HRESULT WINAPI HTMLElement2_put_onbeforeeditfocus(IHTMLElement2 *iface, VARIANT vv)
1234 HTMLElement *This = impl_from_IHTMLElement2(iface);
1235 FIXME("(%p)->()\n", This);
1236 return E_NOTIMPL;
1239 static HRESULT WINAPI HTMLElement2_get_onbeforeeditfocus(IHTMLElement2 *iface, VARIANT *p)
1241 HTMLElement *This = impl_from_IHTMLElement2(iface);
1242 FIXME("(%p)->(%p)\n", This, p);
1243 return E_NOTIMPL;
1246 static HRESULT WINAPI HTMLElement2_get_readyStateValue(IHTMLElement2 *iface, LONG *p)
1248 HTMLElement *This = impl_from_IHTMLElement2(iface);
1249 FIXME("(%p)->(%p)\n", This, p);
1250 return E_NOTIMPL;
1253 static HRESULT WINAPI HTMLElement2_getElementsByTagName(IHTMLElement2 *iface, BSTR v,
1254 IHTMLElementCollection **pelColl)
1256 HTMLElement *This = impl_from_IHTMLElement2(iface);
1257 nsIDOMHTMLCollection *nscol;
1258 nsAString tag_str;
1259 nsresult nsres;
1261 TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), pelColl);
1263 nsAString_InitDepend(&tag_str, v);
1264 nsres = nsIDOMHTMLElement_GetElementsByTagName(This->nselem, &tag_str, &nscol);
1265 nsAString_Finish(&tag_str);
1266 if(NS_FAILED(nsres)) {
1267 ERR("GetElementByTagName failed: %08x\n", nsres);
1268 return E_FAIL;
1271 *pelColl = create_collection_from_htmlcol(This->node.doc, nscol);
1272 nsIDOMHTMLCollection_Release(nscol);
1273 return S_OK;
1276 static const IHTMLElement2Vtbl HTMLElement2Vtbl = {
1277 HTMLElement2_QueryInterface,
1278 HTMLElement2_AddRef,
1279 HTMLElement2_Release,
1280 HTMLElement2_GetTypeInfoCount,
1281 HTMLElement2_GetTypeInfo,
1282 HTMLElement2_GetIDsOfNames,
1283 HTMLElement2_Invoke,
1284 HTMLElement2_get_scopeName,
1285 HTMLElement2_setCapture,
1286 HTMLElement2_releaseCapture,
1287 HTMLElement2_put_onlosecapture,
1288 HTMLElement2_get_onlosecapture,
1289 HTMLElement2_componentFromPoint,
1290 HTMLElement2_doScroll,
1291 HTMLElement2_put_onscroll,
1292 HTMLElement2_get_onscroll,
1293 HTMLElement2_put_ondrag,
1294 HTMLElement2_get_ondrag,
1295 HTMLElement2_put_ondragend,
1296 HTMLElement2_get_ondragend,
1297 HTMLElement2_put_ondragenter,
1298 HTMLElement2_get_ondragenter,
1299 HTMLElement2_put_ondragover,
1300 HTMLElement2_get_ondragover,
1301 HTMLElement2_put_ondragleave,
1302 HTMLElement2_get_ondragleave,
1303 HTMLElement2_put_ondrop,
1304 HTMLElement2_get_ondrop,
1305 HTMLElement2_put_onbeforecut,
1306 HTMLElement2_get_onbeforecut,
1307 HTMLElement2_put_oncut,
1308 HTMLElement2_get_oncut,
1309 HTMLElement2_put_onbeforecopy,
1310 HTMLElement2_get_onbeforecopy,
1311 HTMLElement2_put_oncopy,
1312 HTMLElement2_get_oncopy,
1313 HTMLElement2_put_onbeforepaste,
1314 HTMLElement2_get_onbeforepaste,
1315 HTMLElement2_put_onpaste,
1316 HTMLElement2_get_onpaste,
1317 HTMLElement2_get_currentStyle,
1318 HTMLElement2_put_onpropertychange,
1319 HTMLElement2_get_onpropertychange,
1320 HTMLElement2_getClientRects,
1321 HTMLElement2_getBoundingClientRect,
1322 HTMLElement2_setExpression,
1323 HTMLElement2_getExpression,
1324 HTMLElement2_removeExpression,
1325 HTMLElement2_put_tabIndex,
1326 HTMLElement2_get_tabIndex,
1327 HTMLElement2_focus,
1328 HTMLElement2_put_accessKey,
1329 HTMLElement2_get_accessKey,
1330 HTMLElement2_put_onblur,
1331 HTMLElement2_get_onblur,
1332 HTMLElement2_put_onfocus,
1333 HTMLElement2_get_onfocus,
1334 HTMLElement2_put_onresize,
1335 HTMLElement2_get_onresize,
1336 HTMLElement2_blur,
1337 HTMLElement2_addFilter,
1338 HTMLElement2_removeFilter,
1339 HTMLElement2_get_clientHeight,
1340 HTMLElement2_get_clientWidth,
1341 HTMLElement2_get_clientTop,
1342 HTMLElement2_get_clientLeft,
1343 HTMLElement2_attachEvent,
1344 HTMLElement2_detachEvent,
1345 HTMLElement2_get_readyState,
1346 HTMLElement2_put_onreadystatechange,
1347 HTMLElement2_get_onreadystatechange,
1348 HTMLElement2_put_onrowsdelete,
1349 HTMLElement2_get_onrowsdelete,
1350 HTMLElement2_put_onrowsinserted,
1351 HTMLElement2_get_onrowsinserted,
1352 HTMLElement2_put_oncellchange,
1353 HTMLElement2_get_oncellchange,
1354 HTMLElement2_put_dir,
1355 HTMLElement2_get_dir,
1356 HTMLElement2_createControlRange,
1357 HTMLElement2_get_scrollHeight,
1358 HTMLElement2_get_scrollWidth,
1359 HTMLElement2_put_scrollTop,
1360 HTMLElement2_get_scrollTop,
1361 HTMLElement2_put_scrollLeft,
1362 HTMLElement2_get_scrollLeft,
1363 HTMLElement2_clearAttributes,
1364 HTMLElement2_mergeAttributes,
1365 HTMLElement2_put_oncontextmenu,
1366 HTMLElement2_get_oncontextmenu,
1367 HTMLElement2_insertAdjacentElement,
1368 HTMLElement2_applyElement,
1369 HTMLElement2_getAdjacentText,
1370 HTMLElement2_replaceAdjacentText,
1371 HTMLElement2_get_canHandleChildren,
1372 HTMLElement2_addBehavior,
1373 HTMLElement2_removeBehavior,
1374 HTMLElement2_get_runtimeStyle,
1375 HTMLElement2_get_behaviorUrns,
1376 HTMLElement2_put_tagUrn,
1377 HTMLElement2_get_tagUrn,
1378 HTMLElement2_put_onbeforeeditfocus,
1379 HTMLElement2_get_onbeforeeditfocus,
1380 HTMLElement2_get_readyStateValue,
1381 HTMLElement2_getElementsByTagName,
1384 void HTMLElement2_Init(HTMLElement *This)
1386 This->IHTMLElement2_iface.lpVtbl = &HTMLElement2Vtbl;