mshtml: Store nsIDOMHTMLTableElement in HTMLTable.

This commit is contained in:
Jacek Caban 2008-09-30 17:45:25 +02:00 committed by Alexandre Julliard
parent 0769ebc8a6
commit bf9155dbaa
2 changed files with 57 additions and 0 deletions

View File

@ -37,6 +37,7 @@ typedef struct {
const IHTMLTableVtbl *lpHTMLTableVtbl;
ConnectionPoint cp;
nsIDOMHTMLTableElement *nstable;
} HTMLTable;
#define HTMLTABLE(x) ((IHTMLTable*) &(x)->lpHTMLTableVtbl)
@ -529,6 +530,10 @@ static HRESULT HTMLTable_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void HTMLTable_destructor(HTMLDOMNode *iface)
{
HTMLTable *This = HTMLTABLE_NODE_THIS(iface);
if(This->nstable)
nsIDOMHTMLTableElement_Release(This->nstable);
HTMLElement_destructor(&This->element.node);
}
@ -558,6 +563,7 @@ static dispex_static_data_t HTMLTable_dispex = {
HTMLElement *HTMLTable_Create(nsIDOMHTMLElement *nselem)
{
HTMLTable *ret = heap_alloc_zero(sizeof(HTMLTable));
nsresult nsres;
ret->element.node.vtbl = &HTMLTableImplVtbl;
ret->lpHTMLTableVtbl = &HTMLTableVtbl;
@ -567,5 +573,9 @@ HTMLElement *HTMLTable_Create(nsIDOMHTMLElement *nselem)
ConnectionPoint_Init(&ret->cp, &ret->element.cp_container, &DIID_HTMLTableEvents);
nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLTableElement, (void**)&ret->nstable);
if(NS_FAILED(nsres))
ERR("Could not get nsIDOMHTMLTableElement iface: %08x\n", nsres);
return &ret->element;
}

View File

@ -125,6 +125,8 @@ typedef nsISupports nsIAtom;
typedef nsISupports nsISupportsArray;
typedef nsISupports nsIContentFilter;
typedef nsISupports nsIDOMMediaList;
typedef nsISupports nsIDOMHTMLTableCaptionElement;
typedef nsISupports nsIDOMHTMLTableSectionElement;
[
object,
@ -1299,6 +1301,7 @@ interface nsIDOMHTMLScriptElement : nsIDOMHTMLElement
object,
uuid(a6cf90ab-15b3-11d2-932e-00805f8add32),
local
/* FROZEN */
]
interface nsIDOMHTMLImageElement : nsIDOMHTMLElement
{
@ -1328,6 +1331,50 @@ interface nsIDOMHTMLImageElement : nsIDOMHTMLElement
nsresult SetWidth(PRInt32 aWidth);
}
[
object,
uuid(a6cf90b2-15b3-11d2-932e-00805f8add32),
local
/* FROZEN */
]
interface nsIDOMHTMLTableElement : nsIDOMHTMLElement
{
nsresult GetCaption(nsIDOMHTMLTableCaptionElement **aCaption);
nsresult SetCaption(nsIDOMHTMLTableCaptionElement *aCaption);
nsresult GetTHead(nsIDOMHTMLTableSectionElement **aTHead);
nsresult SetTHead(nsIDOMHTMLTableSectionElement *aTHead);
nsresult GetTFoot(nsIDOMHTMLTableSectionElement **aTFoot);
nsresult SetTFoot(nsIDOMHTMLTableSectionElement *aTFoot);
nsresult GetRows(nsIDOMHTMLCollection **aRows);
nsresult GetTBodies(nsIDOMHTMLCollection **aTBodies);
nsresult GetAlign(nsAString *aAlign);
nsresult SetAlign(const nsAString *aAlign);
nsresult GetBgColor(nsAString *aBgColor);
nsresult SetBgColor(const nsAString *aBgColor);
nsresult GetBorder(nsAString *aBorder);
nsresult SetBorder(const nsAString *aBorder);
nsresult GetCellPadding(nsAString *aCellPadding);
nsresult SetCellPadding(const nsAString *aCellPadding);
nsresult GetCellSpacing(nsAString *aCellSpacing);
nsresult SetCellSpacing(const nsAString *aCellSpacing);
nsresult GetFrame(nsAString *aFrame);
nsresult SetFrame(const nsAString *aFrame);
nsresult GetRules(nsAString *aRules);
nsresult SetRules(const nsAString *aRules);
nsresult GetSummary(nsAString *aSummary);
nsresult SetSummary(const nsAString *aSummary);
nsresult GetWidth(nsAString *aWidth);
nsresult SetWidth(const nsAString *aWidth);
nsresult CreateTHead(nsIDOMHTMLElement **_retval);
nsresult DeleteTHead();
nsresult CreateTFoot(nsIDOMHTMLElement **_retval);
nsresult DeleteTFoot();
nsresult CreateCaption(nsIDOMHTMLElement **_retval);
nsresult DeleteCaption();
nsresult InsertRow(PRInt32 index, nsIDOMHTMLElement **_retval);
nsresult DeleteRow(PRInt32 index);
}
[
object,
uuid(94928ab3-8b63-11d3-989d-001083010e9b),