From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlselect.c | 11 ++++++----- dlls/mshtml/tests/documentmode.js | 1 + dlls/mshtml/tests/es5.js | 5 +++++ 3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/dlls/mshtml/htmlselect.c b/dlls/mshtml/htmlselect.c index 240e353238a..765686a1260 100644 --- a/dlls/mshtml/htmlselect.c +++ b/dlls/mshtml/htmlselect.c @@ -526,10 +526,11 @@ static const dispex_static_data_vtbl_t HTMLOptionElementFactory_dispex_vtbl = { };
static dispex_static_data_t HTMLOptionElementFactory_dispex = { - "Function", - &HTMLOptionElementFactory_dispex_vtbl, - IHTMLOptionElementFactory_tid, - HTMLOptionElementFactory_iface_tids, + .name = "Function", + .constructor_id = PROT_HTMLOptionElement, + .vtbl = &HTMLOptionElementFactory_dispex_vtbl, + .disp_tid = IHTMLOptionElementFactory_tid, + .iface_tids = HTMLOptionElementFactory_iface_tids, };
HRESULT HTMLOptionElementFactory_Create(HTMLInnerWindow *window, HTMLOptionElementFactory **ret_ptr) @@ -544,7 +545,7 @@ HRESULT HTMLOptionElementFactory_Create(HTMLInnerWindow *window, HTMLOptionEleme ret->window = window; IHTMLWindow2_AddRef(&window->base.IHTMLWindow2_iface);
- init_dispatch(&ret->dispex, &HTMLOptionElementFactory_dispex, NULL, + init_dispatch(&ret->dispex, &HTMLOptionElementFactory_dispex, window, dispex_compat_mode(&window->event_target.dispex));
*ret_ptr = ret; diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index a54c23ee153..4403e1355b5 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3144,4 +3144,5 @@ sync_test("prototypes", function() { check(Image, Function.prototype, "Image constructor"); check(document.createElement("option"), HTMLOptionElement.prototype, "option elem"); check(HTMLOptionElement.prototype, HTMLElement.prototype, "option elem prototype"); + check(Option, Function.prototype, "Option constructor"); }); diff --git a/dlls/mshtml/tests/es5.js b/dlls/mshtml/tests/es5.js index c44d6d6667d..630d9079703 100644 --- a/dlls/mshtml/tests/es5.js +++ b/dlls/mshtml/tests/es5.js @@ -2781,6 +2781,11 @@ sync_test("prototypes", function() { ok(typeof(Image) === "function", "typeof(Image) = " + typeof(Image)); ok(Image.prototype === HTMLImageElement.prototype, "Image.prototype != HTMLImageElement.prototype");
+ ok(Option != HTMLOptionElement, "Option == HTMLOptionElement"); + ok(typeof(HTMLOptionElement) === "object", "typeof(HTMLOptionElement) = " + typeof(HTMLOptionElement)); + ok(typeof(Option) === "function", "typeof(Option) = " + typeof(Option)); + ok(Option.prototype === HTMLOptionElement.prototype, "Option.prototype != HTMLOptionElement.prototype"); + ok(document.implementation instanceof DOMImplementation, "document.implementation is not an instance of DOMImplementation"); ok(navigator instanceof Navigator, "navigator is not an instance of Navigator"); ok(!(navigator instanceof DOMImplementation), "navigator is an instance of DOMImplementation");