Zhenbo Li : mshtml: Added nsIDOMHTMLTableCellElement declaration.

Alexandre Julliard julliard at winehq.org
Mon May 19 15:09:59 CDT 2014


Module: wine
Branch: master
Commit: efc6a564cdd6b0af6f7c63094d1a2f6d45dafa71
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=efc6a564cdd6b0af6f7c63094d1a2f6d45dafa71

Author: Zhenbo Li <litimetal at gmail.com>
Date:   Sat May 17 21:39:55 2014 +0800

mshtml: Added nsIDOMHTMLTableCellElement declaration.

---

 dlls/mshtml/htmltablecell.c |   10 ++++++++++
 dlls/mshtml/nsiface.idl     |   38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/dlls/mshtml/htmltablecell.c b/dlls/mshtml/htmltablecell.c
index 7bfcf99..7b8d2fc 100644
--- a/dlls/mshtml/htmltablecell.c
+++ b/dlls/mshtml/htmltablecell.c
@@ -17,6 +17,7 @@
  */
 
 #include <stdarg.h>
+#include <assert.h>
 
 #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 9182c19..89a9740 100644
--- a/dlls/mshtml/nsiface.idl
+++ b/dlls/mshtml/nsiface.idl
@@ -2072,6 +2072,44 @@ interface nsIDOMHTMLTableRowElement : nsIDOMHTMLElement
 
 [
     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),
     local
 ]




More information about the wine-cvs mailing list