Module: wine Branch: master Commit: 71f0ea7e1fb48b567a116a82e3c8ef960798318f URL: https://gitlab.winehq.org/wine/wine/-/commit/71f0ea7e1fb48b567a116a82e3c8ef9...
Author: Gabriel Ivăncescu gabrielopcode@gmail.com Date: Fri Sep 15 16:54:17 2023 +0300
mshtml: Traverse and unlink TextAreaElements using the dispex.
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