From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlelem.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/htmlelem.c b/dlls/mshtml/htmlelem.c index fbdc739a55e..5ef5204ecf6 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -1120,15 +1120,15 @@ static const dispex_static_data_vtbl_t HTMLRectCollection_dispex_vtbl = { .get_prop_desc = dispex_index_prop_desc, .invoke = HTMLRectCollection_invoke, }; -static const tid_t HTMLRectCollection_iface_tids[] = { +static const tid_t ClientRectList_iface_tids[] = { IHTMLRectCollection_tid, 0 }; -static dispex_static_data_t HTMLRectCollection_dispex = { - "ClientRectList", - &HTMLRectCollection_dispex_vtbl, - IHTMLRectCollection_tid, - HTMLRectCollection_iface_tids +dispex_static_data_t ClientRectList_dispex = { + .id = PROT_ClientRectList, + .vtbl = &HTMLRectCollection_dispex_vtbl, + .disp_tid = IHTMLRectCollection_tid, + .iface_tids = ClientRectList_iface_tids, };
DISPEX_IDISPATCH_IMPL(HTMLElement, IHTMLElement, @@ -3038,7 +3038,7 @@ static HRESULT WINAPI HTMLElement2_getClientRects(IHTMLElement2 *iface, IHTMLRec
rects->IHTMLRectCollection_iface.lpVtbl = &HTMLRectCollectionVtbl; rects->rect_list = rect_list; - init_dispatch(&rects->dispex, &HTMLRectCollection_dispex, This->node.doc->script_global, + init_dispatch(&rects->dispex, &ClientRectList_dispex, This->node.doc->script_global, dispex_compat_mode(&This->node.event_target.dispex));
*pRectCol = &rects->IHTMLRectCollection_iface; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 39820527546..9e302e76bd6 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(ClientRectList) \ X(Console) \ X(CustomEvent) \ X(DOMImplementation) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 7626f439d29..539fd1188d0 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3237,6 +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"); + check(document.body.getClientRects(), ClientRectList.prototype, "rect list"); + check(ClientRectList.prototype, Object.prototype, "rect list prototype"); if(v < 11) { check(document.createEventObject(), MSEventObj.prototype, "event obj"); check(MSEventObj.prototype, Object.prototype, "event obj prototype");