diff --git a/dlls/mshtml/htmltablecell.c b/dlls/mshtml/htmltablecell.c index 7bfcf99fb5..7b8d2fc1ac 100644 --- a/dlls/mshtml/htmltablecell.c +++ b/dlls/mshtml/htmltablecell.c @@ -17,6 +17,7 @@ */ #include +#include #define COBJMACROS @@ -35,6 +36,8 @@ typedef struct { HTMLElement element; IHTMLTableCell IHTMLTableCell_iface; + + nsIDOMHTMLTableCellElement *nscell; } HTMLTableCell; static inline HTMLTableCell *impl_from_IHTMLTableCell(IHTMLTableCell *iface) @@ -362,6 +365,7 @@ static dispex_static_data_t HTMLTableCell_dispex = { HRESULT HTMLTableCell_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem) { HTMLTableCell *ret; + nsresult nsres; ret = heap_alloc_zero(sizeof(*ret)); if(!ret) @@ -372,6 +376,12 @@ HRESULT HTMLTableCell_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, H HTMLElement_Init(&ret->element, doc, nselem, &HTMLTableCell_dispex); + nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLTableCellElement, (void**)&ret->nscell); + + /* Share nscell reference with nsnode */ + assert(nsres == NS_OK && (nsIDOMNode*)ret->nscell == ret->element.node.nsnode); + nsIDOMNode_Release(ret->element.node.nsnode); + *elem = &ret->element; return S_OK; } diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl index 9182c19032..89a9740a10 100644 --- a/dlls/mshtml/nsiface.idl +++ b/dlls/mshtml/nsiface.idl @@ -2070,6 +2070,44 @@ interface nsIDOMHTMLTableRowElement : nsIDOMHTMLElement nsresult DeleteCell(int32_t index); } +[ + object, + uuid(1fb22137-c231-4eae-9ca4-557bb0852d89), + local +] +interface nsIDOMHTMLTableCellElement : nsIDOMHTMLElement +{ + nsresult GetCellIndex(int32_t *aCellIndex); + nsresult GetAbbr(nsAString *aAbbr); + nsresult SetAbbr(const nsAString *aAbbr); + nsresult GetAlign(nsAString *aAlign); + nsresult SetAlign(const nsAString *aAlign); + nsresult GetAxis(nsAString *aAxis); + nsresult SetAxis(const nsAString *aAxis); + nsresult GetBgColor(nsAString *aBgColor); + nsresult SetBgColor(const nsAString *aBgColor); + nsresult GetCh(nsAString *aCh); + nsresult SetCh(const nsAString *aCh); + nsresult GetChOff(nsAString *aChOff); + nsresult SetChOff(const nsAString *aChOff); + nsresult GetColSpan(int32_t *aColSpan); + nsresult SetColSpan(int32_t aColSpan); + nsresult GetHeaders(nsAString *aHeaders); + nsresult SetHeaders(const nsAString *aHeaders); + nsresult GetHeight(nsAString *aHeight); + nsresult SetHeight(const nsAString *aHeight); + nsresult GetNoWrap(bool *aNoWrap); + nsresult SetNoWrap(bool aNoWrap); + nsresult GetRowSpan(int32_t *aRowSpan); + nsresult SetRowSpan(int32_t aRowSpan); + nsresult GetScope(nsAString *aScope); + nsresult SetScope(const nsAString *aScope); + nsresult GetVAlign(nsAString *aVAlign); + nsresult SetVAlign(const nsAString *aVAlign); + nsresult GetWidth(nsAString *aWidth); + nsresult SetWidth(const nsAString *aWidth); +} + [ object, uuid(21ffbe98-51f5-499e-8d6f-612ae798c1e1),