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 nsIDOMHTMLCollection *nscol = NULL;
385 TRACE("(%p)->(%p)\n", This, p);
387 nsres = nsIDOMHTMLTableElement_GetTBodies(This->nstable, &nscol);
388 if(NS_FAILED(nsres)) {
389 ERR("GetTBodies failed: %08x\n", nsres);
393 *p = create_collection_from_htmlcol(This->element.node.doc, nscol);
395 nsIDOMHTMLCollection_Release(nscol);
399 static HRESULT WINAPI HTMLTable_get_caption(IHTMLTable *iface, IHTMLTableCaption **p)
401 HTMLTable *This = impl_from_IHTMLTable(iface);
402 FIXME("(%p)->(%p)\n", This, p);
406 static HRESULT WINAPI HTMLTable_createTHead(IHTMLTable *iface, IDispatch **head)
408 HTMLTable *This = impl_from_IHTMLTable(iface);
409 FIXME("(%p)->(%p)\n", This, head);
413 static HRESULT WINAPI HTMLTable_deleteTHead(IHTMLTable *iface)
415 HTMLTable *This = impl_from_IHTMLTable(iface);
416 FIXME("(%p)\n", This);
420 static HRESULT WINAPI HTMLTable_createTFoot(IHTMLTable *iface, IDispatch **foot)
422 HTMLTable *This = impl_from_IHTMLTable(iface);
423 FIXME("(%p)->(%p)\n", This, foot);
427 static HRESULT WINAPI HTMLTable_deleteTFoot(IHTMLTable *iface)
429 HTMLTable *This = impl_from_IHTMLTable(iface);
430 FIXME("(%p)\n", This);
434 static HRESULT WINAPI HTMLTable_createCaption(IHTMLTable *iface, IHTMLTableCaption **caption)
436 HTMLTable *This = impl_from_IHTMLTable(iface);
437 FIXME("(%p)->(%p)\n", This, caption);
441 static HRESULT WINAPI HTMLTable_deleteCaption(IHTMLTable *iface)
443 HTMLTable *This = impl_from_IHTMLTable(iface);
444 FIXME("(%p)\n", This);
448 static HRESULT WINAPI HTMLTable_insertRow(IHTMLTable *iface, LONG index, IDispatch **row)
450 HTMLTable *This = impl_from_IHTMLTable(iface);
451 FIXME("(%p)->(%d %p)\n", This, index, row);
455 static HRESULT WINAPI HTMLTable_deleteRow(IHTMLTable *iface, LONG index)
457 HTMLTable *This = impl_from_IHTMLTable(iface);
458 FIXME("(%p)->(%d)\n", This, index);
462 static HRESULT WINAPI HTMLTable_get_readyState(IHTMLTable *iface, BSTR *p)
464 HTMLTable *This = impl_from_IHTMLTable(iface);
465 FIXME("(%p)->(%p)\n", This, p);
469 static HRESULT WINAPI HTMLTable_put_onreadystatechange(IHTMLTable *iface, VARIANT v)
471 HTMLTable *This = impl_from_IHTMLTable(iface);
472 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
476 static HRESULT WINAPI HTMLTable_get_onreadystatechange(IHTMLTable *iface, VARIANT *p)
478 HTMLTable *This = impl_from_IHTMLTable(iface);
479 FIXME("(%p)->(%p)\n", This, p);
483 static const IHTMLTableVtbl HTMLTableVtbl = {
484 HTMLTable_QueryInterface,
487 HTMLTable_GetTypeInfoCount,
488 HTMLTable_GetTypeInfo,
489 HTMLTable_GetIDsOfNames,
493 HTMLTable_put_border,
494 HTMLTable_get_border,
499 HTMLTable_put_cellSpacing,
500 HTMLTable_get_cellSpacing,
501 HTMLTable_put_cellPadding,
502 HTMLTable_get_cellPadding,
503 HTMLTable_put_background,
504 HTMLTable_get_background,
505 HTMLTable_put_bgColor,
506 HTMLTable_get_bgColor,
507 HTMLTable_put_borderColor,
508 HTMLTable_get_borderColor,
509 HTMLTable_put_borderColorLight,
510 HTMLTable_get_borderColorLight,
511 HTMLTable_put_borderColorDark,
512 HTMLTable_get_borderColorDark,
519 HTMLTable_put_height,
520 HTMLTable_get_height,
521 HTMLTable_put_dataPageSize,
522 HTMLTable_get_dataPageSize,
524 HTMLTable_previousPage,
527 HTMLTable_get_tBodies,
528 HTMLTable_get_caption,
529 HTMLTable_createTHead,
530 HTMLTable_deleteTHead,
531 HTMLTable_createTFoot,
532 HTMLTable_deleteTFoot,
533 HTMLTable_createCaption,
534 HTMLTable_deleteCaption,
537 HTMLTable_get_readyState,
538 HTMLTable_put_onreadystatechange,
539 HTMLTable_get_onreadystatechange
543 static HRESULT WINAPI HTMLTable2_QueryInterface(IHTMLTable2 *iface,
544 REFIID riid, void **ppv)
546 HTMLTable *This = impl_from_IHTMLTable2(iface);
548 return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
551 static ULONG WINAPI HTMLTable2_AddRef(IHTMLTable2 *iface)
553 HTMLTable *This = impl_from_IHTMLTable2(iface);
555 return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
558 static ULONG WINAPI HTMLTable2_Release(IHTMLTable2 *iface)
560 HTMLTable *This = impl_from_IHTMLTable2(iface);
562 return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
565 static HRESULT WINAPI HTMLTable2_GetTypeInfoCount(IHTMLTable2 *iface, UINT *pctinfo)
567 HTMLTable *This = impl_from_IHTMLTable2(iface);
568 return IDispatchEx_GetTypeInfoCount(&This->element.node.dispex.IDispatchEx_iface, pctinfo);
571 static HRESULT WINAPI HTMLTable2_GetTypeInfo(IHTMLTable2 *iface, UINT iTInfo,
572 LCID lcid, ITypeInfo **ppTInfo)
574 HTMLTable *This = impl_from_IHTMLTable2(iface);
575 return IDispatchEx_GetTypeInfo(&This->element.node.dispex.IDispatchEx_iface, iTInfo, lcid,
579 static HRESULT WINAPI HTMLTable2_GetIDsOfNames(IHTMLTable2 *iface, REFIID riid,
580 LPOLESTR *rgszNames, UINT cNames,
581 LCID lcid, DISPID *rgDispId)
583 HTMLTable *This = impl_from_IHTMLTable2(iface);
584 return IDispatchEx_GetIDsOfNames(&This->element.node.dispex.IDispatchEx_iface, riid, rgszNames,
585 cNames, lcid, rgDispId);
588 static HRESULT WINAPI HTMLTable2_Invoke(IHTMLTable2 *iface, DISPID dispIdMember,
589 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
590 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
592 HTMLTable *This = impl_from_IHTMLTable2(iface);
593 return IDispatchEx_Invoke(&This->element.node.dispex.IDispatchEx_iface, dispIdMember, riid,
594 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
597 static HRESULT WINAPI HTMLTable2_firstPage(IHTMLTable2 *iface)
599 HTMLTable *This = impl_from_IHTMLTable2(iface);
600 FIXME("(%p)->()\n", This);
604 static HRESULT WINAPI HTMLTable2_lastPage(IHTMLTable2 *iface)
606 HTMLTable *This = impl_from_IHTMLTable2(iface);
607 FIXME("(%p)->()\n", This);
611 static HRESULT WINAPI HTMLTable2_cells(IHTMLTable2 *iface, IHTMLElementCollection **p)
613 HTMLTable *This = impl_from_IHTMLTable2(iface);
614 FIXME("(%p)->(%p)\n", This, p);
618 static HRESULT WINAPI HTMLTable2_moveRow(IHTMLTable2 *iface, LONG indexFrom, LONG indexTo, IDispatch **row)
620 HTMLTable *This = impl_from_IHTMLTable2(iface);
621 FIXME("(%p)->(%d %d %p)\n", This, indexFrom, indexTo, row);
626 static const IHTMLTable2Vtbl HTMLTable2Vtbl = {
627 HTMLTable2_QueryInterface,
630 HTMLTable2_GetTypeInfoCount,
631 HTMLTable2_GetTypeInfo,
632 HTMLTable2_GetIDsOfNames,
634 HTMLTable2_firstPage,
641 static HRESULT WINAPI HTMLTable3_QueryInterface(IHTMLTable3 *iface,
642 REFIID riid, void **ppv)
644 HTMLTable *This = impl_from_IHTMLTable3(iface);
646 return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
649 static ULONG WINAPI HTMLTable3_AddRef(IHTMLTable3 *iface)
651 HTMLTable *This = impl_from_IHTMLTable3(iface);
653 return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
656 static ULONG WINAPI HTMLTable3_Release(IHTMLTable3 *iface)
658 HTMLTable *This = impl_from_IHTMLTable3(iface);
660 return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
663 static HRESULT WINAPI HTMLTable3_GetTypeInfoCount(IHTMLTable3 *iface, UINT *pctinfo)
665 HTMLTable *This = impl_from_IHTMLTable3(iface);
666 return IDispatchEx_GetTypeInfoCount(&This->element.node.dispex.IDispatchEx_iface, pctinfo);
669 static HRESULT WINAPI HTMLTable3_GetTypeInfo(IHTMLTable3 *iface, UINT iTInfo,
670 LCID lcid, ITypeInfo **ppTInfo)
672 HTMLTable *This = impl_from_IHTMLTable3(iface);
673 return IDispatchEx_GetTypeInfo(&This->element.node.dispex.IDispatchEx_iface, iTInfo, lcid,
677 static HRESULT WINAPI HTMLTable3_GetIDsOfNames(IHTMLTable3 *iface, REFIID riid,
678 LPOLESTR *rgszNames, UINT cNames,
679 LCID lcid, DISPID *rgDispId)
681 HTMLTable *This = impl_from_IHTMLTable3(iface);
682 return IDispatchEx_GetIDsOfNames(&This->element.node.dispex.IDispatchEx_iface, riid, rgszNames,
683 cNames, lcid, rgDispId);
686 static HRESULT WINAPI HTMLTable3_Invoke(IHTMLTable3 *iface, DISPID dispIdMember,
687 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
688 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
690 HTMLTable *This = impl_from_IHTMLTable3(iface);
691 return IDispatchEx_Invoke(&This->element.node.dispex.IDispatchEx_iface, dispIdMember, riid,
692 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
695 static HRESULT WINAPI HTMLTable3_put_summary(IHTMLTable3 *iface, BSTR v)
697 HTMLTable *This = impl_from_IHTMLTable3(iface);
698 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
702 static HRESULT WINAPI HTMLTable3_get_summary(IHTMLTable3 *iface, BSTR * p)
704 HTMLTable *This = impl_from_IHTMLTable3(iface);
705 FIXME("(%p)->(%p)\n", This, p);
709 static const IHTMLTable3Vtbl HTMLTable3Vtbl = {
710 HTMLTable3_QueryInterface,
713 HTMLTable3_GetTypeInfoCount,
714 HTMLTable3_GetTypeInfo,
715 HTMLTable3_GetIDsOfNames,
717 HTMLTable3_put_summary,
718 HTMLTable3_get_summary
721 static inline HTMLTable *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
723 return CONTAINING_RECORD(iface, HTMLTable, element.node);
726 static HRESULT HTMLTable_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
728 HTMLTable *This = impl_from_HTMLDOMNode(iface);
732 if(IsEqualGUID(&IID_IUnknown, riid)) {
733 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
734 *ppv = &This->IHTMLTable_iface;
735 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
736 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
737 *ppv = &This->IHTMLTable_iface;
738 }else if(IsEqualGUID(&IID_IHTMLTable, riid)) {
739 TRACE("(%p)->(IID_IHTMLTable %p)\n", This, ppv);
740 *ppv = &This->IHTMLTable_iface;
741 }else if(IsEqualGUID(&IID_IHTMLTable2, riid)) {
742 TRACE("(%p)->(IID_IHTMLTable2 %p)\n", This, ppv);
743 *ppv = &This->IHTMLTable_iface;
744 }else if(IsEqualGUID(&IID_IHTMLTable3, riid)) {
745 TRACE("(%p)->(IID_IHTMLTable3 %p)\n", This, ppv);
746 *ppv = &This->IHTMLTable_iface;
750 IUnknown_AddRef((IUnknown*)*ppv);
754 return HTMLElement_QI(&This->element.node, riid, ppv);
757 static const cpc_entry_t HTMLTable_cpc[] = {
758 {&DIID_HTMLTableEvents},
763 static const NodeImplVtbl HTMLTableImplVtbl = {
765 HTMLElement_destructor,
768 HTMLElement_handle_event,
769 HTMLElement_get_attr_col
772 static const tid_t HTMLTable_iface_tids[] = {
778 static dispex_static_data_t HTMLTable_dispex = {
785 HRESULT HTMLTable_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
790 ret = heap_alloc_zero(sizeof(HTMLTable));
792 return E_OUTOFMEMORY;
794 ret->element.node.vtbl = &HTMLTableImplVtbl;
795 ret->IHTMLTable_iface.lpVtbl = &HTMLTableVtbl;
797 HTMLElement_Init(&ret->element, doc, nselem, &HTMLTable_dispex);
799 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLTableElement, (void**)&ret->nstable);
801 /* Share the reference with nsnode */
802 assert(nsres == NS_OK && (nsIDOMNode*)ret->nstable == ret->element.node.nsnode);
803 nsIDOMNode_Release(ret->element.node.nsnode);
805 *elem = &ret->element;