2 * Copyright 2007,2008,2012 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
);
35 struct HTMLTableCell
{
38 IHTMLTableCell IHTMLTableCell_iface
;
40 nsIDOMHTMLTableCellElement
*nscell
;
43 static inline HTMLTableCell
*impl_from_IHTMLTableCell(IHTMLTableCell
*iface
)
45 return CONTAINING_RECORD(iface
, HTMLTableCell
, IHTMLTableCell_iface
);
48 static HRESULT WINAPI
HTMLTableCell_QueryInterface(IHTMLTableCell
*iface
, REFIID riid
, void **ppv
)
50 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
52 return IHTMLDOMNode_QueryInterface(&This
->element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
55 static ULONG WINAPI
HTMLTableCell_AddRef(IHTMLTableCell
*iface
)
57 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
59 return IHTMLDOMNode_AddRef(&This
->element
.node
.IHTMLDOMNode_iface
);
62 static ULONG WINAPI
HTMLTableCell_Release(IHTMLTableCell
*iface
)
64 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
66 return IHTMLDOMNode_Release(&This
->element
.node
.IHTMLDOMNode_iface
);
69 static HRESULT WINAPI
HTMLTableCell_GetTypeInfoCount(IHTMLTableCell
*iface
, UINT
*pctinfo
)
71 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
72 return IDispatchEx_GetTypeInfoCount(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
75 static HRESULT WINAPI
HTMLTableCell_GetTypeInfo(IHTMLTableCell
*iface
, UINT iTInfo
,
76 LCID lcid
, ITypeInfo
**ppTInfo
)
78 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
79 return IDispatchEx_GetTypeInfo(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
83 static HRESULT WINAPI
HTMLTableCell_GetIDsOfNames(IHTMLTableCell
*iface
, REFIID riid
,
84 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
86 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
87 return IDispatchEx_GetIDsOfNames(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
88 cNames
, lcid
, rgDispId
);
91 static HRESULT WINAPI
HTMLTableCell_Invoke(IHTMLTableCell
*iface
, DISPID dispIdMember
, REFIID riid
,
92 LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
, VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
,
95 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
96 return IDispatchEx_Invoke(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
97 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
100 static HRESULT WINAPI
HTMLTableCell_put_rowSpan(IHTMLTableCell
*iface
, LONG v
)
102 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
105 TRACE("(%p)->(%d)\n", This
, v
);
110 nsres
= nsIDOMHTMLTableCellElement_SetRowSpan(This
->nscell
, v
);
111 if(NS_FAILED(nsres
)) {
112 ERR("SetRowSpan failed: %08x\n", nsres
);
119 static HRESULT WINAPI
HTMLTableCell_get_rowSpan(IHTMLTableCell
*iface
, LONG
*p
)
121 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
124 TRACE("(%p)->(%p)\n", This
, p
);
126 nsres
= nsIDOMHTMLTableCellElement_GetRowSpan(This
->nscell
, p
);
127 if(NS_FAILED(nsres
)) {
128 ERR("GetRowSpan failed: %08x\n", nsres
);
135 static HRESULT WINAPI
HTMLTableCell_put_colSpan(IHTMLTableCell
*iface
, LONG v
)
137 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
140 TRACE("(%p)->(%d)\n", This
, v
);
145 nsres
= nsIDOMHTMLTableCellElement_SetColSpan(This
->nscell
, v
);
146 if(NS_FAILED(nsres
)) {
147 ERR("SetColSpan failed: %08x\n", nsres
);
154 static HRESULT WINAPI
HTMLTableCell_get_colSpan(IHTMLTableCell
*iface
, LONG
*p
)
156 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
159 TRACE("(%p)->(%p)\n", This
, p
);
161 nsres
= nsIDOMHTMLTableCellElement_GetColSpan(This
->nscell
, p
);
162 if(NS_FAILED(nsres
)) {
163 ERR("GetColSpan failed: %08x\n", nsres
);
170 static HRESULT WINAPI
HTMLTableCell_put_align(IHTMLTableCell
*iface
, BSTR v
)
172 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
176 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
178 nsAString_InitDepend(&str
, v
);
179 nsres
= nsIDOMHTMLTableCellElement_SetAlign(This
->nscell
, &str
);
180 nsAString_Finish(&str
);
181 if (NS_FAILED(nsres
)) {
182 ERR("Set Align failed: %08x\n", nsres
);
188 static HRESULT WINAPI
HTMLTableCell_get_align(IHTMLTableCell
*iface
, BSTR
*p
)
190 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
194 TRACE("(%p)->(%p)\n", This
, p
);
196 nsAString_Init(&str
, NULL
);
197 nsres
= nsIDOMHTMLTableCellElement_GetAlign(This
->nscell
, &str
);
199 return return_nsstr(nsres
, &str
, p
);
202 static HRESULT WINAPI
HTMLTableCell_put_vAlign(IHTMLTableCell
*iface
, BSTR v
)
204 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
205 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
209 static HRESULT WINAPI
HTMLTableCell_get_vAlign(IHTMLTableCell
*iface
, BSTR
*p
)
211 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
212 FIXME("(%p)->(%p)\n", This
, p
);
216 static HRESULT WINAPI
HTMLTableCell_put_bgColor(IHTMLTableCell
*iface
, VARIANT v
)
218 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
222 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
224 if(!variant_to_nscolor(&v
, &strColor
))
227 nsres
= nsIDOMHTMLTableCellElement_SetBgColor(This
->nscell
, &strColor
);
228 nsAString_Finish(&strColor
);
229 if(NS_FAILED(nsres
)) {
230 ERR("SetBgColor(%s) failed: %08x\n", debugstr_variant(&v
), nsres
);
237 static HRESULT WINAPI
HTMLTableCell_get_bgColor(IHTMLTableCell
*iface
, VARIANT
*p
)
239 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
244 TRACE("(%p)->(%p)\n", This
, p
);
246 nsAString_Init(&strColor
, NULL
);
247 nsres
= nsIDOMHTMLTableCellElement_GetBgColor(This
->nscell
, &strColor
);
249 if(NS_SUCCEEDED(nsres
)) {
250 const PRUnichar
*color
;
251 nsAString_GetData(&strColor
, &color
);
253 hres
= nscolor_to_str(color
, &V_BSTR(p
));
255 ERR("GetBgColor failed: %08x\n", nsres
);
258 nsAString_Finish(&strColor
);
262 static HRESULT WINAPI
HTMLTableCell_put_noWrap(IHTMLTableCell
*iface
, VARIANT_BOOL v
)
264 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
265 FIXME("(%p)->(%x)\n", This
, v
);
269 static HRESULT WINAPI
HTMLTableCell_get_noWrap(IHTMLTableCell
*iface
, VARIANT_BOOL
*p
)
271 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
272 FIXME("(%p)->(%p)\n", This
, p
);
276 static HRESULT WINAPI
HTMLTableCell_put_background(IHTMLTableCell
*iface
, BSTR v
)
278 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
279 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
283 static HRESULT WINAPI
HTMLTableCell_get_background(IHTMLTableCell
*iface
, BSTR
*p
)
285 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
286 FIXME("(%p)->(%p)\n", This
, p
);
290 static HRESULT WINAPI
HTMLTableCell_put_borderColor(IHTMLTableCell
*iface
, VARIANT v
)
292 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
293 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
297 static HRESULT WINAPI
HTMLTableCell_get_borderColor(IHTMLTableCell
*iface
, VARIANT
*p
)
299 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
300 FIXME("(%p)->(%p)\n", This
, p
);
304 static HRESULT WINAPI
HTMLTableCell_put_borderColorLight(IHTMLTableCell
*iface
, VARIANT v
)
306 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
307 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
311 static HRESULT WINAPI
HTMLTableCell_get_borderColorLight(IHTMLTableCell
*iface
, VARIANT
*p
)
313 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
314 FIXME("(%p)->(%p)\n", This
, p
);
318 static HRESULT WINAPI
HTMLTableCell_put_borderColorDark(IHTMLTableCell
*iface
, VARIANT v
)
320 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
321 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
325 static HRESULT WINAPI
HTMLTableCell_get_borderColorDark(IHTMLTableCell
*iface
, VARIANT
*p
)
327 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
328 FIXME("(%p)->(%p)\n", This
, p
);
332 static HRESULT WINAPI
HTMLTableCell_put_width(IHTMLTableCell
*iface
, VARIANT v
)
334 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
339 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
341 hres
= variant_to_nsstr(&v
, FALSE
, &nsstr
);
345 nsres
= nsIDOMHTMLTableCellElement_SetWidth(This
->nscell
, &nsstr
);
346 nsAString_Finish(&nsstr
);
347 return map_nsresult(nsres
);
350 static HRESULT WINAPI
HTMLTableCell_get_width(IHTMLTableCell
*iface
, VARIANT
*p
)
352 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
356 TRACE("(%p)->(%p)\n", This
, p
);
358 nsAString_Init(&nsstr
, NULL
);
359 nsres
= nsIDOMHTMLTableCellElement_GetWidth(This
->nscell
, &nsstr
);
360 return return_nsstr_variant(nsres
, &nsstr
, NSSTR_IMPLICIT_PX
, p
);
363 static HRESULT WINAPI
HTMLTableCell_put_height(IHTMLTableCell
*iface
, VARIANT v
)
365 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
370 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
372 hres
= variant_to_nsstr(&v
, FALSE
, &nsstr
);
376 nsres
= nsIDOMHTMLTableCellElement_SetHeight(This
->nscell
, &nsstr
);
377 nsAString_Finish(&nsstr
);
378 return map_nsresult(nsres
);
381 static HRESULT WINAPI
HTMLTableCell_get_height(IHTMLTableCell
*iface
, VARIANT
*p
)
383 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
387 TRACE("(%p)->(%p)\n", This
, p
);
389 nsAString_Init(&nsstr
, NULL
);
390 nsres
= nsIDOMHTMLTableCellElement_GetHeight(This
->nscell
, &nsstr
);
391 return return_nsstr_variant(nsres
, &nsstr
, NSSTR_IMPLICIT_PX
, p
);
394 static HRESULT WINAPI
HTMLTableCell_get_cellIndex(IHTMLTableCell
*iface
, LONG
*p
)
396 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
399 TRACE("(%p)->(%p)\n", This
, p
);
400 nsres
= nsIDOMHTMLTableCellElement_GetCellIndex(This
->nscell
, p
);
401 if (NS_FAILED(nsres
)) {
402 ERR("Get CellIndex failed: %08x\n", nsres
);
409 static const IHTMLTableCellVtbl HTMLTableCellVtbl
= {
410 HTMLTableCell_QueryInterface
,
411 HTMLTableCell_AddRef
,
412 HTMLTableCell_Release
,
413 HTMLTableCell_GetTypeInfoCount
,
414 HTMLTableCell_GetTypeInfo
,
415 HTMLTableCell_GetIDsOfNames
,
416 HTMLTableCell_Invoke
,
417 HTMLTableCell_put_rowSpan
,
418 HTMLTableCell_get_rowSpan
,
419 HTMLTableCell_put_colSpan
,
420 HTMLTableCell_get_colSpan
,
421 HTMLTableCell_put_align
,
422 HTMLTableCell_get_align
,
423 HTMLTableCell_put_vAlign
,
424 HTMLTableCell_get_vAlign
,
425 HTMLTableCell_put_bgColor
,
426 HTMLTableCell_get_bgColor
,
427 HTMLTableCell_put_noWrap
,
428 HTMLTableCell_get_noWrap
,
429 HTMLTableCell_put_background
,
430 HTMLTableCell_get_background
,
431 HTMLTableCell_put_borderColor
,
432 HTMLTableCell_get_borderColor
,
433 HTMLTableCell_put_borderColorLight
,
434 HTMLTableCell_get_borderColorLight
,
435 HTMLTableCell_put_borderColorDark
,
436 HTMLTableCell_get_borderColorDark
,
437 HTMLTableCell_put_width
,
438 HTMLTableCell_get_width
,
439 HTMLTableCell_put_height
,
440 HTMLTableCell_get_height
,
441 HTMLTableCell_get_cellIndex
444 static inline HTMLTableCell
*HTMLTableCell_from_HTMLDOMNode(HTMLDOMNode
*iface
)
446 return CONTAINING_RECORD(iface
, HTMLTableCell
, element
.node
);
449 static HRESULT
HTMLTableCell_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
451 HTMLTableCell
*This
= HTMLTableCell_from_HTMLDOMNode(iface
);
453 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
454 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
455 *ppv
= &This
->IHTMLTableCell_iface
;
456 }else if(IsEqualGUID(&IID_IDispatch
, riid
)) {
457 TRACE("(%p)->(IID_IDispatch %p)\n", This
, ppv
);
458 *ppv
= &This
->IHTMLTableCell_iface
;
459 }else if(IsEqualGUID(&IID_IHTMLTableCell
, riid
)) {
460 TRACE("(%p)->(IID_IHTMLTableCell %p)\n", This
, ppv
);
461 *ppv
= &This
->IHTMLTableCell_iface
;
463 return HTMLElement_QI(&This
->element
.node
, riid
, ppv
);
466 IUnknown_AddRef((IUnknown
*)*ppv
);
470 static void HTMLTableCell_destructor(HTMLDOMNode
*iface
)
472 HTMLTableCell
*This
= HTMLTableCell_from_HTMLDOMNode(iface
);
474 HTMLElement_destructor(&This
->element
.node
);
477 static void HTMLTableCell_traverse(HTMLDOMNode
*iface
, nsCycleCollectionTraversalCallback
*cb
)
479 HTMLTableCell
*This
= HTMLTableCell_from_HTMLDOMNode(iface
);
482 note_cc_edge((nsISupports
*)This
->nscell
, "This->nstablecell", cb
);
485 static void HTMLTableCell_unlink(HTMLDOMNode
*iface
)
487 HTMLTableCell
*This
= HTMLTableCell_from_HTMLDOMNode(iface
);
490 nsIDOMHTMLTableCellElement
*nscell
= This
->nscell
;
493 nsIDOMHTMLTableCellElement_Release(nscell
);
497 static const NodeImplVtbl HTMLTableCellImplVtbl
= {
498 &CLSID_HTMLTableCell
,
500 HTMLTableCell_destructor
,
503 HTMLElement_handle_event
,
504 HTMLElement_get_attr_col
,
513 HTMLTableCell_traverse
,
517 static const tid_t HTMLTableCell_iface_tids
[] = {
523 static dispex_static_data_t HTMLTableCell_dispex
= {
525 DispHTMLTableCell_tid
,
526 HTMLTableCell_iface_tids
,
527 HTMLElement_init_dispex_info
530 HRESULT
HTMLTableCell_Create(HTMLDocumentNode
*doc
, nsIDOMElement
*nselem
, HTMLElement
**elem
)
535 ret
= heap_alloc_zero(sizeof(*ret
));
537 return E_OUTOFMEMORY
;
539 ret
->IHTMLTableCell_iface
.lpVtbl
= &HTMLTableCellVtbl
;
540 ret
->element
.node
.vtbl
= &HTMLTableCellImplVtbl
;
542 HTMLElement_Init(&ret
->element
, doc
, nselem
, &HTMLTableCell_dispex
);
544 nsres
= nsIDOMElement_QueryInterface(nselem
, &IID_nsIDOMHTMLTableCellElement
, (void**)&ret
->nscell
);
545 assert(nsres
== NS_OK
);
547 *elem
= &ret
->element
;
551 struct HTMLTableRow
{
554 IHTMLTableRow IHTMLTableRow_iface
;
556 nsIDOMHTMLTableRowElement
*nsrow
;
559 static inline HTMLTableRow
*impl_from_IHTMLTableRow(IHTMLTableRow
*iface
)
561 return CONTAINING_RECORD(iface
, HTMLTableRow
, IHTMLTableRow_iface
);
564 static HRESULT WINAPI
HTMLTableRow_QueryInterface(IHTMLTableRow
*iface
,
565 REFIID riid
, void **ppv
)
567 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
569 return IHTMLDOMNode_QueryInterface(&This
->element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
572 static ULONG WINAPI
HTMLTableRow_AddRef(IHTMLTableRow
*iface
)
574 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
576 return IHTMLDOMNode_AddRef(&This
->element
.node
.IHTMLDOMNode_iface
);
579 static ULONG WINAPI
HTMLTableRow_Release(IHTMLTableRow
*iface
)
581 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
583 return IHTMLDOMNode_Release(&This
->element
.node
.IHTMLDOMNode_iface
);
586 static HRESULT WINAPI
HTMLTableRow_GetTypeInfoCount(IHTMLTableRow
*iface
, UINT
*pctinfo
)
588 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
589 return IDispatchEx_GetTypeInfoCount(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
592 static HRESULT WINAPI
HTMLTableRow_GetTypeInfo(IHTMLTableRow
*iface
, UINT iTInfo
,
593 LCID lcid
, ITypeInfo
**ppTInfo
)
595 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
596 return IDispatchEx_GetTypeInfo(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
600 static HRESULT WINAPI
HTMLTableRow_GetIDsOfNames(IHTMLTableRow
*iface
, REFIID riid
,
601 LPOLESTR
*rgszNames
, UINT cNames
,
602 LCID lcid
, DISPID
*rgDispId
)
604 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
605 return IDispatchEx_GetIDsOfNames(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
606 cNames
, lcid
, rgDispId
);
609 static HRESULT WINAPI
HTMLTableRow_Invoke(IHTMLTableRow
*iface
, DISPID dispIdMember
,
610 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
611 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
613 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
614 return IDispatchEx_Invoke(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
615 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
618 static HRESULT WINAPI
HTMLTableRow_put_align(IHTMLTableRow
*iface
, BSTR v
)
620 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
624 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
626 nsAString_InitDepend(&val
, v
);
628 nsres
= nsIDOMHTMLTableRowElement_SetAlign(This
->nsrow
, &val
);
629 nsAString_Finish(&val
);
630 if (NS_FAILED(nsres
)){
631 ERR("Set Align(%s) failed!\n", debugstr_w(v
));
637 static HRESULT WINAPI
HTMLTableRow_get_align(IHTMLTableRow
*iface
, BSTR
*p
)
639 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
643 TRACE("(%p)->(%p)\n", This
, p
);
645 nsAString_Init(&val
, NULL
);
646 nsres
= nsIDOMHTMLTableRowElement_GetAlign(This
->nsrow
, &val
);
648 return return_nsstr(nsres
, &val
, p
);
651 static HRESULT WINAPI
HTMLTableRow_put_vAlign(IHTMLTableRow
*iface
, BSTR v
)
653 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
657 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
659 nsAString_InitDepend(&val
, v
);
661 nsres
= nsIDOMHTMLTableRowElement_SetVAlign(This
->nsrow
, &val
);
662 nsAString_Finish(&val
);
664 if (NS_FAILED(nsres
)){
665 ERR("Set VAlign(%s) failed!\n", debugstr_w(v
));
672 static HRESULT WINAPI
HTMLTableRow_get_vAlign(IHTMLTableRow
*iface
, BSTR
*p
)
674 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
678 TRACE("(%p)->(%p)\n", This
, p
);
680 nsAString_Init(&val
, NULL
);
681 nsres
= nsIDOMHTMLTableRowElement_GetVAlign(This
->nsrow
, &val
);
683 return return_nsstr(nsres
, &val
, p
);
686 static HRESULT WINAPI
HTMLTableRow_put_bgColor(IHTMLTableRow
*iface
, VARIANT v
)
688 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
692 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
694 if (!variant_to_nscolor(&v
, &val
))
697 nsres
= nsIDOMHTMLTableRowElement_SetBgColor(This
->nsrow
, &val
);
698 nsAString_Finish(&val
);
700 if (NS_FAILED(nsres
)){
701 ERR("Set BgColor(%s) failed!\n", debugstr_variant(&v
));
708 static HRESULT WINAPI
HTMLTableRow_get_bgColor(IHTMLTableRow
*iface
, VARIANT
*p
)
710 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
714 const PRUnichar
*color
;
716 TRACE("(%p)->(%p)\n", This
, p
);
718 nsAString_Init(&strColor
, NULL
);
719 nsres
= nsIDOMHTMLTableRowElement_GetBgColor(This
->nsrow
, &strColor
);
721 if(NS_SUCCEEDED(nsres
)) {
722 nsAString_GetData(&strColor
, &color
);
724 hres
= nscolor_to_str(color
, &V_BSTR(p
));
726 ERR("SetBgColor failed: %08x\n", nsres
);
730 nsAString_Finish(&strColor
);
734 static HRESULT WINAPI
HTMLTableRow_put_borderColor(IHTMLTableRow
*iface
, VARIANT v
)
736 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
737 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
741 static HRESULT WINAPI
HTMLTableRow_get_borderColor(IHTMLTableRow
*iface
, VARIANT
*p
)
743 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
744 FIXME("(%p)->(%p)\n", This
, p
);
748 static HRESULT WINAPI
HTMLTableRow_put_borderColorLight(IHTMLTableRow
*iface
, VARIANT v
)
750 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
751 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
755 static HRESULT WINAPI
HTMLTableRow_get_borderColorLight(IHTMLTableRow
*iface
, VARIANT
*p
)
757 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
758 FIXME("(%p)->(%p)\n", This
, p
);
762 static HRESULT WINAPI
HTMLTableRow_put_borderColorDark(IHTMLTableRow
*iface
, VARIANT v
)
764 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
765 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
769 static HRESULT WINAPI
HTMLTableRow_get_borderColorDark(IHTMLTableRow
*iface
, VARIANT
*p
)
771 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
772 FIXME("(%p)->(%p)\n", This
, p
);
776 static HRESULT WINAPI
HTMLTableRow_get_rowIndex(IHTMLTableRow
*iface
, LONG
*p
)
778 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
781 TRACE("(%p)->(%p)\n", This
, p
);
782 nsres
= nsIDOMHTMLTableRowElement_GetRowIndex(This
->nsrow
, p
);
783 if(NS_FAILED(nsres
)) {
784 ERR("Get rowIndex failed: %08x\n", nsres
);
790 static HRESULT WINAPI
HTMLTableRow_get_sectionRowIndex(IHTMLTableRow
*iface
, LONG
*p
)
792 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
795 TRACE("(%p)->(%p)\n", This
, p
);
796 nsres
= nsIDOMHTMLTableRowElement_GetSectionRowIndex(This
->nsrow
, p
);
797 if(NS_FAILED(nsres
)) {
798 ERR("Get selectionRowIndex failed: %08x\n", nsres
);
804 static HRESULT WINAPI
HTMLTableRow_get_cells(IHTMLTableRow
*iface
, IHTMLElementCollection
**p
)
806 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
807 nsIDOMHTMLCollection
*nscol
;
810 TRACE("(%p)->(%p)\n", This
, p
);
812 nsres
= nsIDOMHTMLTableRowElement_GetCells(This
->nsrow
, &nscol
);
813 if(NS_FAILED(nsres
)) {
814 ERR("GetCells failed: %08x\n", nsres
);
818 *p
= create_collection_from_htmlcol(nscol
, dispex_compat_mode(&This
->element
.node
.event_target
.dispex
));
820 nsIDOMHTMLCollection_Release(nscol
);
824 static HRESULT WINAPI
HTMLTableRow_insertCell(IHTMLTableRow
*iface
, LONG index
, IDispatch
**row
)
826 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
827 nsIDOMHTMLElement
*nselem
;
832 TRACE("(%p)->(%d %p)\n", This
, index
, row
);
833 nsres
= nsIDOMHTMLTableRowElement_InsertCell(This
->nsrow
, index
, &nselem
);
834 if(NS_FAILED(nsres
)) {
835 ERR("Insert Cell at %d failed: %08x\n", index
, nsres
);
839 hres
= HTMLTableCell_Create(This
->element
.node
.doc
, (nsIDOMElement
*)nselem
, &elem
);
840 nsIDOMHTMLElement_Release(nselem
);
842 ERR("Create TableCell failed: %08x\n", hres
);
846 *row
= (IDispatch
*)&elem
->IHTMLElement_iface
;
850 static HRESULT WINAPI
HTMLTableRow_deleteCell(IHTMLTableRow
*iface
, LONG index
)
852 HTMLTableRow
*This
= impl_from_IHTMLTableRow(iface
);
855 TRACE("(%p)->(%d)\n", This
, index
);
856 nsres
= nsIDOMHTMLTableRowElement_DeleteCell(This
->nsrow
, index
);
857 if(NS_FAILED(nsres
)) {
858 ERR("Delete Cell failed: %08x\n", nsres
);
864 static const IHTMLTableRowVtbl HTMLTableRowVtbl
= {
865 HTMLTableRow_QueryInterface
,
867 HTMLTableRow_Release
,
868 HTMLTableRow_GetTypeInfoCount
,
869 HTMLTableRow_GetTypeInfo
,
870 HTMLTableRow_GetIDsOfNames
,
872 HTMLTableRow_put_align
,
873 HTMLTableRow_get_align
,
874 HTMLTableRow_put_vAlign
,
875 HTMLTableRow_get_vAlign
,
876 HTMLTableRow_put_bgColor
,
877 HTMLTableRow_get_bgColor
,
878 HTMLTableRow_put_borderColor
,
879 HTMLTableRow_get_borderColor
,
880 HTMLTableRow_put_borderColorLight
,
881 HTMLTableRow_get_borderColorLight
,
882 HTMLTableRow_put_borderColorDark
,
883 HTMLTableRow_get_borderColorDark
,
884 HTMLTableRow_get_rowIndex
,
885 HTMLTableRow_get_sectionRowIndex
,
886 HTMLTableRow_get_cells
,
887 HTMLTableRow_insertCell
,
888 HTMLTableRow_deleteCell
891 static inline HTMLTableRow
*HTMLTableRow_from_HTMLDOMNode(HTMLDOMNode
*iface
)
893 return CONTAINING_RECORD(iface
, HTMLTableRow
, element
.node
);
896 static HRESULT
HTMLTableRow_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
898 HTMLTableRow
*This
= HTMLTableRow_from_HTMLDOMNode(iface
);
902 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
903 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
904 *ppv
= &This
->IHTMLTableRow_iface
;
905 }else if(IsEqualGUID(&IID_IDispatch
, riid
)) {
906 TRACE("(%p)->(IID_IDispatch %p)\n", This
, ppv
);
907 *ppv
= &This
->IHTMLTableRow_iface
;
908 }else if(IsEqualGUID(&IID_IHTMLTableRow
, riid
)) {
909 TRACE("(%p)->(IID_IHTMLTableRow %p)\n", This
, ppv
);
910 *ppv
= &This
->IHTMLTableRow_iface
;
914 IUnknown_AddRef((IUnknown
*)*ppv
);
918 return HTMLElement_QI(&This
->element
.node
, riid
, ppv
);
921 static void HTMLTableRow_traverse(HTMLDOMNode
*iface
, nsCycleCollectionTraversalCallback
*cb
)
923 HTMLTableRow
*This
= HTMLTableRow_from_HTMLDOMNode(iface
);
926 note_cc_edge((nsISupports
*)This
->nsrow
, "This->nstablerow", cb
);
929 static void HTMLTableRow_unlink(HTMLDOMNode
*iface
)
931 HTMLTableRow
*This
= HTMLTableRow_from_HTMLDOMNode(iface
);
934 nsIDOMHTMLTableRowElement
*nsrow
= This
->nsrow
;
937 nsIDOMHTMLTableRowElement_Release(nsrow
);
941 static const NodeImplVtbl HTMLTableRowImplVtbl
= {
944 HTMLElement_destructor
,
947 HTMLElement_handle_event
,
948 HTMLElement_get_attr_col
,
957 HTMLTableRow_traverse
,
961 static const tid_t HTMLTableRow_iface_tids
[] = {
967 static dispex_static_data_t HTMLTableRow_dispex
= {
969 DispHTMLTableRow_tid
,
970 HTMLTableRow_iface_tids
,
971 HTMLElement_init_dispex_info
974 HRESULT
HTMLTableRow_Create(HTMLDocumentNode
*doc
, nsIDOMElement
*nselem
, HTMLElement
**elem
)
979 ret
= heap_alloc_zero(sizeof(HTMLTableRow
));
981 return E_OUTOFMEMORY
;
983 ret
->IHTMLTableRow_iface
.lpVtbl
= &HTMLTableRowVtbl
;
984 ret
->element
.node
.vtbl
= &HTMLTableRowImplVtbl
;
986 HTMLElement_Init(&ret
->element
, doc
, nselem
, &HTMLTableRow_dispex
);
988 nsres
= nsIDOMElement_QueryInterface(nselem
, &IID_nsIDOMHTMLTableRowElement
, (void**)&ret
->nsrow
);
989 assert(nsres
== NS_OK
);
991 *elem
= &ret
->element
;
998 IHTMLTable IHTMLTable_iface
;
999 IHTMLTable2 IHTMLTable2_iface
;
1000 IHTMLTable3 IHTMLTable3_iface
;
1002 nsIDOMHTMLTableElement
*nstable
;
1005 static inline HTMLTable
*impl_from_IHTMLTable(IHTMLTable
*iface
)
1007 return CONTAINING_RECORD(iface
, HTMLTable
, IHTMLTable_iface
);
1010 static inline HTMLTable
*impl_from_IHTMLTable2(IHTMLTable2
*iface
)
1012 return CONTAINING_RECORD(iface
, HTMLTable
, IHTMLTable2_iface
);
1015 static inline HTMLTable
*impl_from_IHTMLTable3(IHTMLTable3
*iface
)
1017 return CONTAINING_RECORD(iface
, HTMLTable
, IHTMLTable3_iface
);
1020 static HRESULT
var2str(const VARIANT
*p
, nsAString
*nsstr
)
1028 return nsAString_Init(nsstr
, V_BSTR(p
))?
1029 S_OK
: E_OUTOFMEMORY
;
1031 hres
= VarBstrFromR8(V_R8(p
), MAKELCID(MAKELANGID(LANG_ENGLISH
,SUBLANG_ENGLISH_US
),SORT_DEFAULT
), 0, &str
);
1034 hres
= VarBstrFromR4(V_R4(p
), MAKELCID(MAKELANGID(LANG_ENGLISH
,SUBLANG_ENGLISH_US
),SORT_DEFAULT
), 0, &str
);
1037 hres
= VarBstrFromI4(V_I4(p
), MAKELCID(MAKELANGID(LANG_ENGLISH
,SUBLANG_ENGLISH_US
),SORT_DEFAULT
), 0, &str
);
1040 FIXME("unsupported arg %s\n", debugstr_variant(p
));
1046 ret
= nsAString_Init(nsstr
, str
);
1048 return ret
? S_OK
: E_OUTOFMEMORY
;
1051 static HRESULT WINAPI
HTMLTable_QueryInterface(IHTMLTable
*iface
,
1052 REFIID riid
, void **ppv
)
1054 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1056 return IHTMLDOMNode_QueryInterface(&This
->element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
1059 static ULONG WINAPI
HTMLTable_AddRef(IHTMLTable
*iface
)
1061 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1063 return IHTMLDOMNode_AddRef(&This
->element
.node
.IHTMLDOMNode_iface
);
1066 static ULONG WINAPI
HTMLTable_Release(IHTMLTable
*iface
)
1068 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1070 return IHTMLDOMNode_Release(&This
->element
.node
.IHTMLDOMNode_iface
);
1073 static HRESULT WINAPI
HTMLTable_GetTypeInfoCount(IHTMLTable
*iface
, UINT
*pctinfo
)
1075 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1076 return IDispatchEx_GetTypeInfoCount(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
1079 static HRESULT WINAPI
HTMLTable_GetTypeInfo(IHTMLTable
*iface
, UINT iTInfo
,
1080 LCID lcid
, ITypeInfo
**ppTInfo
)
1082 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1083 return IDispatchEx_GetTypeInfo(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
1087 static HRESULT WINAPI
HTMLTable_GetIDsOfNames(IHTMLTable
*iface
, REFIID riid
,
1088 LPOLESTR
*rgszNames
, UINT cNames
,
1089 LCID lcid
, DISPID
*rgDispId
)
1091 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1092 return IDispatchEx_GetIDsOfNames(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
1093 cNames
, lcid
, rgDispId
);
1096 static HRESULT WINAPI
HTMLTable_Invoke(IHTMLTable
*iface
, DISPID dispIdMember
,
1097 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
1098 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
1100 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1101 return IDispatchEx_Invoke(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
1102 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
1105 static HRESULT WINAPI
HTMLTable_put_cols(IHTMLTable
*iface
, LONG v
)
1107 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1108 FIXME("(%p)->(%d)\n", This
, v
);
1112 static HRESULT WINAPI
HTMLTable_get_cols(IHTMLTable
*iface
, LONG
*p
)
1114 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1115 FIXME("(%p)->(%p)\n", This
, p
);
1119 static HRESULT WINAPI
HTMLTable_put_border(IHTMLTable
*iface
, VARIANT v
)
1121 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1122 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1126 static HRESULT WINAPI
HTMLTable_get_border(IHTMLTable
*iface
, VARIANT
*p
)
1128 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1129 FIXME("(%p)->(%p)\n", This
, p
);
1133 static HRESULT WINAPI
HTMLTable_put_frame(IHTMLTable
*iface
, BSTR v
)
1135 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1139 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1141 nsAString_InitDepend(&str
, v
);
1142 nsres
= nsIDOMHTMLTableElement_SetFrame(This
->nstable
, &str
);
1143 nsAString_Finish(&str
);
1145 if (NS_FAILED(nsres
)) {
1146 ERR("SetFrame(%s) failed: %08x\n", debugstr_w(v
), nsres
);
1152 static HRESULT WINAPI
HTMLTable_get_frame(IHTMLTable
*iface
, BSTR
*p
)
1154 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1158 TRACE("(%p)->(%p)\n", This
, p
);
1160 nsAString_Init(&str
, NULL
);
1161 nsres
= nsIDOMHTMLTableElement_GetFrame(This
->nstable
, &str
);
1163 return return_nsstr(nsres
, &str
, p
);
1166 static HRESULT WINAPI
HTMLTable_put_rules(IHTMLTable
*iface
, BSTR v
)
1168 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1169 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1173 static HRESULT WINAPI
HTMLTable_get_rules(IHTMLTable
*iface
, BSTR
*p
)
1175 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1176 FIXME("(%p)->(%p)\n", This
, p
);
1180 static HRESULT WINAPI
HTMLTable_put_cellSpacing(IHTMLTable
*iface
, VARIANT v
)
1182 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1187 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1191 nsAString_InitDepend(&nsstr
, V_BSTR(&v
));
1194 swprintf(buf
, ARRAY_SIZE(buf
), L
"%d", V_I4(&v
));
1195 nsAString_InitDepend(&nsstr
, buf
);
1199 FIXME("unsupported arg %s\n", debugstr_variant(&v
));
1203 nsres
= nsIDOMHTMLTableElement_SetCellSpacing(This
->nstable
, &nsstr
);
1204 nsAString_Finish(&nsstr
);
1205 if(NS_FAILED(nsres
)) {
1206 ERR("SetCellSpacing failed: %08x\n", nsres
);
1213 static HRESULT WINAPI
HTMLTable_get_cellSpacing(IHTMLTable
*iface
, VARIANT
*p
)
1215 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1219 TRACE("(%p)->(%p)\n", This
, p
);
1221 nsAString_Init(&nsstr
, NULL
);
1222 nsres
= nsIDOMHTMLTableElement_GetCellSpacing(This
->nstable
, &nsstr
);
1224 return return_nsstr(nsres
, &nsstr
, &V_BSTR(p
));
1227 static HRESULT WINAPI
HTMLTable_put_cellPadding(IHTMLTable
*iface
, VARIANT v
)
1229 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1234 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1236 hres
= var2str(&v
, &val
);
1240 nsres
= nsIDOMHTMLTableElement_SetCellPadding(This
->nstable
, &val
);
1241 nsAString_Finish(&val
);
1242 if(NS_FAILED(nsres
)) {
1243 ERR("Set Width(%s) failed, err = %08x\n", debugstr_variant(&v
), nsres
);
1250 static HRESULT WINAPI
HTMLTable_get_cellPadding(IHTMLTable
*iface
, VARIANT
*p
)
1252 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1256 TRACE("(%p)->(%p)\n", This
, p
);
1258 nsAString_Init(&val
, NULL
);
1259 nsres
= nsIDOMHTMLTableElement_GetCellPadding(This
->nstable
, &val
);
1260 return return_nsstr_variant(nsres
, &val
, 0, p
);
1263 static HRESULT WINAPI
HTMLTable_put_background(IHTMLTable
*iface
, BSTR v
)
1265 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1266 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
1270 static HRESULT WINAPI
HTMLTable_get_background(IHTMLTable
*iface
, BSTR
*p
)
1272 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1273 FIXME("(%p)->(%p)\n", This
, p
);
1277 static HRESULT WINAPI
HTMLTable_put_bgColor(IHTMLTable
*iface
, VARIANT v
)
1279 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1283 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1285 if(!variant_to_nscolor(&v
, &val
))
1288 nsres
= nsIDOMHTMLTableElement_SetBgColor(This
->nstable
, &val
);
1289 nsAString_Finish(&val
);
1290 if (NS_FAILED(nsres
)){
1291 ERR("Set BgColor(%s) failed!\n", debugstr_variant(&v
));
1298 static HRESULT WINAPI
HTMLTable_get_bgColor(IHTMLTable
*iface
, VARIANT
*p
)
1300 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1304 const PRUnichar
*color
;
1306 TRACE("(%p)->(%p)\n", This
, p
);
1308 nsAString_Init(&strColor
, NULL
);
1309 nsres
= nsIDOMHTMLTableElement_GetBgColor(This
->nstable
, &strColor
);
1311 if(NS_SUCCEEDED(nsres
)) {
1312 nsAString_GetData(&strColor
, &color
);
1314 hres
= nscolor_to_str(color
, &V_BSTR(p
));
1316 ERR("SetBgColor failed: %08x\n", nsres
);
1320 nsAString_Finish(&strColor
);
1324 static HRESULT WINAPI
HTMLTable_put_borderColor(IHTMLTable
*iface
, VARIANT v
)
1326 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1327 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1331 static HRESULT WINAPI
HTMLTable_get_borderColor(IHTMLTable
*iface
, VARIANT
*p
)
1333 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1334 FIXME("(%p)->(%p)\n", This
, p
);
1338 static HRESULT WINAPI
HTMLTable_put_borderColorLight(IHTMLTable
*iface
, VARIANT v
)
1340 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1341 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1345 static HRESULT WINAPI
HTMLTable_get_borderColorLight(IHTMLTable
*iface
, VARIANT
*p
)
1347 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1348 FIXME("(%p)->(%p)\n", This
, p
);
1352 static HRESULT WINAPI
HTMLTable_put_borderColorDark(IHTMLTable
*iface
, VARIANT v
)
1354 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1355 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1359 static HRESULT WINAPI
HTMLTable_get_borderColorDark(IHTMLTable
*iface
, VARIANT
*p
)
1361 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1362 FIXME("(%p)->(%p)\n", This
, p
);
1366 static HRESULT WINAPI
HTMLTable_put_align(IHTMLTable
*iface
, BSTR v
)
1368 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1372 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1374 nsAString_InitDepend(&val
, v
);
1376 nsres
= nsIDOMHTMLTableElement_SetAlign(This
->nstable
, &val
);
1377 nsAString_Finish(&val
);
1378 if (NS_FAILED(nsres
)){
1379 ERR("Set Align(%s) failed!\n", debugstr_w(v
));
1385 static HRESULT WINAPI
HTMLTable_get_align(IHTMLTable
*iface
, BSTR
*p
)
1387 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1391 TRACE("(%p)->(%p)\n", This
, p
);
1393 nsAString_Init(&val
, NULL
);
1394 nsres
= nsIDOMHTMLTableElement_GetAlign(This
->nstable
, &val
);
1396 return return_nsstr(nsres
, &val
, p
);
1399 static HRESULT WINAPI
HTMLTable_refresh(IHTMLTable
*iface
)
1401 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1402 FIXME("(%p)\n", This
);
1406 static HRESULT WINAPI
HTMLTable_get_rows(IHTMLTable
*iface
, IHTMLElementCollection
**p
)
1408 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1409 nsIDOMHTMLCollection
*nscol
;
1412 TRACE("(%p)->(%p)\n", This
, p
);
1414 nsres
= nsIDOMHTMLTableElement_GetRows(This
->nstable
, &nscol
);
1415 if(NS_FAILED(nsres
)) {
1416 ERR("GetRows failed: %08x\n", nsres
);
1420 *p
= create_collection_from_htmlcol(nscol
, dispex_compat_mode(&This
->element
.node
.event_target
.dispex
));
1422 nsIDOMHTMLCollection_Release(nscol
);
1426 static HRESULT WINAPI
HTMLTable_put_width(IHTMLTable
*iface
, VARIANT v
)
1428 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1433 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1434 hres
= var2str(&v
, &val
);
1437 ERR("Set Width(%s) failed when initializing a nsAString, err = %08x\n",
1438 debugstr_variant(&v
), hres
);
1442 nsres
= nsIDOMHTMLTableElement_SetWidth(This
->nstable
, &val
);
1443 nsAString_Finish(&val
);
1445 if (NS_FAILED(nsres
)){
1446 ERR("Set Width(%s) failed, err = %08x\n", debugstr_variant(&v
), nsres
);
1452 static HRESULT WINAPI
HTMLTable_get_width(IHTMLTable
*iface
, VARIANT
*p
)
1454 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1458 TRACE("(%p)->(%p)\n", This
, p
);
1460 nsAString_Init(&val
, NULL
);
1461 nsres
= nsIDOMHTMLTableElement_GetWidth(This
->nstable
, &val
);
1462 return return_nsstr_variant(nsres
, &val
, NSSTR_IMPLICIT_PX
, p
);
1465 static HRESULT WINAPI
HTMLTable_put_height(IHTMLTable
*iface
, VARIANT v
)
1467 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1468 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1472 static HRESULT WINAPI
HTMLTable_get_height(IHTMLTable
*iface
, VARIANT
*p
)
1474 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1475 FIXME("(%p)->(%p)\n", This
, p
);
1479 static HRESULT WINAPI
HTMLTable_put_dataPageSize(IHTMLTable
*iface
, LONG v
)
1481 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1482 FIXME("(%p)->(%d)\n", This
, v
);
1486 static HRESULT WINAPI
HTMLTable_get_dataPageSize(IHTMLTable
*iface
, LONG
*p
)
1488 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1489 FIXME("(%p)->(%p)\n", This
, p
);
1493 static HRESULT WINAPI
HTMLTable_nextPage(IHTMLTable
*iface
)
1495 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1496 FIXME("(%p)\n", This
);
1500 static HRESULT WINAPI
HTMLTable_previousPage(IHTMLTable
*iface
)
1502 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1503 FIXME("(%p)\n", This
);
1507 static HRESULT WINAPI
HTMLTable_get_tHead(IHTMLTable
*iface
, IHTMLTableSection
**p
)
1509 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1510 FIXME("(%p)->(%p)\n", This
, p
);
1514 static HRESULT WINAPI
HTMLTable_get_tFoot(IHTMLTable
*iface
, IHTMLTableSection
**p
)
1516 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1517 FIXME("(%p)->(%p)\n", This
, p
);
1521 static HRESULT WINAPI
HTMLTable_get_tBodies(IHTMLTable
*iface
, IHTMLElementCollection
**p
)
1523 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1524 nsIDOMHTMLCollection
*nscol
= NULL
;
1527 TRACE("(%p)->(%p)\n", This
, p
);
1529 nsres
= nsIDOMHTMLTableElement_GetTBodies(This
->nstable
, &nscol
);
1530 if(NS_FAILED(nsres
)) {
1531 ERR("GetTBodies failed: %08x\n", nsres
);
1535 *p
= create_collection_from_htmlcol(nscol
, dispex_compat_mode(&This
->element
.node
.event_target
.dispex
));
1537 nsIDOMHTMLCollection_Release(nscol
);
1541 static HRESULT WINAPI
HTMLTable_get_caption(IHTMLTable
*iface
, IHTMLTableCaption
**p
)
1543 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1544 FIXME("(%p)->(%p)\n", This
, p
);
1548 static HRESULT WINAPI
HTMLTable_createTHead(IHTMLTable
*iface
, IDispatch
**head
)
1550 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1551 FIXME("(%p)->(%p)\n", This
, head
);
1555 static HRESULT WINAPI
HTMLTable_deleteTHead(IHTMLTable
*iface
)
1557 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1558 FIXME("(%p)\n", This
);
1562 static HRESULT WINAPI
HTMLTable_createTFoot(IHTMLTable
*iface
, IDispatch
**foot
)
1564 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1565 FIXME("(%p)->(%p)\n", This
, foot
);
1569 static HRESULT WINAPI
HTMLTable_deleteTFoot(IHTMLTable
*iface
)
1571 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1572 FIXME("(%p)\n", This
);
1576 static HRESULT WINAPI
HTMLTable_createCaption(IHTMLTable
*iface
, IHTMLTableCaption
**caption
)
1578 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1579 FIXME("(%p)->(%p)\n", This
, caption
);
1583 static HRESULT WINAPI
HTMLTable_deleteCaption(IHTMLTable
*iface
)
1585 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1586 FIXME("(%p)\n", This
);
1590 static HRESULT WINAPI
HTMLTable_insertRow(IHTMLTable
*iface
, LONG index
, IDispatch
**row
)
1592 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1593 nsIDOMHTMLElement
*nselem
;
1598 TRACE("(%p)->(%d %p)\n", This
, index
, row
);
1599 nsres
= nsIDOMHTMLTableElement_InsertRow(This
->nstable
, index
, &nselem
);
1600 if(NS_FAILED(nsres
)) {
1601 ERR("Insert Row at %d failed: %08x\n", index
, nsres
);
1605 hres
= HTMLTableRow_Create(This
->element
.node
.doc
, (nsIDOMElement
*)nselem
, &elem
);
1606 nsIDOMHTMLElement_Release(nselem
);
1608 ERR("Create TableRow failed: %08x\n", hres
);
1612 *row
= (IDispatch
*)&elem
->IHTMLElement_iface
;
1616 static HRESULT WINAPI
HTMLTable_deleteRow(IHTMLTable
*iface
, LONG index
)
1618 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1621 TRACE("(%p)->(%d)\n", This
, index
);
1622 nsres
= nsIDOMHTMLTableElement_DeleteRow(This
->nstable
, index
);
1623 if(NS_FAILED(nsres
)) {
1624 ERR("Delete Row failed: %08x\n", nsres
);
1630 static HRESULT WINAPI
HTMLTable_get_readyState(IHTMLTable
*iface
, BSTR
*p
)
1632 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1633 FIXME("(%p)->(%p)\n", This
, p
);
1637 static HRESULT WINAPI
HTMLTable_put_onreadystatechange(IHTMLTable
*iface
, VARIANT v
)
1639 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1640 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
1644 static HRESULT WINAPI
HTMLTable_get_onreadystatechange(IHTMLTable
*iface
, VARIANT
*p
)
1646 HTMLTable
*This
= impl_from_IHTMLTable(iface
);
1647 FIXME("(%p)->(%p)\n", This
, p
);
1651 static const IHTMLTableVtbl HTMLTableVtbl
= {
1652 HTMLTable_QueryInterface
,
1655 HTMLTable_GetTypeInfoCount
,
1656 HTMLTable_GetTypeInfo
,
1657 HTMLTable_GetIDsOfNames
,
1661 HTMLTable_put_border
,
1662 HTMLTable_get_border
,
1663 HTMLTable_put_frame
,
1664 HTMLTable_get_frame
,
1665 HTMLTable_put_rules
,
1666 HTMLTable_get_rules
,
1667 HTMLTable_put_cellSpacing
,
1668 HTMLTable_get_cellSpacing
,
1669 HTMLTable_put_cellPadding
,
1670 HTMLTable_get_cellPadding
,
1671 HTMLTable_put_background
,
1672 HTMLTable_get_background
,
1673 HTMLTable_put_bgColor
,
1674 HTMLTable_get_bgColor
,
1675 HTMLTable_put_borderColor
,
1676 HTMLTable_get_borderColor
,
1677 HTMLTable_put_borderColorLight
,
1678 HTMLTable_get_borderColorLight
,
1679 HTMLTable_put_borderColorDark
,
1680 HTMLTable_get_borderColorDark
,
1681 HTMLTable_put_align
,
1682 HTMLTable_get_align
,
1685 HTMLTable_put_width
,
1686 HTMLTable_get_width
,
1687 HTMLTable_put_height
,
1688 HTMLTable_get_height
,
1689 HTMLTable_put_dataPageSize
,
1690 HTMLTable_get_dataPageSize
,
1692 HTMLTable_previousPage
,
1693 HTMLTable_get_tHead
,
1694 HTMLTable_get_tFoot
,
1695 HTMLTable_get_tBodies
,
1696 HTMLTable_get_caption
,
1697 HTMLTable_createTHead
,
1698 HTMLTable_deleteTHead
,
1699 HTMLTable_createTFoot
,
1700 HTMLTable_deleteTFoot
,
1701 HTMLTable_createCaption
,
1702 HTMLTable_deleteCaption
,
1703 HTMLTable_insertRow
,
1704 HTMLTable_deleteRow
,
1705 HTMLTable_get_readyState
,
1706 HTMLTable_put_onreadystatechange
,
1707 HTMLTable_get_onreadystatechange
1711 static HRESULT WINAPI
HTMLTable2_QueryInterface(IHTMLTable2
*iface
,
1712 REFIID riid
, void **ppv
)
1714 HTMLTable
*This
= impl_from_IHTMLTable2(iface
);
1716 return IHTMLDOMNode_QueryInterface(&This
->element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
1719 static ULONG WINAPI
HTMLTable2_AddRef(IHTMLTable2
*iface
)
1721 HTMLTable
*This
= impl_from_IHTMLTable2(iface
);
1723 return IHTMLDOMNode_AddRef(&This
->element
.node
.IHTMLDOMNode_iface
);
1726 static ULONG WINAPI
HTMLTable2_Release(IHTMLTable2
*iface
)
1728 HTMLTable
*This
= impl_from_IHTMLTable2(iface
);
1730 return IHTMLDOMNode_Release(&This
->element
.node
.IHTMLDOMNode_iface
);
1733 static HRESULT WINAPI
HTMLTable2_GetTypeInfoCount(IHTMLTable2
*iface
, UINT
*pctinfo
)
1735 HTMLTable
*This
= impl_from_IHTMLTable2(iface
);
1736 return IDispatchEx_GetTypeInfoCount(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
1739 static HRESULT WINAPI
HTMLTable2_GetTypeInfo(IHTMLTable2
*iface
, UINT iTInfo
,
1740 LCID lcid
, ITypeInfo
**ppTInfo
)
1742 HTMLTable
*This
= impl_from_IHTMLTable2(iface
);
1743 return IDispatchEx_GetTypeInfo(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
1747 static HRESULT WINAPI
HTMLTable2_GetIDsOfNames(IHTMLTable2
*iface
, REFIID riid
,
1748 LPOLESTR
*rgszNames
, UINT cNames
,
1749 LCID lcid
, DISPID
*rgDispId
)
1751 HTMLTable
*This
= impl_from_IHTMLTable2(iface
);
1752 return IDispatchEx_GetIDsOfNames(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
1753 cNames
, lcid
, rgDispId
);
1756 static HRESULT WINAPI
HTMLTable2_Invoke(IHTMLTable2
*iface
, DISPID dispIdMember
,
1757 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
1758 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
1760 HTMLTable
*This
= impl_from_IHTMLTable2(iface
);
1761 return IDispatchEx_Invoke(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
1762 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
1765 static HRESULT WINAPI
HTMLTable2_firstPage(IHTMLTable2
*iface
)
1767 HTMLTable
*This
= impl_from_IHTMLTable2(iface
);
1768 FIXME("(%p)->()\n", This
);
1772 static HRESULT WINAPI
HTMLTable2_lastPage(IHTMLTable2
*iface
)
1774 HTMLTable
*This
= impl_from_IHTMLTable2(iface
);
1775 FIXME("(%p)->()\n", This
);
1779 static HRESULT WINAPI
HTMLTable2_cells(IHTMLTable2
*iface
, IHTMLElementCollection
**p
)
1781 HTMLTable
*This
= impl_from_IHTMLTable2(iface
);
1782 FIXME("(%p)->(%p)\n", This
, p
);
1786 static HRESULT WINAPI
HTMLTable2_moveRow(IHTMLTable2
*iface
, LONG indexFrom
, LONG indexTo
, IDispatch
**row
)
1788 HTMLTable
*This
= impl_from_IHTMLTable2(iface
);
1789 FIXME("(%p)->(%d %d %p)\n", This
, indexFrom
, indexTo
, row
);
1794 static const IHTMLTable2Vtbl HTMLTable2Vtbl
= {
1795 HTMLTable2_QueryInterface
,
1798 HTMLTable2_GetTypeInfoCount
,
1799 HTMLTable2_GetTypeInfo
,
1800 HTMLTable2_GetIDsOfNames
,
1802 HTMLTable2_firstPage
,
1803 HTMLTable2_lastPage
,
1809 static HRESULT WINAPI
HTMLTable3_QueryInterface(IHTMLTable3
*iface
,
1810 REFIID riid
, void **ppv
)
1812 HTMLTable
*This
= impl_from_IHTMLTable3(iface
);
1814 return IHTMLDOMNode_QueryInterface(&This
->element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
1817 static ULONG WINAPI
HTMLTable3_AddRef(IHTMLTable3
*iface
)
1819 HTMLTable
*This
= impl_from_IHTMLTable3(iface
);
1821 return IHTMLDOMNode_AddRef(&This
->element
.node
.IHTMLDOMNode_iface
);
1824 static ULONG WINAPI
HTMLTable3_Release(IHTMLTable3
*iface
)
1826 HTMLTable
*This
= impl_from_IHTMLTable3(iface
);
1828 return IHTMLDOMNode_Release(&This
->element
.node
.IHTMLDOMNode_iface
);
1831 static HRESULT WINAPI
HTMLTable3_GetTypeInfoCount(IHTMLTable3
*iface
, UINT
*pctinfo
)
1833 HTMLTable
*This
= impl_from_IHTMLTable3(iface
);
1834 return IDispatchEx_GetTypeInfoCount(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
1837 static HRESULT WINAPI
HTMLTable3_GetTypeInfo(IHTMLTable3
*iface
, UINT iTInfo
,
1838 LCID lcid
, ITypeInfo
**ppTInfo
)
1840 HTMLTable
*This
= impl_from_IHTMLTable3(iface
);
1841 return IDispatchEx_GetTypeInfo(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
1845 static HRESULT WINAPI
HTMLTable3_GetIDsOfNames(IHTMLTable3
*iface
, REFIID riid
,
1846 LPOLESTR
*rgszNames
, UINT cNames
,
1847 LCID lcid
, DISPID
*rgDispId
)
1849 HTMLTable
*This
= impl_from_IHTMLTable3(iface
);
1850 return IDispatchEx_GetIDsOfNames(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
1851 cNames
, lcid
, rgDispId
);
1854 static HRESULT WINAPI
HTMLTable3_Invoke(IHTMLTable3
*iface
, DISPID dispIdMember
,
1855 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
1856 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
1858 HTMLTable
*This
= impl_from_IHTMLTable3(iface
);
1859 return IDispatchEx_Invoke(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
1860 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
1863 static HRESULT WINAPI
HTMLTable3_put_summary(IHTMLTable3
*iface
, BSTR v
)
1865 HTMLTable
*This
= impl_from_IHTMLTable3(iface
);
1869 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
1871 nsAString_InitDepend(&str
, v
);
1873 nsres
= nsIDOMHTMLTableElement_SetSummary(This
->nstable
, &str
);
1875 nsAString_Finish(&str
);
1876 if (NS_FAILED(nsres
)) {
1877 ERR("Set summary(%s) failed: %08x\n", debugstr_w(v
), nsres
);
1883 static HRESULT WINAPI
HTMLTable3_get_summary(IHTMLTable3
*iface
, BSTR
* p
)
1885 HTMLTable
*This
= impl_from_IHTMLTable3(iface
);
1889 TRACE("(%p)->(%p)\n", This
, p
);
1891 nsAString_Init(&str
, NULL
);
1892 nsres
= nsIDOMHTMLTableElement_GetSummary(This
->nstable
, &str
);
1894 return return_nsstr(nsres
, &str
, p
);
1897 static const IHTMLTable3Vtbl HTMLTable3Vtbl
= {
1898 HTMLTable3_QueryInterface
,
1901 HTMLTable3_GetTypeInfoCount
,
1902 HTMLTable3_GetTypeInfo
,
1903 HTMLTable3_GetIDsOfNames
,
1905 HTMLTable3_put_summary
,
1906 HTMLTable3_get_summary
1909 static inline HTMLTable
*impl_from_HTMLDOMNode(HTMLDOMNode
*iface
)
1911 return CONTAINING_RECORD(iface
, HTMLTable
, element
.node
);
1914 static HRESULT
HTMLTable_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
1916 HTMLTable
*This
= impl_from_HTMLDOMNode(iface
);
1920 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
1921 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
1922 *ppv
= &This
->IHTMLTable_iface
;
1923 }else if(IsEqualGUID(&IID_IDispatch
, riid
)) {
1924 TRACE("(%p)->(IID_IDispatch %p)\n", This
, ppv
);
1925 *ppv
= &This
->IHTMLTable_iface
;
1926 }else if(IsEqualGUID(&IID_IHTMLTable
, riid
)) {
1927 TRACE("(%p)->(IID_IHTMLTable %p)\n", This
, ppv
);
1928 *ppv
= &This
->IHTMLTable_iface
;
1929 }else if(IsEqualGUID(&IID_IHTMLTable2
, riid
)) {
1930 TRACE("(%p)->(IID_IHTMLTable2 %p)\n", This
, ppv
);
1931 *ppv
= &This
->IHTMLTable2_iface
;
1932 }else if(IsEqualGUID(&IID_IHTMLTable3
, riid
)) {
1933 TRACE("(%p)->(IID_IHTMLTable3 %p)\n", This
, ppv
);
1934 *ppv
= &This
->IHTMLTable3_iface
;
1938 IUnknown_AddRef((IUnknown
*)*ppv
);
1942 return HTMLElement_QI(&This
->element
.node
, riid
, ppv
);
1945 static void HTMLTable_traverse(HTMLDOMNode
*iface
, nsCycleCollectionTraversalCallback
*cb
)
1947 HTMLTable
*This
= impl_from_HTMLDOMNode(iface
);
1950 note_cc_edge((nsISupports
*)This
->nstable
, "This->nstable", cb
);
1953 static void HTMLTable_unlink(HTMLDOMNode
*iface
)
1955 HTMLTable
*This
= impl_from_HTMLDOMNode(iface
);
1958 nsIDOMHTMLTableElement
*nstable
= This
->nstable
;
1960 This
->nstable
= NULL
;
1961 nsIDOMHTMLTableElement_Release(nstable
);
1965 static const cpc_entry_t HTMLTable_cpc
[] = {
1966 {&DIID_HTMLTableEvents
},
1971 static const NodeImplVtbl HTMLTableImplVtbl
= {
1974 HTMLElement_destructor
,
1977 HTMLElement_handle_event
,
1978 HTMLElement_get_attr_col
,
1991 static const tid_t HTMLTable_iface_tids
[] = {
1999 static dispex_static_data_t HTMLTable_dispex
= {
2002 HTMLTable_iface_tids
,
2003 HTMLElement_init_dispex_info
2006 HRESULT
HTMLTable_Create(HTMLDocumentNode
*doc
, nsIDOMElement
*nselem
, HTMLElement
**elem
)
2011 ret
= heap_alloc_zero(sizeof(HTMLTable
));
2013 return E_OUTOFMEMORY
;
2015 ret
->element
.node
.vtbl
= &HTMLTableImplVtbl
;
2016 ret
->IHTMLTable_iface
.lpVtbl
= &HTMLTableVtbl
;
2017 ret
->IHTMLTable2_iface
.lpVtbl
= &HTMLTable2Vtbl
;
2018 ret
->IHTMLTable3_iface
.lpVtbl
= &HTMLTable3Vtbl
;
2020 HTMLElement_Init(&ret
->element
, doc
, nselem
, &HTMLTable_dispex
);
2022 nsres
= nsIDOMElement_QueryInterface(nselem
, &IID_nsIDOMHTMLTableElement
, (void**)&ret
->nstable
);
2023 assert(nsres
== NS_OK
);
2025 *elem
= &ret
->element
;