wineconsole: Free registry key name (valgrind).
[wine.git] / dlls / mshtml / htmliframe.c
blob854d8970953f338a6246ad66dc11a4154e630cdc
1 /*
2 * Copyright 2008 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>
21 #define COBJMACROS
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winuser.h"
26 #include "ole2.h"
28 #include "mshtml_private.h"
30 #include "wine/debug.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
34 typedef struct {
35 HTMLFrameBase framebase;
36 IHTMLIFrameElement IHTMLIFrameElement_iface;
37 IHTMLIFrameElement2 IHTMLIFrameElement2_iface;
38 IHTMLIFrameElement3 IHTMLIFrameElement3_iface;
39 } HTMLIFrame;
41 static inline HTMLIFrame *impl_from_IHTMLIFrameElement(IHTMLIFrameElement *iface)
43 return CONTAINING_RECORD(iface, HTMLIFrame, IHTMLIFrameElement_iface);
46 static HRESULT WINAPI HTMLIFrameElement_QueryInterface(IHTMLIFrameElement *iface,
47 REFIID riid, void **ppv)
49 HTMLIFrame *This = impl_from_IHTMLIFrameElement(iface);
51 return IHTMLDOMNode_QueryInterface(&This->framebase.element.node.IHTMLDOMNode_iface, riid, ppv);
54 static ULONG WINAPI HTMLIFrameElement_AddRef(IHTMLIFrameElement *iface)
56 HTMLIFrame *This = impl_from_IHTMLIFrameElement(iface);
58 return IHTMLDOMNode_AddRef(&This->framebase.element.node.IHTMLDOMNode_iface);
61 static ULONG WINAPI HTMLIFrameElement_Release(IHTMLIFrameElement *iface)
63 HTMLIFrame *This = impl_from_IHTMLIFrameElement(iface);
65 return IHTMLDOMNode_Release(&This->framebase.element.node.IHTMLDOMNode_iface);
68 static HRESULT WINAPI HTMLIFrameElement_GetTypeInfoCount(IHTMLIFrameElement *iface, UINT *pctinfo)
70 HTMLIFrame *This = impl_from_IHTMLIFrameElement(iface);
71 return IDispatchEx_GetTypeInfoCount(&This->framebase.element.node.dispex.IDispatchEx_iface,
72 pctinfo);
75 static HRESULT WINAPI HTMLIFrameElement_GetTypeInfo(IHTMLIFrameElement *iface, UINT iTInfo,
76 LCID lcid, ITypeInfo **ppTInfo)
78 HTMLIFrame *This = impl_from_IHTMLIFrameElement(iface);
79 return IDispatchEx_GetTypeInfo(&This->framebase.element.node.dispex.IDispatchEx_iface, iTInfo,
80 lcid, ppTInfo);
83 static HRESULT WINAPI HTMLIFrameElement_GetIDsOfNames(IHTMLIFrameElement *iface, REFIID riid,
84 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
86 HTMLIFrame *This = impl_from_IHTMLIFrameElement(iface);
87 return IDispatchEx_GetIDsOfNames(&This->framebase.element.node.dispex.IDispatchEx_iface, riid,
88 rgszNames, cNames, lcid, rgDispId);
91 static HRESULT WINAPI HTMLIFrameElement_Invoke(IHTMLIFrameElement *iface, DISPID dispIdMember,
92 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
93 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
95 HTMLIFrame *This = impl_from_IHTMLIFrameElement(iface);
96 return IDispatchEx_Invoke(&This->framebase.element.node.dispex.IDispatchEx_iface, dispIdMember,
97 riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
100 static HRESULT WINAPI HTMLIFrameElement_put_vspace(IHTMLIFrameElement *iface, LONG v)
102 HTMLIFrame *This = impl_from_IHTMLIFrameElement(iface);
103 FIXME("(%p)->(%d)\n", This, v);
104 return E_NOTIMPL;
107 static HRESULT WINAPI HTMLIFrameElement_get_vspace(IHTMLIFrameElement *iface, LONG *p)
109 HTMLIFrame *This = impl_from_IHTMLIFrameElement(iface);
110 FIXME("(%p)->(%p)\n", This, p);
111 return E_NOTIMPL;
114 static HRESULT WINAPI HTMLIFrameElement_put_hspace(IHTMLIFrameElement *iface, LONG v)
116 HTMLIFrame *This = impl_from_IHTMLIFrameElement(iface);
117 FIXME("(%p)->(%d)\n", This, v);
118 return E_NOTIMPL;
121 static HRESULT WINAPI HTMLIFrameElement_get_hspace(IHTMLIFrameElement *iface, LONG *p)
123 HTMLIFrame *This = impl_from_IHTMLIFrameElement(iface);
124 FIXME("(%p)->(%p)\n", This, p);
125 return E_NOTIMPL;
128 static HRESULT WINAPI HTMLIFrameElement_put_align(IHTMLIFrameElement *iface, BSTR v)
130 HTMLIFrame *This = impl_from_IHTMLIFrameElement(iface);
131 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
132 return E_NOTIMPL;
135 static HRESULT WINAPI HTMLIFrameElement_get_align(IHTMLIFrameElement *iface, BSTR *p)
137 HTMLIFrame *This = impl_from_IHTMLIFrameElement(iface);
138 FIXME("(%p)->(%p)\n", This, p);
139 return E_NOTIMPL;
142 static const IHTMLIFrameElementVtbl HTMLIFrameElementVtbl = {
143 HTMLIFrameElement_QueryInterface,
144 HTMLIFrameElement_AddRef,
145 HTMLIFrameElement_Release,
146 HTMLIFrameElement_GetTypeInfoCount,
147 HTMLIFrameElement_GetTypeInfo,
148 HTMLIFrameElement_GetIDsOfNames,
149 HTMLIFrameElement_Invoke,
150 HTMLIFrameElement_put_vspace,
151 HTMLIFrameElement_get_vspace,
152 HTMLIFrameElement_put_hspace,
153 HTMLIFrameElement_get_hspace,
154 HTMLIFrameElement_put_align,
155 HTMLIFrameElement_get_align
158 static inline HTMLIFrame *impl_from_IHTMLIFrameElement2(IHTMLIFrameElement2 *iface)
160 return CONTAINING_RECORD(iface, HTMLIFrame, IHTMLIFrameElement2_iface);
163 static HRESULT WINAPI HTMLIFrameElement2_QueryInterface(IHTMLIFrameElement2 *iface,
164 REFIID riid, void **ppv)
166 HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
168 return IHTMLDOMNode_QueryInterface(&This->framebase.element.node.IHTMLDOMNode_iface, riid, ppv);
171 static ULONG WINAPI HTMLIFrameElement2_AddRef(IHTMLIFrameElement2 *iface)
173 HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
175 return IHTMLDOMNode_AddRef(&This->framebase.element.node.IHTMLDOMNode_iface);
178 static ULONG WINAPI HTMLIFrameElement2_Release(IHTMLIFrameElement2 *iface)
180 HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
182 return IHTMLDOMNode_Release(&This->framebase.element.node.IHTMLDOMNode_iface);
185 static HRESULT WINAPI HTMLIFrameElement2_GetTypeInfoCount(IHTMLIFrameElement2 *iface, UINT *pctinfo)
187 HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
188 return IDispatchEx_GetTypeInfoCount(&This->framebase.element.node.dispex.IDispatchEx_iface,
189 pctinfo);
192 static HRESULT WINAPI HTMLIFrameElement2_GetTypeInfo(IHTMLIFrameElement2 *iface, UINT iTInfo,
193 LCID lcid, ITypeInfo **ppTInfo)
195 HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
196 return IDispatchEx_GetTypeInfo(&This->framebase.element.node.dispex.IDispatchEx_iface, iTInfo,
197 lcid, ppTInfo);
200 static HRESULT WINAPI HTMLIFrameElement2_GetIDsOfNames(IHTMLIFrameElement2 *iface, REFIID riid,
201 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
203 HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
204 return IDispatchEx_GetIDsOfNames(&This->framebase.element.node.dispex.IDispatchEx_iface, riid,
205 rgszNames, cNames, lcid, rgDispId);
208 static HRESULT WINAPI HTMLIFrameElement2_Invoke(IHTMLIFrameElement2 *iface, DISPID dispIdMember,
209 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
210 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
212 HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
213 return IDispatchEx_Invoke(&This->framebase.element.node.dispex.IDispatchEx_iface, dispIdMember,
214 riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
217 static HRESULT WINAPI HTMLIFrameElement2_put_height(IHTMLIFrameElement2 *iface, VARIANT v)
219 HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
220 nsAString nsstr;
221 nsresult nsres;
223 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
225 if(V_VT(&v) != VT_BSTR) {
226 FIXME("Unsupported %s\n", debugstr_variant(&v));
227 return E_NOTIMPL;
230 nsAString_InitDepend(&nsstr, V_BSTR(&v));
231 nsres = nsIDOMHTMLIFrameElement_SetHeight(This->framebase.nsiframe, &nsstr);
232 nsAString_Finish(&nsstr);
233 if(NS_FAILED(nsres)) {
234 ERR("SetHeight failed: %08x\n", nsres);
235 return E_FAIL;
238 return S_OK;
241 static HRESULT WINAPI HTMLIFrameElement2_get_height(IHTMLIFrameElement2 *iface, VARIANT *p)
243 HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
244 nsAString nsstr;
245 nsresult nsres;
247 TRACE("(%p)->(%p)\n", This, p);
249 nsAString_Init(&nsstr, NULL);
250 nsres = nsIDOMHTMLIFrameElement_GetHeight(This->framebase.nsiframe, &nsstr);
252 V_VT(p) = VT_BSTR;
253 return return_nsstr(nsres, &nsstr, &V_BSTR(p));
256 static HRESULT WINAPI HTMLIFrameElement2_put_width(IHTMLIFrameElement2 *iface, VARIANT v)
258 HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
259 nsAString nsstr;
260 nsresult nsres;
262 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
264 if(V_VT(&v) != VT_BSTR) {
265 FIXME("Unsupported %s\n", debugstr_variant(&v));
266 return E_NOTIMPL;
269 nsAString_InitDepend(&nsstr, V_BSTR(&v));
270 nsres = nsIDOMHTMLIFrameElement_SetWidth(This->framebase.nsiframe, &nsstr);
271 nsAString_Finish(&nsstr);
272 if(NS_FAILED(nsres)) {
273 ERR("SetWidth failed: %08x\n", nsres);
274 return E_FAIL;
277 return S_OK;
280 static HRESULT WINAPI HTMLIFrameElement2_get_width(IHTMLIFrameElement2 *iface, VARIANT *p)
282 HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
283 nsAString nsstr;
284 nsresult nsres;
286 TRACE("(%p)->(%p)\n", This, p);
288 nsAString_Init(&nsstr, NULL);
289 nsres = nsIDOMHTMLIFrameElement_GetWidth(This->framebase.nsiframe, &nsstr);
291 V_VT(p) = VT_BSTR;
292 return return_nsstr(nsres, &nsstr, &V_BSTR(p));
295 static const IHTMLIFrameElement2Vtbl HTMLIFrameElement2Vtbl = {
296 HTMLIFrameElement2_QueryInterface,
297 HTMLIFrameElement2_AddRef,
298 HTMLIFrameElement2_Release,
299 HTMLIFrameElement2_GetTypeInfoCount,
300 HTMLIFrameElement2_GetTypeInfo,
301 HTMLIFrameElement2_GetIDsOfNames,
302 HTMLIFrameElement2_Invoke,
303 HTMLIFrameElement2_put_height,
304 HTMLIFrameElement2_get_height,
305 HTMLIFrameElement2_put_width,
306 HTMLIFrameElement2_get_width
309 static inline HTMLIFrame *impl_from_IHTMLIFrameElement3(IHTMLIFrameElement3 *iface)
311 return CONTAINING_RECORD(iface, HTMLIFrame, IHTMLIFrameElement3_iface);
314 static HRESULT WINAPI HTMLIFrameElement3_QueryInterface(IHTMLIFrameElement3 *iface,
315 REFIID riid, void **ppv)
317 HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface);
319 return IHTMLDOMNode_QueryInterface(&This->framebase.element.node.IHTMLDOMNode_iface, riid, ppv);
322 static ULONG WINAPI HTMLIFrameElement3_AddRef(IHTMLIFrameElement3 *iface)
324 HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface);
326 return IHTMLDOMNode_AddRef(&This->framebase.element.node.IHTMLDOMNode_iface);
329 static ULONG WINAPI HTMLIFrameElement3_Release(IHTMLIFrameElement3 *iface)
331 HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface);
333 return IHTMLDOMNode_Release(&This->framebase.element.node.IHTMLDOMNode_iface);
336 static HRESULT WINAPI HTMLIFrameElement3_GetTypeInfoCount(IHTMLIFrameElement3 *iface, UINT *pctinfo)
338 HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface);
339 return IDispatchEx_GetTypeInfoCount(&This->framebase.element.node.dispex.IDispatchEx_iface,
340 pctinfo);
343 static HRESULT WINAPI HTMLIFrameElement3_GetTypeInfo(IHTMLIFrameElement3 *iface, UINT iTInfo,
344 LCID lcid, ITypeInfo **ppTInfo)
346 HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface);
347 return IDispatchEx_GetTypeInfo(&This->framebase.element.node.dispex.IDispatchEx_iface, iTInfo,
348 lcid, ppTInfo);
351 static HRESULT WINAPI HTMLIFrameElement3_GetIDsOfNames(IHTMLIFrameElement3 *iface, REFIID riid,
352 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
354 HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface);
355 return IDispatchEx_GetIDsOfNames(&This->framebase.element.node.dispex.IDispatchEx_iface, riid,
356 rgszNames, cNames, lcid, rgDispId);
359 static HRESULT WINAPI HTMLIFrameElement3_Invoke(IHTMLIFrameElement3 *iface, DISPID dispIdMember,
360 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
361 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
363 HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface);
364 return IDispatchEx_Invoke(&This->framebase.element.node.dispex.IDispatchEx_iface, dispIdMember,
365 riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
368 static HRESULT WINAPI HTMLIFrameElement3_get_contentDocument(IHTMLIFrameElement3 *iface, IDispatch **p)
370 HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface);
371 IHTMLDocument2 *doc;
372 HRESULT hres;
374 TRACE("(%p)->(%p)\n", This, p);
376 if(!This->framebase.content_window) {
377 *p = NULL;
378 return S_OK;
381 hres = IHTMLWindow2_get_document(&This->framebase.content_window->base.IHTMLWindow2_iface, &doc);
382 *p = (IDispatch*)doc;
383 return hres;
386 static HRESULT WINAPI HTMLIFrameElement3_put_src(IHTMLIFrameElement3 *iface, BSTR v)
388 HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface);
389 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
390 return E_NOTIMPL;
393 static HRESULT WINAPI HTMLIFrameElement3_get_src(IHTMLIFrameElement3 *iface, BSTR *p)
395 HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface);
396 FIXME("(%p)->(%p)\n", This, p);
397 return E_NOTIMPL;
400 static HRESULT WINAPI HTMLIFrameElement3_put_longDesc(IHTMLIFrameElement3 *iface, BSTR v)
402 HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface);
403 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
404 return E_NOTIMPL;
407 static HRESULT WINAPI HTMLIFrameElement3_get_longDesc(IHTMLIFrameElement3 *iface, BSTR *p)
409 HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface);
410 FIXME("(%p)->(%p)\n", This, p);
411 return E_NOTIMPL;
414 static HRESULT WINAPI HTMLIFrameElement3_put_frameBorder(IHTMLIFrameElement3 *iface, BSTR v)
416 HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface);
417 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
418 return E_NOTIMPL;
421 static HRESULT WINAPI HTMLIFrameElement3_get_frameBorder(IHTMLIFrameElement3 *iface, BSTR *p)
423 HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface);
424 FIXME("(%p)->(%p)\n", This, p);
425 return E_NOTIMPL;
428 static const IHTMLIFrameElement3Vtbl HTMLIFrameElement3Vtbl = {
429 HTMLIFrameElement3_QueryInterface,
430 HTMLIFrameElement3_AddRef,
431 HTMLIFrameElement3_Release,
432 HTMLIFrameElement3_GetTypeInfoCount,
433 HTMLIFrameElement3_GetTypeInfo,
434 HTMLIFrameElement3_GetIDsOfNames,
435 HTMLIFrameElement3_Invoke,
436 HTMLIFrameElement3_get_contentDocument,
437 HTMLIFrameElement3_put_src,
438 HTMLIFrameElement3_get_src,
439 HTMLIFrameElement3_put_longDesc,
440 HTMLIFrameElement3_get_longDesc,
441 HTMLIFrameElement3_put_frameBorder,
442 HTMLIFrameElement3_get_frameBorder
445 static inline HTMLIFrame *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
447 return CONTAINING_RECORD(iface, HTMLIFrame, framebase.element.node);
450 static HRESULT HTMLIFrame_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
452 HTMLIFrame *This = impl_from_HTMLDOMNode(iface);
454 if(IsEqualGUID(&IID_IHTMLIFrameElement, riid)) {
455 TRACE("(%p)->(IID_IHTMLIFrameElement %p)\n", This, ppv);
456 *ppv = &This->IHTMLIFrameElement_iface;
457 }else if(IsEqualGUID(&IID_IHTMLIFrameElement2, riid)) {
458 TRACE("(%p)->(IID_IHTMLIFrameElement2 %p)\n", This, ppv);
459 *ppv = &This->IHTMLIFrameElement2_iface;
460 }else if(IsEqualGUID(&IID_IHTMLIFrameElement3, riid)) {
461 TRACE("(%p)->(IID_IHTMLIFrameElement3 %p)\n", This, ppv);
462 *ppv = &This->IHTMLIFrameElement3_iface;
463 }else {
464 return HTMLFrameBase_QI(&This->framebase, riid, ppv);
467 IUnknown_AddRef((IUnknown*)*ppv);
468 return S_OK;
471 static void HTMLIFrame_destructor(HTMLDOMNode *iface)
473 HTMLIFrame *This = impl_from_HTMLDOMNode(iface);
475 HTMLFrameBase_destructor(&This->framebase);
478 static HRESULT HTMLIFrame_get_document(HTMLDOMNode *iface, IDispatch **p)
480 HTMLIFrame *This = impl_from_HTMLDOMNode(iface);
482 if(!This->framebase.content_window || !This->framebase.content_window->base.inner_window->doc) {
483 *p = NULL;
484 return S_OK;
487 *p = (IDispatch*)&This->framebase.content_window->base.inner_window->doc->basedoc.IHTMLDocument2_iface;
488 IDispatch_AddRef(*p);
489 return S_OK;
492 static HRESULT HTMLIFrame_get_dispid(HTMLDOMNode *iface, BSTR name,
493 DWORD grfdex, DISPID *pid)
495 HTMLIFrame *This = impl_from_HTMLDOMNode(iface);
497 if(!This->framebase.content_window)
498 return DISP_E_UNKNOWNNAME;
500 return search_window_props(This->framebase.content_window->base.inner_window, name, grfdex, pid);
503 static HRESULT HTMLIFrame_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid,
504 WORD flags, DISPPARAMS *params, VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
506 HTMLIFrame *This = impl_from_HTMLDOMNode(iface);
508 if(!This->framebase.content_window) {
509 ERR("no content window to invoke on\n");
510 return E_FAIL;
513 return IDispatchEx_InvokeEx(&This->framebase.content_window->base.IDispatchEx_iface, id, lcid,
514 flags, params, res, ei, caller);
517 static HRESULT HTMLIFrame_get_readystate(HTMLDOMNode *iface, BSTR *p)
519 HTMLIFrame *This = impl_from_HTMLDOMNode(iface);
521 return IHTMLFrameBase2_get_readyState(&This->framebase.IHTMLFrameBase2_iface, p);
524 static HRESULT HTMLIFrame_bind_to_tree(HTMLDOMNode *iface)
526 HTMLIFrame *This = impl_from_HTMLDOMNode(iface);
527 nsIDOMDocument *nsdoc;
528 nsresult nsres;
529 HRESULT hres;
531 nsres = nsIDOMHTMLIFrameElement_GetContentDocument(This->framebase.nsiframe, &nsdoc);
532 if(NS_FAILED(nsres) || !nsdoc) {
533 ERR("GetContentDocument failed: %08x\n", nsres);
534 return E_FAIL;
537 hres = set_frame_doc(&This->framebase, nsdoc);
538 nsIDOMDocument_Release(nsdoc);
539 return hres;
542 static const NodeImplVtbl HTMLIFrameImplVtbl = {
543 HTMLIFrame_QI,
544 HTMLIFrame_destructor,
545 HTMLElement_cpc,
546 HTMLElement_clone,
547 HTMLElement_handle_event,
548 HTMLElement_get_attr_col,
549 NULL,
550 NULL,
551 NULL,
552 NULL,
553 HTMLIFrame_get_document,
554 HTMLIFrame_get_readystate,
555 HTMLIFrame_get_dispid,
556 HTMLIFrame_invoke,
557 HTMLIFrame_bind_to_tree
560 static const tid_t HTMLIFrame_iface_tids[] = {
561 HTMLELEMENT_TIDS,
562 IHTMLFrameBase_tid,
563 IHTMLFrameBase2_tid,
564 IHTMLIFrameElement_tid,
565 IHTMLIFrameElement2_tid,
566 IHTMLIFrameElement3_tid,
570 static dispex_static_data_t HTMLIFrame_dispex = {
571 NULL,
572 DispHTMLIFrame_tid,
573 NULL,
574 HTMLIFrame_iface_tids
577 HRESULT HTMLIFrame_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
579 HTMLIFrame *ret;
581 ret = heap_alloc_zero(sizeof(HTMLIFrame));
582 if(!ret)
583 return E_OUTOFMEMORY;
585 ret->IHTMLIFrameElement_iface.lpVtbl = &HTMLIFrameElementVtbl;
586 ret->IHTMLIFrameElement2_iface.lpVtbl = &HTMLIFrameElement2Vtbl;
587 ret->IHTMLIFrameElement3_iface.lpVtbl = &HTMLIFrameElement3Vtbl;
588 ret->framebase.element.node.vtbl = &HTMLIFrameImplVtbl;
590 HTMLFrameBase_Init(&ret->framebase, doc, nselem, &HTMLIFrame_dispex);
592 *elem = &ret->framebase.element;
593 return S_OK;