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
29 #include "wine/debug.h"
31 #include "mshtml_private.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
38 IHTMLTable IHTMLTable_iface;
39 IHTMLTable2 IHTMLTable2_iface;
40 IHTMLTable3 IHTMLTable3_iface;
43 nsIDOMHTMLTableElement *nstable;
46 static inline HTMLTable *impl_from_IHTMLTable(IHTMLTable *iface)
48 return CONTAINING_RECORD(iface, HTMLTable, IHTMLTable_iface);
51 static inline HTMLTable *impl_from_IHTMLTable2(IHTMLTable2 *iface)
53 return CONTAINING_RECORD(iface, HTMLTable, IHTMLTable2_iface);
56 static inline HTMLTable *impl_from_IHTMLTable3(IHTMLTable3 *iface)
58 return CONTAINING_RECORD(iface, HTMLTable, IHTMLTable3_iface);
61 static HRESULT WINAPI HTMLTable_QueryInterface(IHTMLTable *iface,
62 REFIID riid, void **ppv)
64 HTMLTable *This = impl_from_IHTMLTable(iface);
66 return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
69 static ULONG WINAPI HTMLTable_AddRef(IHTMLTable *iface)
71 HTMLTable *This = impl_from_IHTMLTable(iface);
73 return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
76 static ULONG WINAPI HTMLTable_Release(IHTMLTable *iface)
78 HTMLTable *This = impl_from_IHTMLTable(iface);
80 return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
83 static HRESULT WINAPI HTMLTable_GetTypeInfoCount(IHTMLTable *iface, UINT *pctinfo)
85 HTMLTable *This = impl_from_IHTMLTable(iface);
86 return IDispatchEx_GetTypeInfoCount(&This->element.node.dispex.IDispatchEx_iface, pctinfo);
89 static HRESULT WINAPI HTMLTable_GetTypeInfo(IHTMLTable *iface, UINT iTInfo,
90 LCID lcid, ITypeInfo **ppTInfo)
92 HTMLTable *This = impl_from_IHTMLTable(iface);
93 return IDispatchEx_GetTypeInfo(&This->element.node.dispex.IDispatchEx_iface, iTInfo, lcid,
97 static HRESULT WINAPI HTMLTable_GetIDsOfNames(IHTMLTable *iface, REFIID riid,
98 LPOLESTR *rgszNames, UINT cNames,
99 LCID lcid, DISPID *rgDispId)
101 HTMLTable *This = impl_from_IHTMLTable(iface);
102 return IDispatchEx_GetIDsOfNames(&This->element.node.dispex.IDispatchEx_iface, riid, rgszNames,
103 cNames, lcid, rgDispId);
106 static HRESULT WINAPI HTMLTable_Invoke(IHTMLTable *iface, DISPID dispIdMember,
107 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
108 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
110 HTMLTable *This = impl_from_IHTMLTable(iface);
111 return IDispatchEx_Invoke(&This->element.node.dispex.IDispatchEx_iface, dispIdMember, riid,
112 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
115 static HRESULT WINAPI HTMLTable_put_cols(IHTMLTable *iface, LONG v)
117 HTMLTable *This = impl_from_IHTMLTable(iface);
118 FIXME("(%p)->(%d)\n", This, v);
122 static HRESULT WINAPI HTMLTable_get_cols(IHTMLTable *iface, LONG *p)
124 HTMLTable *This = impl_from_IHTMLTable(iface);
125 FIXME("(%p)->(%p)\n", This, p);
129 static HRESULT WINAPI HTMLTable_put_border(IHTMLTable *iface, VARIANT v)
131 HTMLTable *This = impl_from_IHTMLTable(iface);
132 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
136 static HRESULT WINAPI HTMLTable_get_border(IHTMLTable *iface, VARIANT *p)
138 HTMLTable *This = impl_from_IHTMLTable(iface);
139 FIXME("(%p)->(%p)\n", This, p);
143 static HRESULT WINAPI HTMLTable_put_frame(IHTMLTable *iface, BSTR v)
145 HTMLTable *This = impl_from_IHTMLTable(iface);
146 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
150 static HRESULT WINAPI HTMLTable_get_frame(IHTMLTable *iface, BSTR *p)
152 HTMLTable *This = impl_from_IHTMLTable(iface);
153 FIXME("(%p)->(%p)\n", This, p);
157 static HRESULT WINAPI HTMLTable_put_rules(IHTMLTable *iface, BSTR v)
159 HTMLTable *This = impl_from_IHTMLTable(iface);
160 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
164 static HRESULT WINAPI HTMLTable_get_rules(IHTMLTable *iface, BSTR *p)
166 HTMLTable *This = impl_from_IHTMLTable(iface);
167 FIXME("(%p)->(%p)\n", This, p);
171 static HRESULT WINAPI HTMLTable_put_cellSpacing(IHTMLTable *iface, VARIANT v)
173 HTMLTable *This = impl_from_IHTMLTable(iface);
174 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
178 static HRESULT WINAPI HTMLTable_get_cellSpacing(IHTMLTable *iface, VARIANT *p)
180 HTMLTable *This = impl_from_IHTMLTable(iface);
181 FIXME("(%p)->(%p)\n", This, p);
185 static HRESULT WINAPI HTMLTable_put_cellPadding(IHTMLTable *iface, VARIANT v)
187 HTMLTable *This = impl_from_IHTMLTable(iface);
188 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
192 static HRESULT WINAPI HTMLTable_get_cellPadding(IHTMLTable *iface, VARIANT *p)
194 HTMLTable *This = impl_from_IHTMLTable(iface);
195 FIXME("(%p)->(%p)\n", This, p);
199 static HRESULT WINAPI HTMLTable_put_background(IHTMLTable *iface, BSTR v)
201 HTMLTable *This = impl_from_IHTMLTable(iface);
202 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
206 static HRESULT WINAPI HTMLTable_get_background(IHTMLTable *iface, BSTR *p)
208 HTMLTable *This = impl_from_IHTMLTable(iface);
209 FIXME("(%p)->(%p)\n", This, p);
213 static HRESULT WINAPI HTMLTable_put_bgColor(IHTMLTable *iface, VARIANT v)
215 HTMLTable *This = impl_from_IHTMLTable(iface);
216 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
220 static HRESULT WINAPI HTMLTable_get_bgColor(IHTMLTable *iface, VARIANT *p)
222 HTMLTable *This = impl_from_IHTMLTable(iface);
223 FIXME("(%p)->(%p)\n", This, p);
227 static HRESULT WINAPI HTMLTable_put_borderColor(IHTMLTable *iface, VARIANT v)
229 HTMLTable *This = impl_from_IHTMLTable(iface);
230 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
234 static HRESULT WINAPI HTMLTable_get_borderColor(IHTMLTable *iface, VARIANT *p)
236 HTMLTable *This = impl_from_IHTMLTable(iface);
237 FIXME("(%p)->(%p)\n", This, p);
241 static HRESULT WINAPI HTMLTable_put_borderColorLight(IHTMLTable *iface, VARIANT v)
243 HTMLTable *This = impl_from_IHTMLTable(iface);
244 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
248 static HRESULT WINAPI HTMLTable_get_borderColorLight(IHTMLTable *iface, VARIANT *p)
250 HTMLTable *This = impl_from_IHTMLTable(iface);
251 FIXME("(%p)->(%p)\n", This, p);
255 static HRESULT WINAPI HTMLTable_put_borderColorDark(IHTMLTable *iface, VARIANT v)
257 HTMLTable *This = impl_from_IHTMLTable(iface);
258 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
262 static HRESULT WINAPI HTMLTable_get_borderColorDark(IHTMLTable *iface, VARIANT *p)
264 HTMLTable *This = impl_from_IHTMLTable(iface);
265 FIXME("(%p)->(%p)\n", This, p);
269 static HRESULT WINAPI HTMLTable_put_align(IHTMLTable *iface, BSTR v)
271 HTMLTable *This = impl_from_IHTMLTable(iface);
272 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
276 static HRESULT WINAPI HTMLTable_get_align(IHTMLTable *iface, BSTR *p)
278 HTMLTable *This = impl_from_IHTMLTable(iface);
279 FIXME("(%p)->(%p)\n", This, p);
283 static HRESULT WINAPI HTMLTable_refresh(IHTMLTable *iface)
285 HTMLTable *This = impl_from_IHTMLTable(iface);
286 FIXME("(%p)\n", This);
290 static HRESULT WINAPI HTMLTable_get_rows(IHTMLTable *iface, IHTMLElementCollection **p)
292 HTMLTable *This = impl_from_IHTMLTable(iface);
293 nsIDOMHTMLCollection *nscol;
296 TRACE("(%p)->(%p)\n", This, p);
298 nsres = nsIDOMHTMLTableElement_GetRows(This->nstable, &nscol);
299 if(NS_FAILED(nsres)) {
300 ERR("GetRows failed: %08x\n", nsres);
304 *p = create_collection_from_htmlcol(This->element.node.doc, nscol);
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)->(%s)\n", This, debugstr_variant(&v));
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)->(%s)\n", This, debugstr_variant(&v));
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)->(%s)\n", This, debugstr_variant(&v));
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 const NodeImplVtbl HTMLTableImplVtbl = {
747 HTMLElement_destructor,
749 HTMLElement_handle_event,
750 HTMLElement_get_attr_col
753 static const tid_t HTMLTable_iface_tids[] = {
759 static dispex_static_data_t HTMLTable_dispex = {
766 HRESULT HTMLTable_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
771 ret = heap_alloc_zero(sizeof(HTMLTable));
773 return E_OUTOFMEMORY;
775 ret->element.node.vtbl = &HTMLTableImplVtbl;
776 ret->IHTMLTable_iface.lpVtbl = &HTMLTableVtbl;
778 HTMLElement_Init(&ret->element, doc, nselem, &HTMLTable_dispex);
780 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLTableElement, (void**)&ret->nstable);
782 /* Share the reference with nsnode */
783 assert(nsres == NS_OK && (nsIDOMNode*)ret->nstable == ret->element.node.nsnode);
784 nsIDOMNode_Release(ret->element.node.nsnode);
786 ConnectionPoint_Init(&ret->cp, &ret->element.cp_container, &DIID_HTMLTableEvents, NULL);
788 *elem = &ret->element;