From: Jacek Caban <jacek(a)codeweavers.com> --- dlls/mshtml/htmlimg.c | 16 +++++++++------- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/documentmode.js | 2 ++ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/dlls/mshtml/htmlimg.c b/dlls/mshtml/htmlimg.c index fb3be13b918..9295c5cc2e2 100644 --- a/dlls/mshtml/htmlimg.c +++ b/dlls/mshtml/htmlimg.c @@ -683,12 +683,14 @@ static void HTMLImgElement_init_dispex_info(dispex_data_t *info, compat_mode_t m dispex_info_add_interface(info, IHTMLImgElement_tid, mode >= COMPAT_MODE_IE11 ? img_ie11_hooks : NULL); } -static dispex_static_data_t HTMLImgElement_dispex = { - "HTMLImageElement", - &HTMLImgElement_event_target_vtbl.dispex_vtbl, - DispHTMLImg_tid, - HTMLImgElement_iface_tids, - HTMLImgElement_init_dispex_info +dispex_static_data_t HTMLImageElement_dispex = { + .name = "HTMLImageElement", + .id = PROT_HTMLImageElement, + .prototype_id = PROT_HTMLElement, + .vtbl = &HTMLImgElement_event_target_vtbl.dispex_vtbl, + .disp_tid = DispHTMLImg_tid, + .iface_tids = HTMLImgElement_iface_tids, + .init_info = HTMLImgElement_init_dispex_info, }; HRESULT HTMLImgElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem) @@ -703,7 +705,7 @@ HRESULT HTMLImgElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTML ret->IHTMLImgElement_iface.lpVtbl = &HTMLImgElementVtbl; ret->element.node.vtbl = &HTMLImgElementImplVtbl; - HTMLElement_Init(&ret->element, doc, nselem, &HTMLImgElement_dispex); + HTMLElement_Init(&ret->element, doc, nselem, &HTMLImageElement_dispex); nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLImageElement, (void**)&ret->nsimg); assert(nsres == NS_OK); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index e5f842a2f4d..21b2866de2c 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -413,6 +413,7 @@ typedef struct { X(HTMLBodyElement) \ X(HTMLDocument) \ X(HTMLElement) \ + X(HTMLImageElement) \ X(Navigator) \ X(Node) \ X(Storage) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 08e2daeff1e..40dc74ccfcf 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3136,4 +3136,6 @@ sync_test("prototypes", function() { } check(window, Window.prototype, "window"); check(Window.prototype, Object.prototype, "window prototype"); + check(document.createElement("img"), HTMLImageElement.prototype, "img elem"); + check(HTMLImageElement.prototype, HTMLElement.prototype, "img elem prototype"); }); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6212