From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmltable.c | 26 +++++++++++++++++--------- dlls/mshtml/mshtml_private.h | 2 ++ dlls/mshtml/tests/documentmode.js | 3 +++ 3 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/dlls/mshtml/htmltable.c b/dlls/mshtml/htmltable.c index be79b82e5fb..64edc89fd41 100644 --- a/dlls/mshtml/htmltable.c +++ b/dlls/mshtml/htmltable.c @@ -430,7 +430,13 @@ static const NodeImplVtbl HTMLTableCellImplVtbl = { .get_attr_col = HTMLElement_get_attr_col, };
-static const event_target_vtbl_t HTMLTableCell_event_target_vtbl = { +dispex_static_data_t HTMLTableCellElement_dispex = { + .name = "HTMLTableCellElement", + .id = PROT_HTMLTableCellElement, + .prototype_id = PROT_HTMLElement, +}; + +static const event_target_vtbl_t HTMLTableDataCellElement_event_target_vtbl = { { HTMLELEMENT_DISPEX_VTBL_ENTRIES, .query_interface= HTMLTableCell_query_interface, @@ -442,18 +448,20 @@ static const event_target_vtbl_t HTMLTableCell_event_target_vtbl = { .handle_event = HTMLElement_handle_event };
-static const tid_t HTMLTableCell_iface_tids[] = { +static const tid_t HTMLTableDataCellElement_iface_tids[] = { HTMLELEMENT_TIDS, IHTMLTableCell_tid, 0 };
-static dispex_static_data_t HTMLTableCell_dispex = { - "HTMLTableDataCellElement", - &HTMLTableCell_event_target_vtbl.dispex_vtbl, - DispHTMLTableCell_tid, - HTMLTableCell_iface_tids, - HTMLElement_init_dispex_info +dispex_static_data_t HTMLTableDataCellElement_dispex = { + .name = "HTMLTableDataCellElement", + .id = PROT_HTMLTableDataCellElement, + .prototype_id = PROT_HTMLTableCellElement, + .vtbl = &HTMLTableDataCellElement_event_target_vtbl.dispex_vtbl, + .disp_tid = DispHTMLTableCell_tid, + .iface_tids = HTMLTableDataCellElement_iface_tids, + .init_info = HTMLElement_init_dispex_info, };
HRESULT HTMLTableCell_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem) @@ -468,7 +476,7 @@ HRESULT HTMLTableCell_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLE ret->IHTMLTableCell_iface.lpVtbl = &HTMLTableCellVtbl; ret->element.node.vtbl = &HTMLTableCellImplVtbl;
- HTMLElement_Init(&ret->element, doc, nselem, &HTMLTableCell_dispex); + HTMLElement_Init(&ret->element, doc, nselem, &HTMLTableDataCellElement_dispex);
nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLTableCellElement, (void**)&ret->nscell); assert(nsres == NS_OK); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index f8c16162862..5b73ddc967a 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -432,6 +432,8 @@ typedef struct { X(HTMLScriptElement) \ X(HTMLSelectElement) \ X(HTMLStyleElement) \ + X(HTMLTableCellElement) \ + X(HTMLTableDataCellElement) \ X(HTMLTableElement) \ X(HTMLTableRowElement) \ X(HTMLTitleElement) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index c170addbad4..a6684be69dc 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3190,4 +3190,7 @@ sync_test("prototypes", function() { check(HTMLTableElement.prototype, HTMLElement.prototype, "table element prototype"); check(document.createElement("tr"), HTMLTableRowElement.prototype, "tr element"); check(HTMLTableRowElement.prototype, HTMLElement.prototype, "tr element prototype"); + check(document.createElement("td"), HTMLTableDataCellElement.prototype, "td element"); + check(HTMLTableDataCellElement.prototype, HTMLTableCellElement.prototype, "td element prototype"); + check(HTMLTableCellElement.prototype, HTMLElement.prototype, "table cell prototype"); });