From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlelem.c | 18 +++++++++--------- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/documentmode.js | 2 ++ 3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 2612b5988c1..fbdc739a55e 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -750,23 +750,23 @@ void HTMLRect_init_dispex_info(dispex_data_t *info, compat_mode_t mode) dispex_info_add_interface(info, IHTMLRect2_tid, NULL); }
-static const dispex_static_data_vtbl_t HTMLRect_dispex_vtbl = { +static const dispex_static_data_vtbl_t ClientRect_dispex_vtbl = { .query_interface = HTMLRect_query_interface, .destructor = HTMLRect_destructor, .traverse = HTMLRect_traverse, .unlink = HTMLRect_unlink };
-static const tid_t HTMLRect_iface_tids[] = { +static const tid_t ClientRect_iface_tids[] = { IHTMLRect_tid, 0 }; -static dispex_static_data_t HTMLRect_dispex = { - "ClientRect", - &HTMLRect_dispex_vtbl, - IHTMLRect_tid, - HTMLRect_iface_tids, - HTMLRect_init_dispex_info +dispex_static_data_t ClientRect_dispex = { + .id = PROT_ClientRect, + .vtbl = &ClientRect_dispex_vtbl, + .disp_tid = IHTMLRect_tid, + .iface_tids = ClientRect_iface_tids, + .init_info = HTMLRect_init_dispex_info, };
static HRESULT create_html_rect(nsIDOMClientRect *nsrect, DispatchEx *owner, IHTMLRect **ret) @@ -780,7 +780,7 @@ static HRESULT create_html_rect(nsIDOMClientRect *nsrect, DispatchEx *owner, IHT rect->IHTMLRect_iface.lpVtbl = &HTMLRectVtbl; rect->IHTMLRect2_iface.lpVtbl = &HTMLRect2Vtbl;
- init_dispatch_with_owner(&rect->dispex, &HTMLRect_dispex, owner); + init_dispatch_with_owner(&rect->dispex, &ClientRect_dispex, owner);
nsIDOMClientRect_AddRef(nsrect); rect->nsrect = nsrect; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 91255b5035a..6a3d1e5c639 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -412,6 +412,7 @@ typedef struct { X(CSSStyleRule) \ X(CSSStyleSheet) \ X(CharacterData) \ + X(ClientRect) \ X(DOMImplementation) \ X(Document) \ X(DocumentType) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 87bf7879562..c2230f61ce2 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3235,4 +3235,6 @@ sync_test("prototypes", function() { check(e.sheet.rules[0], CSSStyleRule.prototype, "css rule"); check(CSSStyleRule.prototype, CSSRule.prototype, "css rule prototype"); check(CSSRule.prototype, Object.prototype, "css rule prototype"); + check(document.body.getBoundingClientRect(), ClientRect.prototype, "rect"); + check(ClientRect.prototype, Object.prototype, "rect prototype"); });