From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/dispex.c | 3 +-- dlls/mshtml/htmlelem.c | 2 +- dlls/mshtml/tests/documentmode.js | 2 +- dlls/mshtml/tests/dom.js | 12 ++++++++++++ 4 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index cacf79322d8..fd7d571aebd 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -2354,8 +2354,7 @@ static HRESULT get_host_property_descriptor(DispatchEx *This, DISPID id, struct desc->func_iid = 0; break; case DISPEXPROP_CUSTOM: - FIXME("custom properties not yet supported\n"); - return E_NOTIMPL; + return This->info->desc->vtbl->get_prop_desc(This, id, desc); }
return S_OK; diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 24d3302275e..7fea9065659 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -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, NULL, + init_dispatch(&rects->dispex, &HTMLRectCollection_dispex, This->node.doc->script_global, dispex_compat_mode(&This->node.event_target.dispex));
*pRectCol = &rects->IHTMLRectCollection_iface; diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 016b51c9eda..404452b2068 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -294,7 +294,7 @@ sync_test("builtin_toString", function() { if(false /* todo_wine */) test("attributes", e.attributes, "NamedNodeMap"); test("childNodes", document.body.childNodes, "NodeList", null, true); if(clientRects) test("clientRect", clientRects[0], "ClientRect", null, true); - if(clientRects) test("clientRects", clientRects, "ClientRectList", null, true); + if(clientRects) test("clientRects", clientRects, "ClientRectList"); if(currentStyle) test("currentStyle", currentStyle, "MSCurrentStyleCSSProperties", null, true); if(v >= 11 /* todo_wine */) test("document", document, v < 11 ? "Document" : "HTMLDocument", null, true); test("elements", document.getElementsByTagName("body"), "HTMLCollection", null, true); diff --git a/dlls/mshtml/tests/dom.js b/dlls/mshtml/tests/dom.js index 325cacf4823..8cecd164b6d 100644 --- a/dlls/mshtml/tests/dom.js +++ b/dlls/mshtml/tests/dom.js @@ -331,6 +331,18 @@ sync_test("rects", function() { ok(rects.length === 1, "rect.length = " + rects.length); ok(rects[0].top === rect.top, "rects[0].top = " + rects[0].top + " rect.top = " + rect.top); ok(rects[0].bottom === rect.bottom, "rects[0].bottom = " + rects[0].bottom + " rect.bottom = " + rect.bottom); + + ok("" + rects[0] === "[object ClientRect]", "rects[0] = " + rects[0]); + ok(rects.hasOwnProperty("0"), 'rects.hasOwnProperty("0") = ' + rects.hasOwnProperty("0")); + todo_wine. + ok(rects.hasOwnProperty("1"), 'rects.hasOwnProperty("1") = ' + rects.hasOwnProperty("1")); + var desc = Object.getOwnPropertyDescriptor(rects, "0"); + ok(desc.writable === true, "writable = " + desc.writable); + todo_wine. + ok(desc.enumerable === true, "enumerable = " + desc.enumerable); + ok(desc.configurable === true, "configurable = " + desc.configurable); + ok("" + desc.value === "[object ClientRect]", "desc.value = " + desc.value); + ok(rect.height === rect.bottom - rect.top, "rect.height = " + rect.height + " rect.bottom = " + rect.bottom + " rect.top = " + rect.top); ok(rect.width === rect.right - rect.left, "rect.width = " + rect.width + " rect.right = " + rect.right + " rect.left = " + rect.left);