Module: wine Branch: master Commit: d31e95a7a7a07398f7424aa593f6429babc2eb39 URL: https://gitlab.winehq.org/wine/wine/-/commit/d31e95a7a7a07398f7424aa593f6429...
Author: Gabriel Ivăncescu gabrielopcode@gmail.com Date: Tue Sep 19 17:26:14 2023 +0300
mshtml: Use specific dispex vtbls for remaining HTML elements.
Will be needed when we move the query_interface to the dispex.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com
---
dlls/mshtml/htmlcomment.c | 11 ++++++++++- dlls/mshtml/htmlelem.c | 2 +- dlls/mshtml/htmlevent.h | 1 - dlls/mshtml/htmlgeneric.c | 11 ++++++++++- dlls/mshtml/htmlhead.c | 44 ++++++++++++++++++++++++++++++++++++++++---- dlls/mshtml/htmlinput.c | 11 ++++++++++- dlls/mshtml/htmlobject.c | 11 ++++++++++- 7 files changed, 81 insertions(+), 10 deletions(-)
diff --git a/dlls/mshtml/htmlcomment.c b/dlls/mshtml/htmlcomment.c index 9c720d9468e..7fd611c727c 100644 --- a/dlls/mshtml/htmlcomment.c +++ b/dlls/mshtml/htmlcomment.c @@ -180,6 +180,15 @@ static const NodeImplVtbl HTMLCommentElementImplVtbl = { .get_attr_col = HTMLElement_get_attr_col };
+static const event_target_vtbl_t HTMLCommentElement_event_target_vtbl = { + { + HTMLELEMENT_DISPEX_VTBL_ENTRIES, + .traverse = HTMLDOMNode_traverse, + .unlink = HTMLDOMNode_unlink + }, + HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES, +}; + static const tid_t HTMLCommentElement_iface_tids[] = { HTMLELEMENT_TIDS, IHTMLCommentElement_tid, @@ -187,7 +196,7 @@ static const tid_t HTMLCommentElement_iface_tids[] = { }; static dispex_static_data_t HTMLCommentElement_dispex = { "Comment", - &HTMLElement_event_target_vtbl.dispex_vtbl, + &HTMLCommentElement_event_target_vtbl.dispex_vtbl, DispHTMLCommentElement_tid, HTMLCommentElement_iface_tids, HTMLElement_init_dispex_info diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 314b85b8a72..e10c5067d33 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -7319,7 +7319,7 @@ static const tid_t HTMLElement_iface_tids[] = { 0 };
-const event_target_vtbl_t HTMLElement_event_target_vtbl = { +static const event_target_vtbl_t HTMLElement_event_target_vtbl = { { HTMLELEMENT_DISPEX_VTBL_ENTRIES, .traverse = HTMLDOMNode_traverse, diff --git a/dlls/mshtml/htmlevent.h b/dlls/mshtml/htmlevent.h index d8ff8db2d74..083d1ec46cf 100644 --- a/dlls/mshtml/htmlevent.h +++ b/dlls/mshtml/htmlevent.h @@ -135,7 +135,6 @@ typedef struct { IHTMLEventObj *(*set_current_event)(DispatchEx*,IHTMLEventObj*); } event_target_vtbl_t;
-extern const event_target_vtbl_t HTMLElement_event_target_vtbl; IHTMLEventObj *default_set_current_event(HTMLInnerWindow*,IHTMLEventObj*);
nsISupports *HTMLElement_get_gecko_target(DispatchEx*); diff --git a/dlls/mshtml/htmlgeneric.c b/dlls/mshtml/htmlgeneric.c index 5f069e05f67..2aefcc02af5 100644 --- a/dlls/mshtml/htmlgeneric.c +++ b/dlls/mshtml/htmlgeneric.c @@ -148,6 +148,15 @@ static const NodeImplVtbl HTMLGenericElementImplVtbl = { .get_attr_col = HTMLElement_get_attr_col };
+static const event_target_vtbl_t HTMLGenericElement_event_target_vtbl = { + { + HTMLELEMENT_DISPEX_VTBL_ENTRIES, + .traverse = HTMLDOMNode_traverse, + .unlink = HTMLDOMNode_unlink + }, + HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES, +}; + static const tid_t HTMLGenericElement_iface_tids[] = { HTMLELEMENT_TIDS, IHTMLGenericElement_tid, @@ -156,7 +165,7 @@ static const tid_t HTMLGenericElement_iface_tids[] = {
static dispex_static_data_t HTMLGenericElement_dispex = { "HTMLUnknownElement", - &HTMLElement_event_target_vtbl.dispex_vtbl, + &HTMLGenericElement_event_target_vtbl.dispex_vtbl, DispHTMLGenericElement_tid, HTMLGenericElement_iface_tids, HTMLElement_init_dispex_info diff --git a/dlls/mshtml/htmlhead.c b/dlls/mshtml/htmlhead.c index af17a35dbb7..897a58edc3c 100644 --- a/dlls/mshtml/htmlhead.c +++ b/dlls/mshtml/htmlhead.c @@ -166,6 +166,15 @@ static const NodeImplVtbl HTMLTitleElementImplVtbl = { .get_attr_col = HTMLElement_get_attr_col };
+static const event_target_vtbl_t HTMLTitleElement_event_target_vtbl = { + { + HTMLELEMENT_DISPEX_VTBL_ENTRIES, + .traverse = HTMLDOMNode_traverse, + .unlink = HTMLDOMNode_unlink + }, + HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES, +}; + static const tid_t HTMLTitleElement_iface_tids[] = { HTMLELEMENT_TIDS, IHTMLTitleElement_tid, @@ -173,7 +182,7 @@ static const tid_t HTMLTitleElement_iface_tids[] = { }; static dispex_static_data_t HTMLTitleElement_dispex = { "HTMLTitleElement", - &HTMLElement_event_target_vtbl.dispex_vtbl, + &HTMLTitleElement_event_target_vtbl.dispex_vtbl, DispHTMLTitleElement_tid, HTMLTitleElement_iface_tids, HTMLElement_init_dispex_info @@ -327,6 +336,15 @@ static const NodeImplVtbl HTMLHtmlElementImplVtbl = { .is_settable = HTMLHtmlElement_is_settable };
+static const event_target_vtbl_t HTMLHtmlElement_event_target_vtbl = { + { + HTMLELEMENT_DISPEX_VTBL_ENTRIES, + .traverse = HTMLDOMNode_traverse, + .unlink = HTMLDOMNode_unlink + }, + HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES, +}; + static const tid_t HTMLHtmlElement_iface_tids[] = { HTMLELEMENT_TIDS, IHTMLHtmlElement_tid, @@ -334,7 +352,7 @@ static const tid_t HTMLHtmlElement_iface_tids[] = { }; static dispex_static_data_t HTMLHtmlElement_dispex = { "HTMLHtmlElement", - &HTMLElement_event_target_vtbl.dispex_vtbl, + &HTMLHtmlElement_event_target_vtbl.dispex_vtbl, DispHTMLHtmlElement_tid, HTMLHtmlElement_iface_tids, HTMLElement_init_dispex_info @@ -549,6 +567,15 @@ static const NodeImplVtbl HTMLMetaElementImplVtbl = { .get_attr_col = HTMLElement_get_attr_col };
+static const event_target_vtbl_t HTMLMetaElement_event_target_vtbl = { + { + HTMLELEMENT_DISPEX_VTBL_ENTRIES, + .traverse = HTMLDOMNode_traverse, + .unlink = HTMLDOMNode_unlink + }, + HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES, +}; + static const tid_t HTMLMetaElement_iface_tids[] = { HTMLELEMENT_TIDS, IHTMLMetaElement_tid, @@ -557,7 +584,7 @@ static const tid_t HTMLMetaElement_iface_tids[] = {
static dispex_static_data_t HTMLMetaElement_dispex = { "HTMLMetaElement", - &HTMLElement_event_target_vtbl.dispex_vtbl, + &HTMLMetaElement_event_target_vtbl.dispex_vtbl, DispHTMLMetaElement_tid, HTMLMetaElement_iface_tids, HTMLElement_init_dispex_info @@ -702,6 +729,15 @@ static const NodeImplVtbl HTMLHeadElementImplVtbl = { .get_attr_col = HTMLElement_get_attr_col };
+static const event_target_vtbl_t HTMLHeadElement_event_target_vtbl = { + { + HTMLELEMENT_DISPEX_VTBL_ENTRIES, + .traverse = HTMLDOMNode_traverse, + .unlink = HTMLDOMNode_unlink + }, + HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES, +}; + static const tid_t HTMLHeadElement_iface_tids[] = { HTMLELEMENT_TIDS, IHTMLHeadElement_tid, @@ -709,7 +745,7 @@ static const tid_t HTMLHeadElement_iface_tids[] = { }; static dispex_static_data_t HTMLHeadElement_dispex = { "HTMLHeadElement", - &HTMLElement_event_target_vtbl.dispex_vtbl, + &HTMLHeadElement_event_target_vtbl.dispex_vtbl, DispHTMLHeadElement_tid, HTMLHeadElement_iface_tids, HTMLElement_init_dispex_info diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c index c6527309b8c..b952e52ca13 100644 --- a/dlls/mshtml/htmlinput.c +++ b/dlls/mshtml/htmlinput.c @@ -1625,6 +1625,15 @@ static const NodeImplVtbl HTMLLabelElementImplVtbl = { .get_attr_col = HTMLElement_get_attr_col, };
+static const event_target_vtbl_t HTMLLabelElement_event_target_vtbl = { + { + HTMLELEMENT_DISPEX_VTBL_ENTRIES, + .traverse = HTMLDOMNode_traverse, + .unlink = HTMLDOMNode_unlink + }, + HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES, +}; + static const tid_t HTMLLabelElement_iface_tids[] = { HTMLELEMENT_TIDS, IHTMLLabelElement_tid, @@ -1633,7 +1642,7 @@ static const tid_t HTMLLabelElement_iface_tids[] = {
static dispex_static_data_t HTMLLabelElement_dispex = { "HTMLLabelElement", - &HTMLElement_event_target_vtbl.dispex_vtbl, + &HTMLLabelElement_event_target_vtbl.dispex_vtbl, DispHTMLLabelElement_tid, HTMLLabelElement_iface_tids, HTMLElement_init_dispex_info diff --git a/dlls/mshtml/htmlobject.c b/dlls/mshtml/htmlobject.c index 6e903a0e97e..0e5c876538c 100644 --- a/dlls/mshtml/htmlobject.c +++ b/dlls/mshtml/htmlobject.c @@ -1016,6 +1016,15 @@ static const NodeImplVtbl HTMLEmbedElementImplVtbl = { .get_attr_col = HTMLElement_get_attr_col };
+static const event_target_vtbl_t HTMLEmbedElement_event_target_vtbl = { + { + HTMLELEMENT_DISPEX_VTBL_ENTRIES, + .traverse = HTMLDOMNode_traverse, + .unlink = HTMLDOMNode_unlink + }, + HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES, +}; + static const tid_t HTMLEmbedElement_iface_tids[] = { HTMLELEMENT_TIDS, IHTMLEmbedElement_tid, @@ -1023,7 +1032,7 @@ static const tid_t HTMLEmbedElement_iface_tids[] = { }; static dispex_static_data_t HTMLEmbedElement_dispex = { "HTMLEmbedElement", - &HTMLElement_event_target_vtbl.dispex_vtbl, + &HTMLEmbedElement_event_target_vtbl.dispex_vtbl, DispHTMLEmbed_tid, HTMLEmbedElement_iface_tids, HTMLElement_init_dispex_info