From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlevent.c | 15 ++++++++------- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/documentmode.js | 2 ++ 3 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 274dcb7e0dd..8839580cfd8 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -3682,17 +3682,18 @@ static const dispex_static_data_vtbl_t DOMCustomEvent_dispex_vtbl = { .unlink = DOMCustomEvent_unlink };
-static const tid_t DOMCustomEvent_iface_tids[] = { +static const tid_t CustomEvent_iface_tids[] = { IDOMEvent_tid, IDOMCustomEvent_tid, 0 };
-static dispex_static_data_t DOMCustomEvent_dispex = { - "CustomEvent", - &DOMCustomEvent_dispex_vtbl, - DispDOMCustomEvent_tid, - DOMCustomEvent_iface_tids +dispex_static_data_t CustomEvent_dispex = { + .id = PROT_CustomEvent, + .prototype_id = PROT_Event, + .vtbl = &DOMCustomEvent_dispex_vtbl, + .disp_tid = DispDOMCustomEvent_tid, + .iface_tids = CustomEvent_iface_tids, };
static const dispex_static_data_vtbl_t DOMMessageEvent_dispex_vtbl = { @@ -3839,7 +3840,7 @@ static DOMEvent *page_transition_event_ctor(void *iface, nsIDOMEvent *nsevent, e static DOMEvent *custom_event_ctor(void *iface, nsIDOMEvent *nsevent, eventid_t event_id, HTMLInnerWindow *script_global, compat_mode_t compat_mode) { - DOMCustomEvent *custom_event = event_ctor(sizeof(DOMCustomEvent), &DOMCustomEvent_dispex, nsevent, event_id, script_global, + DOMCustomEvent *custom_event = event_ctor(sizeof(DOMCustomEvent), &CustomEvent_dispex, nsevent, event_id, script_global, compat_mode); if(!custom_event) return NULL; custom_event->IDOMCustomEvent_iface.lpVtbl = &DOMCustomEventVtbl; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 34d8e3736a8..8cecd6162b8 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -413,6 +413,7 @@ typedef struct { X(CSSStyleSheet) \ X(CharacterData) \ X(ClientRect) \ + X(CustomEvent) \ X(DOMImplementation) \ X(Document) \ X(DocumentType) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index fcaab3d53a0..d735f88778a 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3253,4 +3253,6 @@ sync_test("prototypes", function() { check(document.createEvent("PageTransitionEvent"), PageTransitionEvent.prototype, "page transition event"); check(PageTransitionEvent.prototype, Event.prototype, "page transition event prototype"); } + check(document.createEvent("CustomEvent"), CustomEvent.prototype, "custom event"); + check(CustomEvent.prototype, Event.prototype, "custom event prototype"); });