Gabriel Ivăncescu : mshtml: Move some AreaElement methods up.
Module: wine Branch: master Commit: 0593b1d27935df77435ffa6be6eaaaa260f86cca URL: https://gitlab.winehq.org/wine/wine/-/commit/0593b1d27935df77435ffa6be6eaaaa... Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Mon Sep 18 18:00:53 2023 +0300 mshtml: Move some AreaElement methods up. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/htmlarea.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/dlls/mshtml/htmlarea.c b/dlls/mshtml/htmlarea.c index fd810a0baa1..3a3f8c7c57b 100644 --- a/dlls/mshtml/htmlarea.c +++ b/dlls/mshtml/htmlarea.c @@ -413,6 +413,11 @@ static inline HTMLAreaElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface) return CONTAINING_RECORD(iface, HTMLAreaElement, element.node); } +static inline HTMLAreaElement *impl_from_DispatchEx(DispatchEx *iface) +{ + return CONTAINING_RECORD(iface, HTMLAreaElement, element.node.event_target.dispex); +} + static void *HTMLAreaElement_QI(HTMLDOMNode *iface, REFIID riid) { HTMLAreaElement *This = impl_from_HTMLDOMNode(iface); @@ -423,6 +428,22 @@ static void *HTMLAreaElement_QI(HTMLDOMNode *iface, REFIID riid) return HTMLElement_QI(&This->element.node, riid); } +static void HTMLAreaElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb) +{ + HTMLAreaElement *This = impl_from_DispatchEx(dispex); + HTMLDOMNode_traverse(dispex, cb); + + if(This->nsarea) + note_cc_edge((nsISupports*)This->nsarea, "nsarea", cb); +} + +static void HTMLAreaElement_unlink(DispatchEx *dispex) +{ + HTMLAreaElement *This = impl_from_DispatchEx(dispex); + HTMLDOMNode_unlink(dispex); + unlink_ref(&This->nsarea); +} + static HRESULT HTMLAreaElement_handle_event(HTMLDOMNode *iface, DWORD eid, nsIDOMEvent *event, BOOL *prevent_default) { HTMLAreaElement *This = impl_from_HTMLDOMNode(iface); @@ -454,27 +475,6 @@ fallback: return HTMLElement_handle_event(&This->element.node, eid, event, prevent_default); } -static inline HTMLAreaElement *impl_from_DispatchEx(DispatchEx *iface) -{ - return CONTAINING_RECORD(iface, HTMLAreaElement, element.node.event_target.dispex); -} - -static void HTMLAreaElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb) -{ - HTMLAreaElement *This = impl_from_DispatchEx(dispex); - HTMLDOMNode_traverse(dispex, cb); - - if(This->nsarea) - note_cc_edge((nsISupports*)This->nsarea, "nsarea", cb); -} - -static void HTMLAreaElement_unlink(DispatchEx *dispex) -{ - HTMLAreaElement *This = impl_from_DispatchEx(dispex); - HTMLDOMNode_unlink(dispex); - unlink_ref(&This->nsarea); -} - static const NodeImplVtbl HTMLAreaElementImplVtbl = { .clsid = &CLSID_HTMLAreaElement, .qi = HTMLAreaElement_QI,
participants (1)
-
Alexandre Julliard