From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlelemcol.c | 14 +++++++------- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/documentmode.js | 2 ++ 3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/dlls/mshtml/htmlelemcol.c b/dlls/mshtml/htmlelemcol.c index 625af9781b8..dd7ffeea222 100644 --- a/dlls/mshtml/htmlelemcol.c +++ b/dlls/mshtml/htmlelemcol.c @@ -569,16 +569,16 @@ static const dispex_static_data_vtbl_t HTMLElementColection_dispex_vtbl = { .invoke = HTMLElementCollection_invoke, };
-static const tid_t HTMLElementCollection_iface_tids[] = { +static const tid_t HTMLCollection_iface_tids[] = { IHTMLElementCollection_tid, 0 };
-static dispex_static_data_t HTMLElementCollection_dispex = { - "HTMLCollection", - &HTMLElementColection_dispex_vtbl, - DispHTMLElementCollection_tid, - HTMLElementCollection_iface_tids +dispex_static_data_t HTMLCollection_dispex = { + .id = PROT_HTMLCollection, + .vtbl = &HTMLElementColection_dispex_vtbl, + .disp_tid = DispHTMLElementCollection_tid, + .iface_tids = HTMLCollection_iface_tids, };
static void create_all_list(HTMLDOMNode *elem, elem_vector_t *buf) @@ -795,7 +795,7 @@ static IHTMLElementCollection *HTMLElementCollection_Create(HTMLElement **elems, ret->elems = elems; ret->len = len;
- init_dispatch_with_owner(&ret->dispex, &HTMLElementCollection_dispex, owner); + init_dispatch_with_owner(&ret->dispex, &HTMLCollection_dispex, owner);
TRACE("ret=%p len=%ld\n", ret, len);
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index f6ebe212b9a..f13059eba95 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -426,6 +426,7 @@ typedef struct { X(HTMLAreaElement) \ X(HTMLBodyElement) \ X(HTMLButtonElement) \ + X(HTMLCollection) \ X(HTMLDocument) \ X(HTMLElement) \ X(HTMLEmbedElement) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index ec69e021e55..fd26cddb403 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3307,4 +3307,6 @@ sync_test("prototypes", function() { } check(document.body.attributes, NamedNodeMap.prototype, "node map"); check(NamedNodeMap.prototype, Object.prototype, "node map prototype"); + check(document.getElementsByTagName("body"), HTMLCollection.prototype, "elem collection"); + check(HTMLCollection.prototype, Object.prototype, "elem collection prototype"); });