2 * Copyright 2007 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
28 #include "wine/debug.h"
30 #include "mshtml_private.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
37 IHTMLTable IHTMLTable_iface;
38 IHTMLTable2 IHTMLTable2_iface;
39 IHTMLTable3 IHTMLTable3_iface;
42 nsIDOMHTMLTableElement *nstable;
45 static inline HTMLTable *impl_from_IHTMLTable(IHTMLTable *iface)
47 return CONTAINING_RECORD(iface, HTMLTable, IHTMLTable_iface);
50 static inline HTMLTable *impl_from_IHTMLTable2(IHTMLTable2 *iface)
52 return CONTAINING_RECORD(iface, HTMLTable, IHTMLTable2_iface);
55 static inline HTMLTable *impl_from_IHTMLTable3(IHTMLTable3 *iface)
57 return CONTAINING_RECORD(iface, HTMLTable, IHTMLTable3_iface);
60 static HRESULT WINAPI HTMLTable_QueryInterface(IHTMLTable *iface,
61 REFIID riid, void **ppv)
63 HTMLTable *This = impl_from_IHTMLTable(iface);
65 return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
68 static ULONG WINAPI HTMLTable_AddRef(IHTMLTable *iface)
70 HTMLTable *This = impl_from_IHTMLTable(iface);
72 return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
75 static ULONG WINAPI HTMLTable_Release(IHTMLTable *iface)
77 HTMLTable *This = impl_from_IHTMLTable(iface);
79 return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
82 static HRESULT WINAPI HTMLTable_GetTypeInfoCount(IHTMLTable *iface, UINT *pctinfo)
84 HTMLTable *This = impl_from_IHTMLTable(iface);
85 return IDispatchEx_GetTypeInfoCount(&This->element.node.dispex.IDispatchEx_iface, pctinfo);
88 static HRESULT WINAPI HTMLTable_GetTypeInfo(IHTMLTable *iface, UINT iTInfo,
89 LCID lcid, ITypeInfo **ppTInfo)
91 HTMLTable *This = impl_from_IHTMLTable(iface);
92 return IDispatchEx_GetTypeInfo(&This->element.node.dispex.IDispatchEx_iface, iTInfo, lcid,
96 static HRESULT WINAPI HTMLTable_GetIDsOfNames(IHTMLTable *iface, REFIID riid,
97 LPOLESTR *rgszNames, UINT cNames,
98 LCID lcid, DISPID *rgDispId)
100 HTMLTable *This = impl_from_IHTMLTable(iface);
101 return IDispatchEx_GetIDsOfNames(&This->element.node.dispex.IDispatchEx_iface, riid, rgszNames,
102 cNames, lcid, rgDispId);
105 static HRESULT WINAPI HTMLTable_Invoke(IHTMLTable *iface, DISPID dispIdMember,
106 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
107 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
109 HTMLTable *This = impl_from_IHTMLTable(iface);
110 return IDispatchEx_Invoke(&This->element.node.dispex.IDispatchEx_iface, dispIdMember, riid,
111 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
114 static HRESULT WINAPI HTMLTable_put_cols(IHTMLTable *iface, LONG v)
116 HTMLTable *This = impl_from_IHTMLTable(iface);
117 FIXME("(%p)->(%d)\n", This, v);
121 static HRESULT WINAPI HTMLTable_get_cols(IHTMLTable *iface, LONG *p)
123 HTMLTable *This = impl_from_IHTMLTable(iface);
124 FIXME("(%p)->(%p)\n", This, p);
128 static HRESULT WINAPI HTMLTable_put_border(IHTMLTable *iface, VARIANT v)
130 HTMLTable *This = impl_from_IHTMLTable(iface);
131 FIXME("(%p)->(v)\n", This);
135 static HRESULT WINAPI HTMLTable_get_border(IHTMLTable *iface, VARIANT *p)
137 HTMLTable *This = impl_from_IHTMLTable(iface);
138 FIXME("(%p)->(%p)\n", This, p);
142 static HRESULT WINAPI HTMLTable_put_frame(IHTMLTable *iface, BSTR v)
144 HTMLTable *This = impl_from_IHTMLTable(iface);
145 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
149 static HRESULT WINAPI HTMLTable_get_frame(IHTMLTable *iface, BSTR *p)
151 HTMLTable *This = impl_from_IHTMLTable(iface);
152 FIXME("(%p)->(%p)\n", This, p);
156 static HRESULT WINAPI HTMLTable_put_rules(IHTMLTable *iface, BSTR v)
158 HTMLTable *This = impl_from_IHTMLTable(iface);
159 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
163 static HRESULT WINAPI HTMLTable_get_rules(IHTMLTable *iface, BSTR *p)
165 HTMLTable *This = impl_from_IHTMLTable(iface);
166 FIXME("(%p)->(%p)\n", This, p);
170 static HRESULT WINAPI HTMLTable_put_cellSpacing(IHTMLTable *iface, VARIANT v)
172 HTMLTable *This = impl_from_IHTMLTable(iface);
173 FIXME("(%p)->(v)\n", This);
177 static HRESULT WINAPI HTMLTable_get_cellSpacing(IHTMLTable *iface, VARIANT *p)
179 HTMLTable *This = impl_from_IHTMLTable(iface);
180 FIXME("(%p)->(%p)\n", This, p);
184 static HRESULT WINAPI HTMLTable_put_cellPadding(IHTMLTable *iface, VARIANT v)
186 HTMLTable *This = impl_from_IHTMLTable(iface);
187 FIXME("(%p)->(v)\n", This);
191 static HRESULT WINAPI HTMLTable_get_cellPadding(IHTMLTable *iface, VARIANT *p)
193 HTMLTable *This = impl_from_IHTMLTable(iface);
194 FIXME("(%p)->(%p)\n", This, p);
198 static HRESULT WINAPI HTMLTable_put_background(IHTMLTable *iface, BSTR v)
200 HTMLTable *This = impl_from_IHTMLTable(iface);
201 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
205 static HRESULT WINAPI HTMLTable_get_background(IHTMLTable *iface, BSTR *p)
207 HTMLTable *This = impl_from_IHTMLTable(iface);
208 FIXME("(%p)->(%p)\n", This, p);
212 static HRESULT WINAPI HTMLTable_put_bgColor(IHTMLTable *iface, VARIANT v)
214 HTMLTable *This = impl_from_IHTMLTable(iface);
215 FIXME("(%p)->(v)\n", This);
219 static HRESULT WINAPI HTMLTable_get_bgColor(IHTMLTable *iface, VARIANT *p)
221 HTMLTable *This = impl_from_IHTMLTable(iface);
222 FIXME("(%p)->(%p)\n", This, p);
226 static HRESULT WINAPI HTMLTable_put_borderColor(IHTMLTable *iface, VARIANT v)
228 HTMLTable *This = impl_from_IHTMLTable(iface);
229 FIXME("(%p)->(v)\n", This);
233 static HRESULT WINAPI HTMLTable_get_borderColor(IHTMLTable *iface, VARIANT *p)
235 HTMLTable *This = impl_from_IHTMLTable(iface);
236 FIXME("(%p)->(%p)\n", This, p);
240 static HRESULT WINAPI HTMLTable_put_borderColorLight(IHTMLTable *iface, VARIANT v)
242 HTMLTable *This = impl_from_IHTMLTable(iface);
243 FIXME("(%p)->(v)\n", This);
247 static HRESULT WINAPI HTMLTable_get_borderColorLight(IHTMLTable *iface, VARIANT *p)
249 HTMLTable *This = impl_from_IHTMLTable(iface);
250 FIXME("(%p)->(%p)\n", This, p);
254 static HRESULT WINAPI HTMLTable_put_borderColorDark(IHTMLTable *iface, VARIANT v)
256 HTMLTable *This = impl_from_IHTMLTable(iface);
257 FIXME("(%p)->(v)\n", This);
261 static HRESULT WINAPI HTMLTable_get_borderColorDark(IHTMLTable *iface, VARIANT *p)
263 HTMLTable *This = impl_from_IHTMLTable(iface);
264 FIXME("(%p)->(%p)\n", This, p);
268 static HRESULT WINAPI HTMLTable_put_align(IHTMLTable *iface, BSTR v)
270 HTMLTable *This = impl_from_IHTMLTable(iface);
271 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
275 static HRESULT WINAPI HTMLTable_get_align(IHTMLTable *iface, BSTR *p)
277 HTMLTable *This = impl_from_IHTMLTable(iface);
278 FIXME("(%p)->(%p)\n", This, p);
282 static HRESULT WINAPI HTMLTable_refresh(IHTMLTable *iface)
284 HTMLTable *This = impl_from_IHTMLTable(iface);
285 FIXME("(%p)\n", This);
289 static HRESULT WINAPI HTMLTable_get_rows(IHTMLTable *iface, IHTMLElementCollection **p)
291 HTMLTable *This = impl_from_IHTMLTable(iface);
292 nsIDOMHTMLCollection *nscol;
295 TRACE("(%p)->(%p)\n", This, p);
297 nsres = nsIDOMHTMLTableElement_GetRows(This->nstable, &nscol);
298 if(NS_FAILED(nsres)) {
299 ERR("GetRows failed: %08x\n", nsres);
303 *p = create_collection_from_htmlcol(This->element.node.doc, (IUnknown*)&This->IHTMLTable_iface,
306 nsIDOMHTMLCollection_Release(nscol);
310 static HRESULT WINAPI HTMLTable_put_width(IHTMLTable *iface, VARIANT v)
312 HTMLTable *This = impl_from_IHTMLTable(iface);
313 FIXME("(%p)->(v)\n", This);
317 static HRESULT WINAPI HTMLTable_get_width(IHTMLTable *iface, VARIANT *p)
319 HTMLTable *This = impl_from_IHTMLTable(iface);
320 FIXME("(%p)->(%p)\n", This, p);
324 static HRESULT WINAPI HTMLTable_put_height(IHTMLTable *iface, VARIANT v)
326 HTMLTable *This = impl_from_IHTMLTable(iface);
327 FIXME("(%p)->(v)\n", This);
331 static HRESULT WINAPI HTMLTable_get_height(IHTMLTable *iface, VARIANT *p)
333 HTMLTable *This = impl_from_IHTMLTable(iface);
334 FIXME("(%p)->(%p)\n", This, p);
338 static HRESULT WINAPI HTMLTable_put_dataPageSize(IHTMLTable *iface, LONG v)
340 HTMLTable *This = impl_from_IHTMLTable(iface);
341 FIXME("(%p)->(%d)\n", This, v);
345 static HRESULT WINAPI HTMLTable_get_dataPageSize(IHTMLTable *iface, LONG *p)
347 HTMLTable *This = impl_from_IHTMLTable(iface);
348 FIXME("(%p)->(%p)\n", This, p);
352 static HRESULT WINAPI HTMLTable_nextPage(IHTMLTable *iface)
354 HTMLTable *This = impl_from_IHTMLTable(iface);
355 FIXME("(%p)\n", This);
359 static HRESULT WINAPI HTMLTable_previousPage(IHTMLTable *iface)
361 HTMLTable *This = impl_from_IHTMLTable(iface);
362 FIXME("(%p)\n", This);
366 static HRESULT WINAPI HTMLTable_get_tHead(IHTMLTable *iface, IHTMLTableSection **p)
368 HTMLTable *This = impl_from_IHTMLTable(iface);
369 FIXME("(%p)->(%p)\n", This, p);
373 static HRESULT WINAPI HTMLTable_get_tFoot(IHTMLTable *iface, IHTMLTableSection **p)
375 HTMLTable *This = impl_from_IHTMLTable(iface);
376 FIXME("(%p)->(%p)\n", This, p);
380 static HRESULT WINAPI HTMLTable_get_tBodies(IHTMLTable *iface, IHTMLElementCollection **p)
382 HTMLTable *This = impl_from_IHTMLTable(iface);
383 FIXME("(%p)->(%p)\n", This, p);
387 static HRESULT WINAPI HTMLTable_get_caption(IHTMLTable *iface, IHTMLTableCaption **p)
389 HTMLTable *This = impl_from_IHTMLTable(iface);
390 FIXME("(%p)->(%p)\n", This, p);
394 static HRESULT WINAPI HTMLTable_createTHead(IHTMLTable *iface, IDispatch **head)
396 HTMLTable *This = impl_from_IHTMLTable(iface);
397 FIXME("(%p)->(%p)\n", This, head);
401 static HRESULT WINAPI HTMLTable_deleteTHead(IHTMLTable *iface)
403 HTMLTable *This = impl_from_IHTMLTable(iface);
404 FIXME("(%p)\n", This);
408 static HRESULT WINAPI HTMLTable_createTFoot(IHTMLTable *iface, IDispatch **foot)
410 HTMLTable *This = impl_from_IHTMLTable(iface);
411 FIXME("(%p)->(%p)\n", This, foot);
415 static HRESULT WINAPI HTMLTable_deleteTFoot(IHTMLTable *iface)
417 HTMLTable *This = impl_from_IHTMLTable(iface);
418 FIXME("(%p)\n", This);
422 static HRESULT WINAPI HTMLTable_createCaption(IHTMLTable *iface, IHTMLTableCaption **caption)
424 HTMLTable *This = impl_from_IHTMLTable(iface);
425 FIXME("(%p)->(%p)\n", This, caption);
429 static HRESULT WINAPI HTMLTable_deleteCaption(IHTMLTable *iface)
431 HTMLTable *This = impl_from_IHTMLTable(iface);
432 FIXME("(%p)\n", This);
436 static HRESULT WINAPI HTMLTable_insertRow(IHTMLTable *iface, LONG index, IDispatch **row)
438 HTMLTable *This = impl_from_IHTMLTable(iface);
439 FIXME("(%p)->(%d %p)\n", This, index, row);
443 static HRESULT WINAPI HTMLTable_deleteRow(IHTMLTable *iface, LONG index)
445 HTMLTable *This = impl_from_IHTMLTable(iface);
446 FIXME("(%p)->(%d)\n", This, index);
450 static HRESULT WINAPI HTMLTable_get_readyState(IHTMLTable *iface, BSTR *p)
452 HTMLTable *This = impl_from_IHTMLTable(iface);
453 FIXME("(%p)->(%p)\n", This, p);
457 static HRESULT WINAPI HTMLTable_put_onreadystatechange(IHTMLTable *iface, VARIANT v)
459 HTMLTable *This = impl_from_IHTMLTable(iface);
460 FIXME("(%p)->(v)\n", This);
464 static HRESULT WINAPI HTMLTable_get_onreadystatechange(IHTMLTable *iface, VARIANT *p)
466 HTMLTable *This = impl_from_IHTMLTable(iface);
467 FIXME("(%p)->(%p)\n", This, p);
471 static const IHTMLTableVtbl HTMLTableVtbl = {
472 HTMLTable_QueryInterface,
475 HTMLTable_GetTypeInfoCount,
476 HTMLTable_GetTypeInfo,
477 HTMLTable_GetIDsOfNames,
481 HTMLTable_put_border,
482 HTMLTable_get_border,
487 HTMLTable_put_cellSpacing,
488 HTMLTable_get_cellSpacing,
489 HTMLTable_put_cellPadding,
490 HTMLTable_get_cellPadding,
491 HTMLTable_put_background,
492 HTMLTable_get_background,
493 HTMLTable_put_bgColor,
494 HTMLTable_get_bgColor,
495 HTMLTable_put_borderColor,
496 HTMLTable_get_borderColor,
497 HTMLTable_put_borderColorLight,
498 HTMLTable_get_borderColorLight,
499 HTMLTable_put_borderColorDark,
500 HTMLTable_get_borderColorDark,
507 HTMLTable_put_height,
508 HTMLTable_get_height,
509 HTMLTable_put_dataPageSize,
510 HTMLTable_get_dataPageSize,
512 HTMLTable_previousPage,
515 HTMLTable_get_tBodies,
516 HTMLTable_get_caption,
517 HTMLTable_createTHead,
518 HTMLTable_deleteTHead,
519 HTMLTable_createTFoot,
520 HTMLTable_deleteTFoot,
521 HTMLTable_createCaption,
522 HTMLTable_deleteCaption,
525 HTMLTable_get_readyState,
526 HTMLTable_put_onreadystatechange,
527 HTMLTable_get_onreadystatechange
531 static HRESULT WINAPI HTMLTable2_QueryInterface(IHTMLTable2 *iface,
532 REFIID riid, void **ppv)
534 HTMLTable *This = impl_from_IHTMLTable2(iface);
536 return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
539 static ULONG WINAPI HTMLTable2_AddRef(IHTMLTable2 *iface)
541 HTMLTable *This = impl_from_IHTMLTable2(iface);
543 return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
546 static ULONG WINAPI HTMLTable2_Release(IHTMLTable2 *iface)
548 HTMLTable *This = impl_from_IHTMLTable2(iface);
550 return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
553 static HRESULT WINAPI HTMLTable2_GetTypeInfoCount(IHTMLTable2 *iface, UINT *pctinfo)
555 HTMLTable *This = impl_from_IHTMLTable2(iface);
556 return IDispatchEx_GetTypeInfoCount(&This->element.node.dispex.IDispatchEx_iface, pctinfo);
559 static HRESULT WINAPI HTMLTable2_GetTypeInfo(IHTMLTable2 *iface, UINT iTInfo,
560 LCID lcid, ITypeInfo **ppTInfo)
562 HTMLTable *This = impl_from_IHTMLTable2(iface);
563 return IDispatchEx_GetTypeInfo(&This->element.node.dispex.IDispatchEx_iface, iTInfo, lcid,
567 static HRESULT WINAPI HTMLTable2_GetIDsOfNames(IHTMLTable2 *iface, REFIID riid,
568 LPOLESTR *rgszNames, UINT cNames,
569 LCID lcid, DISPID *rgDispId)
571 HTMLTable *This = impl_from_IHTMLTable2(iface);
572 return IDispatchEx_GetIDsOfNames(&This->element.node.dispex.IDispatchEx_iface, riid, rgszNames,
573 cNames, lcid, rgDispId);
576 static HRESULT WINAPI HTMLTable2_Invoke(IHTMLTable2 *iface, DISPID dispIdMember,
577 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
578 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
580 HTMLTable *This = impl_from_IHTMLTable2(iface);
581 return IDispatchEx_Invoke(&This->element.node.dispex.IDispatchEx_iface, dispIdMember, riid,
582 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
585 static HRESULT WINAPI HTMLTable2_firstPage(IHTMLTable2 *iface)
587 HTMLTable *This = impl_from_IHTMLTable2(iface);
588 FIXME("(%p)->()\n", This);
592 static HRESULT WINAPI HTMLTable2_lastPage(IHTMLTable2 *iface)
594 HTMLTable *This = impl_from_IHTMLTable2(iface);
595 FIXME("(%p)->()\n", This);
599 static HRESULT WINAPI HTMLTable2_cells(IHTMLTable2 *iface, IHTMLElementCollection **p)
601 HTMLTable *This = impl_from_IHTMLTable2(iface);
602 FIXME("(%p)->(%p)\n", This, p);
606 static HRESULT WINAPI HTMLTable2_moveRow(IHTMLTable2 *iface, LONG indexFrom, LONG indexTo, IDispatch **row)
608 HTMLTable *This = impl_from_IHTMLTable2(iface);
609 FIXME("(%p)->(%d %d %p)\n", This, indexFrom, indexTo, row);
614 static const IHTMLTable2Vtbl HTMLTable2Vtbl = {
615 HTMLTable2_QueryInterface,
618 HTMLTable2_GetTypeInfoCount,
619 HTMLTable2_GetTypeInfo,
620 HTMLTable2_GetIDsOfNames,
622 HTMLTable2_firstPage,
629 static HRESULT WINAPI HTMLTable3_QueryInterface(IHTMLTable3 *iface,
630 REFIID riid, void **ppv)
632 HTMLTable *This = impl_from_IHTMLTable3(iface);
634 return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
637 static ULONG WINAPI HTMLTable3_AddRef(IHTMLTable3 *iface)
639 HTMLTable *This = impl_from_IHTMLTable3(iface);
641 return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
644 static ULONG WINAPI HTMLTable3_Release(IHTMLTable3 *iface)
646 HTMLTable *This = impl_from_IHTMLTable3(iface);
648 return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
651 static HRESULT WINAPI HTMLTable3_GetTypeInfoCount(IHTMLTable3 *iface, UINT *pctinfo)
653 HTMLTable *This = impl_from_IHTMLTable3(iface);
654 return IDispatchEx_GetTypeInfoCount(&This->element.node.dispex.IDispatchEx_iface, pctinfo);
657 static HRESULT WINAPI HTMLTable3_GetTypeInfo(IHTMLTable3 *iface, UINT iTInfo,
658 LCID lcid, ITypeInfo **ppTInfo)
660 HTMLTable *This = impl_from_IHTMLTable3(iface);
661 return IDispatchEx_GetTypeInfo(&This->element.node.dispex.IDispatchEx_iface, iTInfo, lcid,
665 static HRESULT WINAPI HTMLTable3_GetIDsOfNames(IHTMLTable3 *iface, REFIID riid,
666 LPOLESTR *rgszNames, UINT cNames,
667 LCID lcid, DISPID *rgDispId)
669 HTMLTable *This = impl_from_IHTMLTable3(iface);
670 return IDispatchEx_GetIDsOfNames(&This->element.node.dispex.IDispatchEx_iface, riid, rgszNames,
671 cNames, lcid, rgDispId);
674 static HRESULT WINAPI HTMLTable3_Invoke(IHTMLTable3 *iface, DISPID dispIdMember,
675 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
676 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
678 HTMLTable *This = impl_from_IHTMLTable3(iface);
679 return IDispatchEx_Invoke(&This->element.node.dispex.IDispatchEx_iface, dispIdMember, riid,
680 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
683 static HRESULT WINAPI HTMLTable3_put_summary(IHTMLTable3 *iface, BSTR v)
685 HTMLTable *This = impl_from_IHTMLTable3(iface);
686 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
690 static HRESULT WINAPI HTMLTable3_get_summary(IHTMLTable3 *iface, BSTR * p)
692 HTMLTable *This = impl_from_IHTMLTable3(iface);
693 FIXME("(%p)->(%p)\n", This, p);
697 static const IHTMLTable3Vtbl HTMLTable3Vtbl = {
698 HTMLTable3_QueryInterface,
701 HTMLTable3_GetTypeInfoCount,
702 HTMLTable3_GetTypeInfo,
703 HTMLTable3_GetIDsOfNames,
705 HTMLTable3_put_summary,
706 HTMLTable3_get_summary
709 static inline HTMLTable *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
711 return CONTAINING_RECORD(iface, HTMLTable, element.node);
714 static HRESULT HTMLTable_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
716 HTMLTable *This = impl_from_HTMLDOMNode(iface);
720 if(IsEqualGUID(&IID_IUnknown, riid)) {
721 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
722 *ppv = &This->IHTMLTable_iface;
723 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
724 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
725 *ppv = &This->IHTMLTable_iface;
726 }else if(IsEqualGUID(&IID_IHTMLTable, riid)) {
727 TRACE("(%p)->(IID_IHTMLTable %p)\n", This, ppv);
728 *ppv = &This->IHTMLTable_iface;
729 }else if(IsEqualGUID(&IID_IHTMLTable2, riid)) {
730 TRACE("(%p)->(IID_IHTMLTable2 %p)\n", This, ppv);
731 *ppv = &This->IHTMLTable_iface;
732 }else if(IsEqualGUID(&IID_IHTMLTable3, riid)) {
733 TRACE("(%p)->(IID_IHTMLTable3 %p)\n", This, ppv);
734 *ppv = &This->IHTMLTable_iface;
738 IUnknown_AddRef((IUnknown*)*ppv);
742 return HTMLElement_QI(&This->element.node, riid, ppv);
745 static void HTMLTable_destructor(HTMLDOMNode *iface)
747 HTMLTable *This = impl_from_HTMLDOMNode(iface);
750 nsIDOMHTMLTableElement_Release(This->nstable);
752 HTMLElement_destructor(&This->element.node);
755 static const NodeImplVtbl HTMLTableImplVtbl = {
757 HTMLTable_destructor,
759 HTMLElement_get_attr_col
762 static const tid_t HTMLTable_iface_tids[] = {
768 static dispex_static_data_t HTMLTable_dispex = {
775 HRESULT HTMLTable_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
780 ret = heap_alloc_zero(sizeof(HTMLTable));
782 return E_OUTOFMEMORY;
784 ret->element.node.vtbl = &HTMLTableImplVtbl;
785 ret->IHTMLTable_iface.lpVtbl = &HTMLTableVtbl;
787 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLTableElement, (void**)&ret->nstable);
788 if(NS_FAILED(nsres)) {
789 ERR("Could not get nsIDOMHTMLTableElement iface: %08x\n", nsres);
794 HTMLElement_Init(&ret->element, doc, nselem, &HTMLTable_dispex);
795 ConnectionPoint_Init(&ret->cp, &ret->element.cp_container, &DIID_HTMLTableEvents, NULL);
797 *elem = &ret->element;