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;
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)->(%s)\n", This, debugstr_variant(&v));
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)->(%s)\n", This, debugstr_variant(&v));
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)->(%s)\n", This, debugstr_variant(&v));
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)->(%s)\n", This, debugstr_variant(&v));
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)->(%s)\n", This, debugstr_variant(&v));
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)->(%s)\n", This, debugstr_variant(&v));
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)->(%s)\n", This, debugstr_variant(&v));
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, nscol);
305 nsIDOMHTMLCollection_Release(nscol);
309 static HRESULT WINAPI HTMLTable_put_width(IHTMLTable *iface, VARIANT v)
311 HTMLTable *This = impl_from_IHTMLTable(iface);
312 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
316 static HRESULT WINAPI HTMLTable_get_width(IHTMLTable *iface, VARIANT *p)
318 HTMLTable *This = impl_from_IHTMLTable(iface);
319 FIXME("(%p)->(%p)\n", This, p);
323 static HRESULT WINAPI HTMLTable_put_height(IHTMLTable *iface, VARIANT v)
325 HTMLTable *This = impl_from_IHTMLTable(iface);
326 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
330 static HRESULT WINAPI HTMLTable_get_height(IHTMLTable *iface, VARIANT *p)
332 HTMLTable *This = impl_from_IHTMLTable(iface);
333 FIXME("(%p)->(%p)\n", This, p);
337 static HRESULT WINAPI HTMLTable_put_dataPageSize(IHTMLTable *iface, LONG v)
339 HTMLTable *This = impl_from_IHTMLTable(iface);
340 FIXME("(%p)->(%d)\n", This, v);
344 static HRESULT WINAPI HTMLTable_get_dataPageSize(IHTMLTable *iface, LONG *p)
346 HTMLTable *This = impl_from_IHTMLTable(iface);
347 FIXME("(%p)->(%p)\n", This, p);
351 static HRESULT WINAPI HTMLTable_nextPage(IHTMLTable *iface)
353 HTMLTable *This = impl_from_IHTMLTable(iface);
354 FIXME("(%p)\n", This);
358 static HRESULT WINAPI HTMLTable_previousPage(IHTMLTable *iface)
360 HTMLTable *This = impl_from_IHTMLTable(iface);
361 FIXME("(%p)\n", This);
365 static HRESULT WINAPI HTMLTable_get_tHead(IHTMLTable *iface, IHTMLTableSection **p)
367 HTMLTable *This = impl_from_IHTMLTable(iface);
368 FIXME("(%p)->(%p)\n", This, p);
372 static HRESULT WINAPI HTMLTable_get_tFoot(IHTMLTable *iface, IHTMLTableSection **p)
374 HTMLTable *This = impl_from_IHTMLTable(iface);
375 FIXME("(%p)->(%p)\n", This, p);
379 static HRESULT WINAPI HTMLTable_get_tBodies(IHTMLTable *iface, IHTMLElementCollection **p)
381 HTMLTable *This = impl_from_IHTMLTable(iface);
382 FIXME("(%p)->(%p)\n", This, p);
386 static HRESULT WINAPI HTMLTable_get_caption(IHTMLTable *iface, IHTMLTableCaption **p)
388 HTMLTable *This = impl_from_IHTMLTable(iface);
389 FIXME("(%p)->(%p)\n", This, p);
393 static HRESULT WINAPI HTMLTable_createTHead(IHTMLTable *iface, IDispatch **head)
395 HTMLTable *This = impl_from_IHTMLTable(iface);
396 FIXME("(%p)->(%p)\n", This, head);
400 static HRESULT WINAPI HTMLTable_deleteTHead(IHTMLTable *iface)
402 HTMLTable *This = impl_from_IHTMLTable(iface);
403 FIXME("(%p)\n", This);
407 static HRESULT WINAPI HTMLTable_createTFoot(IHTMLTable *iface, IDispatch **foot)
409 HTMLTable *This = impl_from_IHTMLTable(iface);
410 FIXME("(%p)->(%p)\n", This, foot);
414 static HRESULT WINAPI HTMLTable_deleteTFoot(IHTMLTable *iface)
416 HTMLTable *This = impl_from_IHTMLTable(iface);
417 FIXME("(%p)\n", This);
421 static HRESULT WINAPI HTMLTable_createCaption(IHTMLTable *iface, IHTMLTableCaption **caption)
423 HTMLTable *This = impl_from_IHTMLTable(iface);
424 FIXME("(%p)->(%p)\n", This, caption);
428 static HRESULT WINAPI HTMLTable_deleteCaption(IHTMLTable *iface)
430 HTMLTable *This = impl_from_IHTMLTable(iface);
431 FIXME("(%p)\n", This);
435 static HRESULT WINAPI HTMLTable_insertRow(IHTMLTable *iface, LONG index, IDispatch **row)
437 HTMLTable *This = impl_from_IHTMLTable(iface);
438 FIXME("(%p)->(%d %p)\n", This, index, row);
442 static HRESULT WINAPI HTMLTable_deleteRow(IHTMLTable *iface, LONG index)
444 HTMLTable *This = impl_from_IHTMLTable(iface);
445 FIXME("(%p)->(%d)\n", This, index);
449 static HRESULT WINAPI HTMLTable_get_readyState(IHTMLTable *iface, BSTR *p)
451 HTMLTable *This = impl_from_IHTMLTable(iface);
452 FIXME("(%p)->(%p)\n", This, p);
456 static HRESULT WINAPI HTMLTable_put_onreadystatechange(IHTMLTable *iface, VARIANT v)
458 HTMLTable *This = impl_from_IHTMLTable(iface);
459 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
463 static HRESULT WINAPI HTMLTable_get_onreadystatechange(IHTMLTable *iface, VARIANT *p)
465 HTMLTable *This = impl_from_IHTMLTable(iface);
466 FIXME("(%p)->(%p)\n", This, p);
470 static const IHTMLTableVtbl HTMLTableVtbl = {
471 HTMLTable_QueryInterface,
474 HTMLTable_GetTypeInfoCount,
475 HTMLTable_GetTypeInfo,
476 HTMLTable_GetIDsOfNames,
480 HTMLTable_put_border,
481 HTMLTable_get_border,
486 HTMLTable_put_cellSpacing,
487 HTMLTable_get_cellSpacing,
488 HTMLTable_put_cellPadding,
489 HTMLTable_get_cellPadding,
490 HTMLTable_put_background,
491 HTMLTable_get_background,
492 HTMLTable_put_bgColor,
493 HTMLTable_get_bgColor,
494 HTMLTable_put_borderColor,
495 HTMLTable_get_borderColor,
496 HTMLTable_put_borderColorLight,
497 HTMLTable_get_borderColorLight,
498 HTMLTable_put_borderColorDark,
499 HTMLTable_get_borderColorDark,
506 HTMLTable_put_height,
507 HTMLTable_get_height,
508 HTMLTable_put_dataPageSize,
509 HTMLTable_get_dataPageSize,
511 HTMLTable_previousPage,
514 HTMLTable_get_tBodies,
515 HTMLTable_get_caption,
516 HTMLTable_createTHead,
517 HTMLTable_deleteTHead,
518 HTMLTable_createTFoot,
519 HTMLTable_deleteTFoot,
520 HTMLTable_createCaption,
521 HTMLTable_deleteCaption,
524 HTMLTable_get_readyState,
525 HTMLTable_put_onreadystatechange,
526 HTMLTable_get_onreadystatechange
530 static HRESULT WINAPI HTMLTable2_QueryInterface(IHTMLTable2 *iface,
531 REFIID riid, void **ppv)
533 HTMLTable *This = impl_from_IHTMLTable2(iface);
535 return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
538 static ULONG WINAPI HTMLTable2_AddRef(IHTMLTable2 *iface)
540 HTMLTable *This = impl_from_IHTMLTable2(iface);
542 return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
545 static ULONG WINAPI HTMLTable2_Release(IHTMLTable2 *iface)
547 HTMLTable *This = impl_from_IHTMLTable2(iface);
549 return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
552 static HRESULT WINAPI HTMLTable2_GetTypeInfoCount(IHTMLTable2 *iface, UINT *pctinfo)
554 HTMLTable *This = impl_from_IHTMLTable2(iface);
555 return IDispatchEx_GetTypeInfoCount(&This->element.node.dispex.IDispatchEx_iface, pctinfo);
558 static HRESULT WINAPI HTMLTable2_GetTypeInfo(IHTMLTable2 *iface, UINT iTInfo,
559 LCID lcid, ITypeInfo **ppTInfo)
561 HTMLTable *This = impl_from_IHTMLTable2(iface);
562 return IDispatchEx_GetTypeInfo(&This->element.node.dispex.IDispatchEx_iface, iTInfo, lcid,
566 static HRESULT WINAPI HTMLTable2_GetIDsOfNames(IHTMLTable2 *iface, REFIID riid,
567 LPOLESTR *rgszNames, UINT cNames,
568 LCID lcid, DISPID *rgDispId)
570 HTMLTable *This = impl_from_IHTMLTable2(iface);
571 return IDispatchEx_GetIDsOfNames(&This->element.node.dispex.IDispatchEx_iface, riid, rgszNames,
572 cNames, lcid, rgDispId);
575 static HRESULT WINAPI HTMLTable2_Invoke(IHTMLTable2 *iface, DISPID dispIdMember,
576 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
577 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
579 HTMLTable *This = impl_from_IHTMLTable2(iface);
580 return IDispatchEx_Invoke(&This->element.node.dispex.IDispatchEx_iface, dispIdMember, riid,
581 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
584 static HRESULT WINAPI HTMLTable2_firstPage(IHTMLTable2 *iface)
586 HTMLTable *This = impl_from_IHTMLTable2(iface);
587 FIXME("(%p)->()\n", This);
591 static HRESULT WINAPI HTMLTable2_lastPage(IHTMLTable2 *iface)
593 HTMLTable *This = impl_from_IHTMLTable2(iface);
594 FIXME("(%p)->()\n", This);
598 static HRESULT WINAPI HTMLTable2_cells(IHTMLTable2 *iface, IHTMLElementCollection **p)
600 HTMLTable *This = impl_from_IHTMLTable2(iface);
601 FIXME("(%p)->(%p)\n", This, p);
605 static HRESULT WINAPI HTMLTable2_moveRow(IHTMLTable2 *iface, LONG indexFrom, LONG indexTo, IDispatch **row)
607 HTMLTable *This = impl_from_IHTMLTable2(iface);
608 FIXME("(%p)->(%d %d %p)\n", This, indexFrom, indexTo, row);
613 static const IHTMLTable2Vtbl HTMLTable2Vtbl = {
614 HTMLTable2_QueryInterface,
617 HTMLTable2_GetTypeInfoCount,
618 HTMLTable2_GetTypeInfo,
619 HTMLTable2_GetIDsOfNames,
621 HTMLTable2_firstPage,
628 static HRESULT WINAPI HTMLTable3_QueryInterface(IHTMLTable3 *iface,
629 REFIID riid, void **ppv)
631 HTMLTable *This = impl_from_IHTMLTable3(iface);
633 return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
636 static ULONG WINAPI HTMLTable3_AddRef(IHTMLTable3 *iface)
638 HTMLTable *This = impl_from_IHTMLTable3(iface);
640 return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
643 static ULONG WINAPI HTMLTable3_Release(IHTMLTable3 *iface)
645 HTMLTable *This = impl_from_IHTMLTable3(iface);
647 return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
650 static HRESULT WINAPI HTMLTable3_GetTypeInfoCount(IHTMLTable3 *iface, UINT *pctinfo)
652 HTMLTable *This = impl_from_IHTMLTable3(iface);
653 return IDispatchEx_GetTypeInfoCount(&This->element.node.dispex.IDispatchEx_iface, pctinfo);
656 static HRESULT WINAPI HTMLTable3_GetTypeInfo(IHTMLTable3 *iface, UINT iTInfo,
657 LCID lcid, ITypeInfo **ppTInfo)
659 HTMLTable *This = impl_from_IHTMLTable3(iface);
660 return IDispatchEx_GetTypeInfo(&This->element.node.dispex.IDispatchEx_iface, iTInfo, lcid,
664 static HRESULT WINAPI HTMLTable3_GetIDsOfNames(IHTMLTable3 *iface, REFIID riid,
665 LPOLESTR *rgszNames, UINT cNames,
666 LCID lcid, DISPID *rgDispId)
668 HTMLTable *This = impl_from_IHTMLTable3(iface);
669 return IDispatchEx_GetIDsOfNames(&This->element.node.dispex.IDispatchEx_iface, riid, rgszNames,
670 cNames, lcid, rgDispId);
673 static HRESULT WINAPI HTMLTable3_Invoke(IHTMLTable3 *iface, DISPID dispIdMember,
674 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
675 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
677 HTMLTable *This = impl_from_IHTMLTable3(iface);
678 return IDispatchEx_Invoke(&This->element.node.dispex.IDispatchEx_iface, dispIdMember, riid,
679 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
682 static HRESULT WINAPI HTMLTable3_put_summary(IHTMLTable3 *iface, BSTR v)
684 HTMLTable *This = impl_from_IHTMLTable3(iface);
685 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
689 static HRESULT WINAPI HTMLTable3_get_summary(IHTMLTable3 *iface, BSTR * p)
691 HTMLTable *This = impl_from_IHTMLTable3(iface);
692 FIXME("(%p)->(%p)\n", This, p);
696 static const IHTMLTable3Vtbl HTMLTable3Vtbl = {
697 HTMLTable3_QueryInterface,
700 HTMLTable3_GetTypeInfoCount,
701 HTMLTable3_GetTypeInfo,
702 HTMLTable3_GetIDsOfNames,
704 HTMLTable3_put_summary,
705 HTMLTable3_get_summary
708 static inline HTMLTable *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
710 return CONTAINING_RECORD(iface, HTMLTable, element.node);
713 static HRESULT HTMLTable_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
715 HTMLTable *This = impl_from_HTMLDOMNode(iface);
719 if(IsEqualGUID(&IID_IUnknown, riid)) {
720 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
721 *ppv = &This->IHTMLTable_iface;
722 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
723 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
724 *ppv = &This->IHTMLTable_iface;
725 }else if(IsEqualGUID(&IID_IHTMLTable, riid)) {
726 TRACE("(%p)->(IID_IHTMLTable %p)\n", This, ppv);
727 *ppv = &This->IHTMLTable_iface;
728 }else if(IsEqualGUID(&IID_IHTMLTable2, riid)) {
729 TRACE("(%p)->(IID_IHTMLTable2 %p)\n", This, ppv);
730 *ppv = &This->IHTMLTable_iface;
731 }else if(IsEqualGUID(&IID_IHTMLTable3, riid)) {
732 TRACE("(%p)->(IID_IHTMLTable3 %p)\n", This, ppv);
733 *ppv = &This->IHTMLTable_iface;
737 IUnknown_AddRef((IUnknown*)*ppv);
741 return HTMLElement_QI(&This->element.node, riid, ppv);
744 static const cpc_entry_t HTMLTable_cpc[] = {
745 {&DIID_HTMLTableEvents},
750 static const NodeImplVtbl HTMLTableImplVtbl = {
752 HTMLElement_destructor,
755 HTMLElement_handle_event,
756 HTMLElement_get_attr_col
759 static const tid_t HTMLTable_iface_tids[] = {
765 static dispex_static_data_t HTMLTable_dispex = {
772 HRESULT HTMLTable_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
777 ret = heap_alloc_zero(sizeof(HTMLTable));
779 return E_OUTOFMEMORY;
781 ret->element.node.vtbl = &HTMLTableImplVtbl;
782 ret->IHTMLTable_iface.lpVtbl = &HTMLTableVtbl;
784 HTMLElement_Init(&ret->element, doc, nselem, &HTMLTable_dispex);
786 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLTableElement, (void**)&ret->nstable);
788 /* Share the reference with nsnode */
789 assert(nsres == NS_OK && (nsIDOMNode*)ret->nstable == ret->element.node.nsnode);
790 nsIDOMNode_Release(ret->element.node.nsnode);
792 *elem = &ret->element;