From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlobject.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-)
diff --git a/dlls/mshtml/htmlobject.c b/dlls/mshtml/htmlobject.c index 9ded29ffc83..fbaa7d4c7d1 100644 --- a/dlls/mshtml/htmlobject.c +++ b/dlls/mshtml/htmlobject.c @@ -722,17 +722,24 @@ static HRESULT HTMLObjectElement_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid return invoke_plugin_prop(&This->plugin_container, id, lcid, flags, params, res, ei); }
-static void HTMLObjectElement_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb) +static inline HTMLObjectElement *impl_from_DispatchEx(DispatchEx *iface) { - HTMLObjectElement *This = impl_from_HTMLDOMNode(iface); + return CONTAINING_RECORD(iface, HTMLObjectElement, plugin_container.element.node.event_target.dispex); +} + +static void HTMLObjectElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb) +{ + HTMLObjectElement *This = impl_from_DispatchEx(dispex); + HTMLDOMNode_traverse(dispex, cb);
if(This->nsobject) - note_cc_edge((nsISupports*)This->nsobject, "This->nsobject", cb); + note_cc_edge((nsISupports*)This->nsobject, "nsobject", cb); }
-static void HTMLObjectElement_unlink(HTMLDOMNode *iface) +static void HTMLObjectElement_unlink(DispatchEx *dispex) { - HTMLObjectElement *This = impl_from_HTMLDOMNode(iface); + HTMLObjectElement *This = impl_from_DispatchEx(dispex); + HTMLDOMNode_unlink(dispex); unlink_ref(&This->nsobject); }
@@ -748,8 +755,15 @@ static const NodeImplVtbl HTMLObjectElementImplVtbl = { .get_dispid = HTMLObjectElement_get_dispid, .get_name = HTMLObjectElement_dispex_get_name, .invoke = HTMLObjectElement_invoke, - .traverse = HTMLObjectElement_traverse, - .unlink = HTMLObjectElement_unlink +}; + +static const event_target_vtbl_t HTMLObjectElement_event_target_vtbl = { + { + HTMLELEMENT_DISPEX_VTBL_ENTRIES, + .traverse = HTMLObjectElement_traverse, + .unlink = HTMLObjectElement_unlink + }, + HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES, };
static const tid_t HTMLObjectElement_iface_tids[] = { @@ -760,7 +774,7 @@ static const tid_t HTMLObjectElement_iface_tids[] = { }; static dispex_static_data_t HTMLObjectElement_dispex = { "HTMLObjectElement", - &HTMLElement_event_target_vtbl.dispex_vtbl, + &HTMLObjectElement_event_target_vtbl.dispex_vtbl, DispHTMLObjectElement_tid, HTMLObjectElement_iface_tids, HTMLElement_init_dispex_info
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlselect.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-)
diff --git a/dlls/mshtml/htmlselect.c b/dlls/mshtml/htmlselect.c index ba620021822..e4e84fcd5df 100644 --- a/dlls/mshtml/htmlselect.c +++ b/dlls/mshtml/htmlselect.c @@ -360,17 +360,24 @@ static void *HTMLOptionElement_QI(HTMLDOMNode *iface, REFIID riid) return HTMLElement_QI(&This->element.node, riid); }
-static void HTMLOptionElement_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb) +static inline HTMLOptionElement *HTMLOptionElement_from_DispatchEx(DispatchEx *iface) { - HTMLOptionElement *This = HTMLOptionElement_from_HTMLDOMNode(iface); + return CONTAINING_RECORD(iface, HTMLOptionElement, element.node.event_target.dispex); +} + +static void HTMLOptionElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb) +{ + HTMLOptionElement *This = HTMLOptionElement_from_DispatchEx(dispex); + HTMLDOMNode_traverse(dispex, cb);
if(This->nsoption) - note_cc_edge((nsISupports*)This->nsoption, "This->nsoption", cb); + note_cc_edge((nsISupports*)This->nsoption, "nsoption", cb); }
-static void HTMLOptionElement_unlink(HTMLDOMNode *iface) +static void HTMLOptionElement_unlink(DispatchEx *dispex) { - HTMLOptionElement *This = HTMLOptionElement_from_HTMLDOMNode(iface); + HTMLOptionElement *This = HTMLOptionElement_from_DispatchEx(dispex); + HTMLDOMNode_unlink(dispex); unlink_ref(&This->nsoption); }
@@ -382,8 +389,15 @@ static const NodeImplVtbl HTMLOptionElementImplVtbl = { .clone = HTMLElement_clone, .handle_event = HTMLElement_handle_event, .get_attr_col = HTMLElement_get_attr_col, - .traverse = HTMLOptionElement_traverse, - .unlink = HTMLOptionElement_unlink +}; + +static const event_target_vtbl_t HTMLOptionElement_event_target_vtbl = { + { + HTMLELEMENT_DISPEX_VTBL_ENTRIES, + .traverse = HTMLOptionElement_traverse, + .unlink = HTMLOptionElement_unlink + }, + HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES, };
static const tid_t HTMLOptionElement_iface_tids[] = { @@ -393,7 +407,7 @@ static const tid_t HTMLOptionElement_iface_tids[] = { }; static dispex_static_data_t HTMLOptionElement_dispex = { "HTMLOptionElement", - &HTMLElement_event_target_vtbl.dispex_vtbl, + &HTMLOptionElement_event_target_vtbl.dispex_vtbl, DispHTMLOptionElement_tid, HTMLOptionElement_iface_tids, HTMLElement_init_dispex_info
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlscript.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-)
diff --git a/dlls/mshtml/htmlscript.c b/dlls/mshtml/htmlscript.c index 84dd77dc13d..7bedf3682c7 100644 --- a/dlls/mshtml/htmlscript.c +++ b/dlls/mshtml/htmlscript.c @@ -401,17 +401,24 @@ static HRESULT HTMLScriptElement_bind_to_tree(HTMLDOMNode *iface) return S_OK; }
-static void HTMLScriptElement_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb) +static inline HTMLScriptElement *impl_from_DispatchEx(DispatchEx *iface) { - HTMLScriptElement *This = impl_from_HTMLDOMNode(iface); + return CONTAINING_RECORD(iface, HTMLScriptElement, element.node.event_target.dispex); +} + +static void HTMLScriptElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb) +{ + HTMLScriptElement *This = impl_from_DispatchEx(dispex); + HTMLDOMNode_traverse(dispex, cb);
if(This->nsscript) - note_cc_edge((nsISupports*)This->nsscript, "This->nsscript", cb); + note_cc_edge((nsISupports*)This->nsscript, "nsscript", cb); }
-static void HTMLScriptElement_unlink(HTMLDOMNode *iface) +static void HTMLScriptElement_unlink(DispatchEx *dispex) { - HTMLScriptElement *This = impl_from_HTMLDOMNode(iface); + HTMLScriptElement *This = impl_from_DispatchEx(dispex); + HTMLDOMNode_unlink(dispex); unlink_ref(&This->nsscript); }
@@ -425,8 +432,15 @@ static const NodeImplVtbl HTMLScriptElementImplVtbl = { .get_attr_col = HTMLElement_get_attr_col, .get_readystate = HTMLScriptElement_get_readystate, .bind_to_tree = HTMLScriptElement_bind_to_tree, - .traverse = HTMLScriptElement_traverse, - .unlink = HTMLScriptElement_unlink +}; + +static const event_target_vtbl_t HTMLScriptElement_event_target_vtbl = { + { + HTMLELEMENT_DISPEX_VTBL_ENTRIES, + .traverse = HTMLScriptElement_traverse, + .unlink = HTMLScriptElement_unlink + }, + HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES, };
HRESULT script_elem_from_nsscript(nsIDOMHTMLScriptElement *nsscript, HTMLScriptElement **ret) @@ -457,7 +471,7 @@ static const tid_t HTMLScriptElement_iface_tids[] = {
static dispex_static_data_t HTMLScriptElement_dispex = { "HTMLScriptElement", - &HTMLElement_event_target_vtbl.dispex_vtbl, + &HTMLScriptElement_event_target_vtbl.dispex_vtbl, DispHTMLScriptElement_tid, HTMLScriptElement_iface_tids, HTMLElement_init_dispex_info
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlselect.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-)
diff --git a/dlls/mshtml/htmlselect.c b/dlls/mshtml/htmlselect.c index e4e84fcd5df..5c020ffe089 100644 --- a/dlls/mshtml/htmlselect.c +++ b/dlls/mshtml/htmlselect.c @@ -1406,17 +1406,24 @@ static HRESULT HTMLSelectElement_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid return S_OK; }
-static void HTMLSelectElement_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb) +static inline HTMLSelectElement *impl_from_DispatchEx(DispatchEx *iface) { - HTMLSelectElement *This = impl_from_HTMLDOMNode(iface); + return CONTAINING_RECORD(iface, HTMLSelectElement, element.node.event_target.dispex); +} + +static void HTMLSelectElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb) +{ + HTMLSelectElement *This = impl_from_DispatchEx(dispex); + HTMLDOMNode_traverse(dispex, cb);
if(This->nsselect) - note_cc_edge((nsISupports*)This->nsselect, "This->nsselect", cb); + note_cc_edge((nsISupports*)This->nsselect, "nsselect", cb); }
-static void HTMLSelectElement_unlink(HTMLDOMNode *iface) +static void HTMLSelectElement_unlink(DispatchEx *dispex) { - HTMLSelectElement *This = impl_from_HTMLDOMNode(iface); + HTMLSelectElement *This = impl_from_DispatchEx(dispex); + HTMLDOMNode_unlink(dispex); unlink_ref(&This->nsselect); }
@@ -1433,8 +1440,15 @@ static const NodeImplVtbl HTMLSelectElementImplVtbl = { .get_dispid = HTMLSelectElement_get_dispid, .get_name = HTMLSelectElement_dispex_get_name, .invoke = HTMLSelectElement_invoke, - .traverse = HTMLSelectElement_traverse, - .unlink = HTMLSelectElement_unlink +}; + +static const event_target_vtbl_t HTMLSelectElement_event_target_vtbl = { + { + HTMLELEMENT_DISPEX_VTBL_ENTRIES, + .traverse = HTMLSelectElement_traverse, + .unlink = HTMLSelectElement_unlink + }, + HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES, };
static const tid_t HTMLSelectElement_tids[] = { @@ -1445,7 +1459,7 @@ static const tid_t HTMLSelectElement_tids[] = {
static dispex_static_data_t HTMLSelectElement_dispex = { "HTMLSelectElement", - &HTMLElement_event_target_vtbl.dispex_vtbl, + &HTMLSelectElement_event_target_vtbl.dispex_vtbl, DispHTMLSelectElement_tid, HTMLSelectElement_tids, HTMLElement_init_dispex_info
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlstyleelem.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-)
diff --git a/dlls/mshtml/htmlstyleelem.c b/dlls/mshtml/htmlstyleelem.c index d030a81042d..6c7005f097e 100644 --- a/dlls/mshtml/htmlstyleelem.c +++ b/dlls/mshtml/htmlstyleelem.c @@ -389,17 +389,24 @@ static void HTMLStyleElement_destructor(HTMLDOMNode *iface) HTMLElement_destructor(iface); }
-static void HTMLStyleElement_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb) +static inline HTMLStyleElement *impl_from_DispatchEx(DispatchEx *iface) { - HTMLStyleElement *This = impl_from_HTMLDOMNode(iface); + return CONTAINING_RECORD(iface, HTMLStyleElement, element.node.event_target.dispex); +} + +static void HTMLStyleElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb) +{ + HTMLStyleElement *This = impl_from_DispatchEx(dispex); + HTMLDOMNode_traverse(dispex, cb);
if(This->nsstyle) - note_cc_edge((nsISupports*)This->nsstyle, "This->nsstyle", cb); + note_cc_edge((nsISupports*)This->nsstyle, "nsstyle", cb); }
-static void HTMLStyleElement_unlink(HTMLDOMNode *iface) +static void HTMLStyleElement_unlink(DispatchEx *dispex) { - HTMLStyleElement *This = impl_from_HTMLDOMNode(iface); + HTMLStyleElement *This = impl_from_DispatchEx(dispex); + HTMLDOMNode_unlink(dispex); unlink_ref(&This->nsstyle); }
@@ -428,8 +435,15 @@ static const NodeImplVtbl HTMLStyleElementImplVtbl = { .clone = HTMLElement_clone, .handle_event = HTMLElement_handle_event, .get_attr_col = HTMLElement_get_attr_col, - .traverse = HTMLStyleElement_traverse, - .unlink = HTMLStyleElement_unlink +}; + +static const event_target_vtbl_t HTMLStyleElement_event_target_vtbl = { + { + HTMLELEMENT_DISPEX_VTBL_ENTRIES, + .traverse = HTMLStyleElement_traverse, + .unlink = HTMLStyleElement_unlink + }, + HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES, };
static const tid_t HTMLStyleElement_iface_tids[] = { @@ -438,7 +452,7 @@ static const tid_t HTMLStyleElement_iface_tids[] = { }; static dispex_static_data_t HTMLStyleElement_dispex = { "HTMLStyleElement", - &HTMLElement_event_target_vtbl.dispex_vtbl, + &HTMLStyleElement_event_target_vtbl.dispex_vtbl, DispHTMLStyleElement_tid, HTMLStyleElement_iface_tids, HTMLStyleElement_init_dispex_info
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmltable.c | 90 ++++++++++++++++++++++++++++++----------- 1 file changed, 66 insertions(+), 24 deletions(-)
diff --git a/dlls/mshtml/htmltable.c b/dlls/mshtml/htmltable.c index 90fb255203b..c1df64198d6 100644 --- a/dlls/mshtml/htmltable.c +++ b/dlls/mshtml/htmltable.c @@ -467,17 +467,24 @@ static void HTMLTableCell_destructor(HTMLDOMNode *iface) HTMLElement_destructor(&This->element.node); }
-static void HTMLTableCell_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb) +static inline HTMLTableCell *HTMLTableCell_from_DispatchEx(DispatchEx *iface) { - HTMLTableCell *This = HTMLTableCell_from_HTMLDOMNode(iface); + return CONTAINING_RECORD(iface, HTMLTableCell, element.node.event_target.dispex); +} + +static void HTMLTableCell_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb) +{ + HTMLTableCell *This = HTMLTableCell_from_DispatchEx(dispex); + HTMLDOMNode_traverse(dispex, cb);
if(This->nscell) - note_cc_edge((nsISupports*)This->nscell, "This->nstablecell", cb); + note_cc_edge((nsISupports*)This->nscell, "nstablecell", cb); }
-static void HTMLTableCell_unlink(HTMLDOMNode *iface) +static void HTMLTableCell_unlink(DispatchEx *dispex) { - HTMLTableCell *This = HTMLTableCell_from_HTMLDOMNode(iface); + HTMLTableCell *This = HTMLTableCell_from_DispatchEx(dispex); + HTMLDOMNode_unlink(dispex); unlink_ref(&This->nscell); }
@@ -489,8 +496,15 @@ static const NodeImplVtbl HTMLTableCellImplVtbl = { .clone = HTMLElement_clone, .handle_event = HTMLElement_handle_event, .get_attr_col = HTMLElement_get_attr_col, - .traverse = HTMLTableCell_traverse, - .unlink = HTMLTableCell_unlink +}; + +static const event_target_vtbl_t HTMLTableCell_event_target_vtbl = { + { + HTMLELEMENT_DISPEX_VTBL_ENTRIES, + .traverse = HTMLTableCell_traverse, + .unlink = HTMLTableCell_unlink + }, + HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES, };
static const tid_t HTMLTableCell_iface_tids[] = { @@ -501,7 +515,7 @@ static const tid_t HTMLTableCell_iface_tids[] = {
static dispex_static_data_t HTMLTableCell_dispex = { "HTMLTableDataCellElement", - &HTMLElement_event_target_vtbl.dispex_vtbl, + &HTMLTableCell_event_target_vtbl.dispex_vtbl, DispHTMLTableCell_tid, HTMLTableCell_iface_tids, HTMLElement_init_dispex_info @@ -887,17 +901,24 @@ static void *HTMLTableRow_QI(HTMLDOMNode *iface, REFIID riid) return HTMLElement_QI(&This->element.node, riid); }
-static void HTMLTableRow_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb) +static inline HTMLTableRow *HTMLTableRow_from_DispatchEx(DispatchEx *iface) { - HTMLTableRow *This = HTMLTableRow_from_HTMLDOMNode(iface); + return CONTAINING_RECORD(iface, HTMLTableRow, element.node.event_target.dispex); +} + +static void HTMLTableRow_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb) +{ + HTMLTableRow *This = HTMLTableRow_from_DispatchEx(dispex); + HTMLDOMNode_traverse(dispex, cb);
if(This->nsrow) - note_cc_edge((nsISupports*)This->nsrow, "This->nstablerow", cb); + note_cc_edge((nsISupports*)This->nsrow, "nstablerow", cb); }
-static void HTMLTableRow_unlink(HTMLDOMNode *iface) +static void HTMLTableRow_unlink(DispatchEx *dispex) { - HTMLTableRow *This = HTMLTableRow_from_HTMLDOMNode(iface); + HTMLTableRow *This = HTMLTableRow_from_DispatchEx(dispex); + HTMLDOMNode_unlink(dispex); unlink_ref(&This->nsrow); }
@@ -909,8 +930,15 @@ static const NodeImplVtbl HTMLTableRowImplVtbl = { .clone = HTMLElement_clone, .handle_event = HTMLElement_handle_event, .get_attr_col = HTMLElement_get_attr_col, - .traverse = HTMLTableRow_traverse, - .unlink = HTMLTableRow_unlink +}; + +static const event_target_vtbl_t HTMLTableRow_event_target_vtbl = { + { + HTMLELEMENT_DISPEX_VTBL_ENTRIES, + .traverse = HTMLTableRow_traverse, + .unlink = HTMLTableRow_unlink + }, + HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES, };
static const tid_t HTMLTableRow_iface_tids[] = { @@ -921,7 +949,7 @@ static const tid_t HTMLTableRow_iface_tids[] = {
static dispex_static_data_t HTMLTableRow_dispex = { "HTMLTableRowElement", - &HTMLElement_event_target_vtbl.dispex_vtbl, + &HTMLTableRow_event_target_vtbl.dispex_vtbl, DispHTMLTableRow_tid, HTMLTableRow_iface_tids, HTMLElement_init_dispex_info @@ -1885,17 +1913,24 @@ static void *HTMLTable_QI(HTMLDOMNode *iface, REFIID riid) return HTMLElement_QI(&This->element.node, riid); }
-static void HTMLTable_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb) +static inline HTMLTable *impl_from_DispatchEx(DispatchEx *iface) { - HTMLTable *This = impl_from_HTMLDOMNode(iface); + return CONTAINING_RECORD(iface, HTMLTable, element.node.event_target.dispex); +} + +static void HTMLTable_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb) +{ + HTMLTable *This = impl_from_DispatchEx(dispex); + HTMLDOMNode_traverse(dispex, cb);
if(This->nstable) - note_cc_edge((nsISupports*)This->nstable, "This->nstable", cb); + note_cc_edge((nsISupports*)This->nstable, "nstable", cb); }
-static void HTMLTable_unlink(HTMLDOMNode *iface) +static void HTMLTable_unlink(DispatchEx *dispex) { - HTMLTable *This = impl_from_HTMLDOMNode(iface); + HTMLTable *This = impl_from_DispatchEx(dispex); + HTMLDOMNode_unlink(dispex); unlink_ref(&This->nstable); }
@@ -1913,8 +1948,15 @@ static const NodeImplVtbl HTMLTableImplVtbl = { .clone = HTMLElement_clone, .handle_event = HTMLElement_handle_event, .get_attr_col = HTMLElement_get_attr_col, - .traverse = HTMLTable_traverse, - .unlink = HTMLTable_unlink +}; + +static const event_target_vtbl_t HTMLTable_event_target_vtbl = { + { + HTMLELEMENT_DISPEX_VTBL_ENTRIES, + .traverse = HTMLTable_traverse, + .unlink = HTMLTable_unlink + }, + HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES, };
static const tid_t HTMLTable_iface_tids[] = { @@ -1927,7 +1969,7 @@ static const tid_t HTMLTable_iface_tids[] = {
static dispex_static_data_t HTMLTable_dispex = { "HTMLTableElement", - &HTMLElement_event_target_vtbl.dispex_vtbl, + &HTMLTable_event_target_vtbl.dispex_vtbl, DispHTMLTable_tid, HTMLTable_iface_tids, HTMLElement_init_dispex_info
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmltextarea.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-)
diff --git a/dlls/mshtml/htmltextarea.c b/dlls/mshtml/htmltextarea.c index bde78211773..7aa3f9dbb67 100644 --- a/dlls/mshtml/htmltextarea.c +++ b/dlls/mshtml/htmltextarea.c @@ -421,17 +421,24 @@ static BOOL HTMLTextAreaElement_is_text_edit(HTMLDOMNode *iface) return TRUE; }
-static void HTMLTextAreaElement_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb) +static inline HTMLTextAreaElement *impl_from_DispatchEx(DispatchEx *iface) { - HTMLTextAreaElement *This = impl_from_HTMLDOMNode(iface); + return CONTAINING_RECORD(iface, HTMLTextAreaElement, element.node.event_target.dispex); +} + +static void HTMLTextAreaElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb) +{ + HTMLTextAreaElement *This = impl_from_DispatchEx(dispex); + HTMLDOMNode_traverse(dispex, cb);
if(This->nstextarea) - note_cc_edge((nsISupports*)This->nstextarea, "This->nstextarea", cb); + note_cc_edge((nsISupports*)This->nstextarea, "nstextarea", cb); }
-static void HTMLTextAreaElement_unlink(HTMLDOMNode *iface) +static void HTMLTextAreaElement_unlink(DispatchEx *dispex) { - HTMLTextAreaElement *This = impl_from_HTMLDOMNode(iface); + HTMLTextAreaElement *This = impl_from_DispatchEx(dispex); + HTMLDOMNode_unlink(dispex); unlink_ref(&This->nstextarea); }
@@ -445,11 +452,18 @@ static const NodeImplVtbl HTMLTextAreaElementImplVtbl = { .get_attr_col = HTMLElement_get_attr_col, .put_disabled = HTMLTextAreaElementImpl_put_disabled, .get_disabled = HTMLTextAreaElementImpl_get_disabled, - .traverse = HTMLTextAreaElement_traverse, - .unlink = HTMLTextAreaElement_unlink, .is_text_edit = HTMLTextAreaElement_is_text_edit };
+static const event_target_vtbl_t HTMLTextAreaElement_event_target_vtbl = { + { + HTMLELEMENT_DISPEX_VTBL_ENTRIES, + .traverse = HTMLTextAreaElement_traverse, + .unlink = HTMLTextAreaElement_unlink + }, + HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES, +}; + static const tid_t HTMLTextAreaElement_iface_tids[] = { HTMLELEMENT_TIDS, IHTMLTextAreaElement_tid, @@ -458,7 +472,7 @@ static const tid_t HTMLTextAreaElement_iface_tids[] = {
static dispex_static_data_t HTMLTextAreaElement_dispex = { "HTMLTextAreaElement", - &HTMLElement_event_target_vtbl.dispex_vtbl, + &HTMLTextAreaElement_event_target_vtbl.dispex_vtbl, DispHTMLTextAreaElement_tid, HTMLTextAreaElement_iface_tids, HTMLElement_init_dispex_info
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmldoc.c | 40 +++++++++++++++--------------------- dlls/mshtml/htmlnode.c | 5 ----- dlls/mshtml/mshtml_private.h | 2 -- 3 files changed, 16 insertions(+), 31 deletions(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index bff2452f4cd..f5c9bf8ed1a 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -5843,26 +5843,12 @@ static HRESULT HTMLDocumentNode_clone(HTMLDOMNode *iface, nsIDOMNode *nsnode, HT return E_NOTIMPL; }
-static void HTMLDocumentNode_unlink(HTMLDOMNode *iface) -{ - HTMLDocumentNode *This = impl_from_HTMLDOMNode(iface); - - if(This->dom_document) { - release_document_mutation(This); - detach_document_node(This); - This->dom_document = NULL; - This->html_document = NULL; - This->window = NULL; - } -} - static const NodeImplVtbl HTMLDocumentNodeImplVtbl = { .clsid = &CLSID_HTMLDocument, .qi = HTMLDocumentNode_QI, .destructor = HTMLDocumentNode_destructor, .cpc_entries = HTMLDocumentNode_cpc, .clone = HTMLDocumentNode_clone, - .unlink = HTMLDocumentNode_unlink };
static HRESULT HTMLDocumentFragment_clone(HTMLDOMNode *iface, nsIDOMNode *nsnode, HTMLDOMNode **ret) @@ -5879,11 +5865,23 @@ static HRESULT HTMLDocumentFragment_clone(HTMLDOMNode *iface, nsIDOMNode *nsnode return S_OK; }
-static void HTMLDocumentFragment_unlink(HTMLDOMNode *iface) +static inline HTMLDocumentNode *impl_from_DispatchEx(DispatchEx *iface) { - HTMLDocumentNode *This = impl_from_HTMLDOMNode(iface); + return CONTAINING_RECORD(iface, HTMLDocumentNode, node.event_target.dispex); +}
- if(This->window) { +static void HTMLDocumentNode_unlink(DispatchEx *dispex) +{ + HTMLDocumentNode *This = impl_from_DispatchEx(dispex); + HTMLDOMNode_unlink(dispex); + + if(This->dom_document) { + release_document_mutation(This); + detach_document_node(This); + This->dom_document = NULL; + This->html_document = NULL; + This->window = NULL; + }else if(This->window) { detach_document_node(This);
/* document fragments own reference to inner window */ @@ -5892,11 +5890,6 @@ static void HTMLDocumentFragment_unlink(HTMLDOMNode *iface) } }
-static inline HTMLDocumentNode *impl_from_DispatchEx(DispatchEx *iface) -{ - return CONTAINING_RECORD(iface, HTMLDocumentNode, node.event_target.dispex); -} - static HRESULT HTMLDocumentNode_get_name(DispatchEx *dispex, DISPID id, BSTR *name) { HTMLDocumentNode *This = impl_from_DispatchEx(dispex); @@ -6071,7 +6064,7 @@ static const event_target_vtbl_t HTMLDocumentNode_event_target_vtbl = { .query_interface = HTMLDOMNode_query_interface, .destructor = HTMLDOMNode_destructor, .traverse = HTMLDOMNode_traverse, - .unlink = HTMLDOMNode_unlink, + .unlink = HTMLDocumentNode_unlink, .get_name = HTMLDocumentNode_get_name, .invoke = HTMLDocumentNode_invoke, .next_dispid = HTMLDocumentNode_next_dispid, @@ -6090,7 +6083,6 @@ static const NodeImplVtbl HTMLDocumentFragmentImplVtbl = { .destructor = HTMLDocumentNode_destructor, .cpc_entries = HTMLDocumentNode_cpc, .clone = HTMLDocumentFragment_clone, - .unlink = HTMLDocumentFragment_unlink };
static const tid_t HTMLDocumentNode_iface_tids[] = { diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c index 407142f828c..a2bec6126ba 100644 --- a/dlls/mshtml/htmlnode.c +++ b/dlls/mshtml/htmlnode.c @@ -1414,8 +1414,6 @@ void HTMLDOMNode_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback { HTMLDOMNode *This = HTMLDOMNode_from_DispatchEx(dispex);
- if(This->vtbl->traverse) - This->vtbl->traverse(This, cb); if(This->nsnode) note_cc_edge((nsISupports*)This->nsnode, "nsnode", cb); if(This->doc && &This->doc->node != This) @@ -1426,9 +1424,6 @@ void HTMLDOMNode_unlink(DispatchEx *dispex) { HTMLDOMNode *This = HTMLDOMNode_from_DispatchEx(dispex);
- if(This->vtbl->unlink) - This->vtbl->unlink(This); - release_event_target(&This->event_target); unlink_ref(&This->nsnode);
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index d185961acf6..41034f42636 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -828,8 +828,6 @@ typedef struct { HRESULT (*get_name)(HTMLDOMNode*,DISPID,BSTR*); HRESULT (*invoke)(HTMLDOMNode*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*); HRESULT (*bind_to_tree)(HTMLDOMNode*); - void (*traverse)(HTMLDOMNode*,nsCycleCollectionTraversalCallback*); - void (*unlink)(HTMLDOMNode*); BOOL (*is_text_edit)(HTMLDOMNode*); BOOL (*is_settable)(HTMLDOMNode*,DISPID); } NodeImplVtbl;
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=137427
Your paranoid android.
=== debian11b (64 bit WoW report) ===
uiautomationcore: uiautomation.c:14704: Test failed: Wait for event_handle failed. uiautomation.c:14705: Test failed: expected uia_event_callback uiautomation.c:15296: Test failed: 2 failures in child process
This merge request was approved by Jacek Caban.