From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlelem.c | 15 ++++++++------- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/documentmode.js | 6 ++++++ 3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 5ef5204ecf6..ca76f8015d2 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -7121,15 +7121,16 @@ static const dispex_static_data_vtbl_t token_list_dispex_vtbl = { .invoke = token_list_invoke };
-static const tid_t token_list_iface_tids[] = { +static const tid_t DOMTokenList_tids[] = { IWineDOMTokenList_tid, 0 }; -static dispex_static_data_t token_list_dispex = { - "DOMTokenList", - &token_list_dispex_vtbl, - IWineDOMTokenList_tid, - token_list_iface_tids +dispex_static_data_t DOMTokenList_dispex = { + .id = PROT_DOMTokenList, + .vtbl = &token_list_dispex_vtbl, + .disp_tid = IWineDOMTokenList_tid, + .iface_tids = DOMTokenList_tids, + .min_compat_mode = COMPAT_MODE_IE10, };
static HRESULT create_token_list(compat_mode_t compat_mode, HTMLElement *element, IWineDOMTokenList **ret) @@ -7144,7 +7145,7 @@ static HRESULT create_token_list(compat_mode_t compat_mode, HTMLElement *element }
obj->IWineDOMTokenList_iface.lpVtbl = &WineDOMTokenListVtbl; - init_dispatch_with_owner(&obj->dispex, &token_list_dispex, &element->node.event_target.dispex); + init_dispatch_with_owner(&obj->dispex, &DOMTokenList_dispex, &element->node.event_target.dispex); obj->element = &element->IHTMLElement_iface; IHTMLElement_AddRef(obj->element);
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 9e302e76bd6..ebd0b01751a 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -417,6 +417,7 @@ typedef struct { X(Console) \ X(CustomEvent) \ X(DOMImplementation) \ + X(DOMTokenList) \ X(Document) \ X(DocumentType) \ X(Element) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 539fd1188d0..2e514a16f1f 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3299,4 +3299,10 @@ sync_test("prototypes", function() { }else { ok(!("MediaQueryList" in window), "MediaQueryList found in window"); } + if(v >= 10) { + check(document.body.classList, DOMTokenList.prototype, "token list"); + check(DOMTokenList.prototype, Object.prototype, "token list prototype"); + }else { + ok(!("DOMTokenList" in window), "DOMTokenList found in window"); + } });