From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlevent.c | 16 ++++++++-------- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/documentmode.js | 4 ++++ 3 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index ba30eb41f53..c0ad93facb3 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -1802,17 +1802,17 @@ static const dispex_static_data_vtbl_t HTMLEventObj_dispex_vtbl = { .unlink = HTMLEventObj_unlink };
-static const tid_t HTMLEventObj_iface_tids[] = { +static const tid_t MSEventObj_iface_tids[] = { IHTMLEventObj5_tid, IHTMLEventObj_tid, 0 };
-static dispex_static_data_t HTMLEventObj_dispex = { - "MSEventObj", - &HTMLEventObj_dispex_vtbl, - DispCEventObj_tid, - HTMLEventObj_iface_tids +dispex_static_data_t MSEventObj_dispex = { + .id = PROT_MSEventObj, + .vtbl = &HTMLEventObj_dispex_vtbl, + .disp_tid = DispCEventObj_tid, + .iface_tids = MSEventObj_iface_tids, };
static HTMLEventObj *alloc_event_obj(DOMEvent *event, HTMLInnerWindow *script_global) @@ -1832,9 +1832,9 @@ static HTMLEventObj *alloc_event_obj(DOMEvent *event, HTMLInnerWindow *script_gl event_obj->event = event; if(event) { IDOMEvent_AddRef(&event->IDOMEvent_iface); - init_dispatch_with_owner(&event_obj->dispex, &HTMLEventObj_dispex, &event->dispex); + init_dispatch_with_owner(&event_obj->dispex, &MSEventObj_dispex, &event->dispex); }else { - init_dispatch(&event_obj->dispex, &HTMLEventObj_dispex, script_global, + init_dispatch(&event_obj->dispex, &MSEventObj_dispex, script_global, dispex_compat_mode(&script_global->event_target.dispex)); } return event_obj; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 6a3d1e5c639..f600917187b 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -448,6 +448,7 @@ typedef struct { X(MSCSSProperties) \ X(MSCSSRuleList) \ X(MSCurrentStyleCSSProperties) \ + X(MSEventObj) \ X(MSStyleCSSProperties) \ X(MutationObserver) \ X(Navigator) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index c2230f61ce2..a4893e8f71e 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3237,4 +3237,8 @@ sync_test("prototypes", function() { check(CSSRule.prototype, Object.prototype, "css rule prototype"); check(document.body.getBoundingClientRect(), ClientRect.prototype, "rect"); check(ClientRect.prototype, Object.prototype, "rect prototype"); + if(v < 11) { + check(document.createEventObject(), MSEventObj.prototype, "event obj"); + check(MSEventObj.prototype, Object.prototype, "event obj prototype"); + } });