-- v2: mshtml: Enumerate all own custom props if requested. mshtml: Properly fill the window's script vars. mshtml: Properly fill the window's constructors. mshtml: Properly fill the constructor's "prototype" prop. mshtml: Properly fill the prototype's "constructor" prop. mshtml: Only fill the external props once, unless they are volatile. mshtml: Fill the props in the host method instead of enumerating next prop.
From: Gabriel Ivăncescu gabrielopcode@gmail.com
No-op, but this describes the intent better, as we're not enumerating enumerable props only, we're filling them for enumeration done on jscript side (this is not called during enumeration itself, but as a prequel), and will be needed later.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/jscript/dispex.c | 99 +++++++++++++++++++++------------------- dlls/jscript/function.c | 16 +++---- dlls/jscript/jscript.h | 4 +- dlls/jscript/jsdisp.idl | 3 +- dlls/jscript/string.c | 22 ++++----- dlls/mshtml/dispex.c | 45 +++++++++++------- dlls/mshtml/htmlwindow.c | 7 ++- 7 files changed, 107 insertions(+), 89 deletions(-)
diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c index 058945d1a5f..5c72640a599 100644 --- a/dlls/jscript/dispex.c +++ b/dlls/jscript/dispex.c @@ -501,21 +501,6 @@ HRESULT jsdisp_index_lookup(jsdisp_t *obj, const WCHAR *name, unsigned length, s return S_OK; }
-HRESULT jsdisp_next_index(jsdisp_t *obj, unsigned length, unsigned id, struct property_info *desc) -{ - if(id + 1 == length) - return S_FALSE; - - desc->id = id + 1; - desc->flags = PROPF_ENUMERABLE; - if(obj->builtin_info->prop_put) - desc->flags |= PROPF_WRITABLE; - desc->name = NULL; - desc->index = desc->id; - desc->iid = 0; - return S_OK; -} - static IDispatch *get_this(DISPPARAMS *dp) { DWORD i; @@ -758,31 +743,10 @@ static HRESULT fill_props(jsdisp_t *obj) return hres; }
- if(obj->builtin_info->next_prop) { - struct property_info desc; - unsigned id = ~0; - WCHAR buf[12]; - - for(;;) { - hres = obj->builtin_info->next_prop(obj, id, &desc); - if(FAILED(hres)) - return hres; - if(hres == S_FALSE) - break; - - if(!desc.name) { - swprintf(buf, ARRAYSIZE(buf), L"%u", desc.index); - desc.name = buf; - } - - prop = lookup_dispex_prop(obj, string_hash(desc.name), desc.name, FALSE); - if(!prop) { - hres = update_external_prop(obj, desc.name, NULL, &desc, &prop); - if(FAILED(hres)) - return hres; - } - id = desc.id; - } + if(obj->builtin_info->fill_props) { + hres = obj->builtin_info->fill_props(obj); + if(FAILED(hres)) + return hres; }
return S_OK; @@ -2426,6 +2390,25 @@ static HRESULT WINAPI WineJSDispatch_DefineProperty(IWineJSDispatch *iface, cons return hres; }
+static HRESULT WINAPI WineJSDispatch_UpdateProperty(IWineJSDispatch *iface, struct property_info *desc) +{ + jsdisp_t *This = impl_from_IWineJSDispatch(iface); + const WCHAR *name = desc->name; + dispex_prop_t *prop; + HRESULT hres = S_OK; + WCHAR buf[12]; + + if(!name) { + swprintf(buf, ARRAYSIZE(buf), L"%u", desc->index); + name = buf; + } + + if(!(prop = lookup_dispex_prop(This, string_hash(name), name, FALSE))) + hres = update_external_prop(This, name, NULL, desc, &prop); + + return hres; +} + static HRESULT WINAPI WineJSDispatch_GetScriptGlobal(IWineJSDispatch *iface, IWineJSDispatchHost **ret) { jsdisp_t *This = impl_from_IWineJSDispatch(iface); @@ -2460,6 +2443,7 @@ static IWineJSDispatchVtbl DispatchExVtbl = { WineJSDispatch_Free, WineJSDispatch_GetPropertyFlags, WineJSDispatch_DefineProperty, + WineJSDispatch_UpdateProperty, WineJSDispatch_GetScriptGlobal, };
@@ -3095,6 +3079,27 @@ HRESULT disp_delete(IDispatch *disp, DISPID id, BOOL *ret) return S_OK; }
+HRESULT jsdisp_fill_indices(jsdisp_t *obj, unsigned length) +{ + struct property_info desc; + HRESULT hres; + + desc.flags = PROPF_ENUMERABLE; + if(obj->builtin_info->prop_put) + desc.flags |= PROPF_WRITABLE; + desc.name = NULL; + desc.iid = 0; + + for(desc.index = 0; desc.index < length; desc.index++) { + desc.id = desc.index; + hres = WineJSDispatch_UpdateProperty(&obj->IWineJSDispatch_iface, &desc); + if(FAILED(hres)) + return hres; + } + + return S_OK; +} + HRESULT jsdisp_next_prop(jsdisp_t *obj, DISPID id, enum jsdisp_enum_type enum_type, DISPID *ret) { dispex_prop_t *iter; @@ -3530,25 +3535,25 @@ static HRESULT HostObject_prop_put(jsdisp_t *jsdisp, unsigned idx, jsval_t v) return hres; }
-static HRESULT HostObject_next_prop(jsdisp_t *jsdisp, unsigned id, struct property_info *desc) +static HRESULT HostObject_prop_delete(jsdisp_t *jsdisp, unsigned id) { HostObject *This = HostObject_from_jsdisp(jsdisp);
- return IWineJSDispatchHost_NextProperty(This->host_iface, id, desc); + return IWineJSDispatchHost_DeleteProperty(This->host_iface, id); }
-static HRESULT HostObject_prop_delete(jsdisp_t *jsdisp, unsigned id) +static HRESULT HostObject_prop_config(jsdisp_t *jsdisp, unsigned id, unsigned flags) { HostObject *This = HostObject_from_jsdisp(jsdisp);
- return IWineJSDispatchHost_DeleteProperty(This->host_iface, id); + return IWineJSDispatchHost_ConfigureProperty(This->host_iface, id, flags); }
-static HRESULT HostObject_prop_config(jsdisp_t *jsdisp, unsigned id, unsigned flags) +static HRESULT HostObject_fill_props(jsdisp_t *jsdisp) { HostObject *This = HostObject_from_jsdisp(jsdisp);
- return IWineJSDispatchHost_ConfigureProperty(This->host_iface, id, flags); + return IWineJSDispatchHost_FillProperties(This->host_iface); }
static HRESULT HostObject_to_string(jsdisp_t *jsdisp, jsstr_t **ret) @@ -3573,9 +3578,9 @@ static const builtin_info_t HostObject_info = { .lookup_prop = HostObject_lookup_prop, .prop_get = HostObject_prop_get, .prop_put = HostObject_prop_put, - .next_prop = HostObject_next_prop, .prop_delete = HostObject_prop_delete, .prop_config = HostObject_prop_config, + .fill_props = HostObject_fill_props, .to_string = HostObject_to_string, };
diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c index 54b8f5abe2f..ffb55af0922 100644 --- a/dlls/jscript/function.c +++ b/dlls/jscript/function.c @@ -137,12 +137,6 @@ static HRESULT Arguments_lookup_prop(jsdisp_t *jsdisp, const WCHAR *name, unsign return jsdisp_index_lookup(&arguments->jsdisp, name, arguments->argc, desc); }
-static HRESULT Arguments_next_prop(jsdisp_t *jsdisp, unsigned id, struct property_info *desc) -{ - ArgumentsInstance *arguments = arguments_from_jsdisp(jsdisp); - return jsdisp_next_index(&arguments->jsdisp, arguments->argc, id, desc); -} - static jsval_t *get_argument_ref(ArgumentsInstance *arguments, unsigned idx) { if(arguments->buf) @@ -179,6 +173,12 @@ static HRESULT Arguments_prop_put(jsdisp_t *jsdisp, unsigned idx, jsval_t val) return S_OK; }
+static HRESULT Arguments_fill_props(jsdisp_t *jsdisp) +{ + ArgumentsInstance *arguments = arguments_from_jsdisp(jsdisp); + return jsdisp_fill_indices(&arguments->jsdisp, arguments->argc); +} + static HRESULT Arguments_gc_traverse(struct gc_ctx *gc_ctx, enum gc_traverse_op op, jsdisp_t *jsdisp) { ArgumentsInstance *arguments = arguments_from_jsdisp(jsdisp); @@ -240,9 +240,9 @@ static const builtin_info_t Arguments_info = { .props = Arguments_props, .destructor = Arguments_destructor, .lookup_prop = Arguments_lookup_prop, - .next_prop = Arguments_next_prop, .prop_get = Arguments_prop_get, .prop_put = Arguments_prop_put, + .fill_props = Arguments_fill_props, .gc_traverse = Arguments_gc_traverse };
@@ -251,9 +251,9 @@ static const builtin_info_t Arguments_ES5_info = { .call = Arguments_value, .destructor = Arguments_destructor, .lookup_prop = Arguments_lookup_prop, - .next_prop = Arguments_next_prop, .prop_get = Arguments_prop_get, .prop_put = Arguments_prop_put, + .fill_props = Arguments_fill_props, .gc_traverse = Arguments_gc_traverse };
diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index d42dd3a8a8a..6f4266edd44 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -184,11 +184,11 @@ typedef struct { ULONG (*release)(jsdisp_t*); void (*on_put)(jsdisp_t*,const WCHAR*); HRESULT (*lookup_prop)(jsdisp_t*,const WCHAR*,unsigned,struct property_info*); - HRESULT (*next_prop)(jsdisp_t*,unsigned,struct property_info*); HRESULT (*prop_get)(jsdisp_t*,unsigned,jsval_t*); HRESULT (*prop_put)(jsdisp_t*,unsigned,jsval_t); HRESULT (*prop_delete)(jsdisp_t*,unsigned); HRESULT (*prop_config)(jsdisp_t*,unsigned,unsigned); + HRESULT (*fill_props)(jsdisp_t*); HRESULT (*to_string)(jsdisp_t*,jsstr_t**); HRESULT (*gc_traverse)(struct gc_ctx*,enum gc_traverse_op,jsdisp_t*); } builtin_info_t; @@ -263,7 +263,7 @@ HRESULT jsdisp_get_idx_id(jsdisp_t*,DWORD,DISPID*); HRESULT disp_delete(IDispatch*,DISPID,BOOL*); HRESULT disp_delete_name(script_ctx_t*,IDispatch*,jsstr_t*,BOOL*); HRESULT jsdisp_index_lookup(jsdisp_t*,const WCHAR*,unsigned,struct property_info*); -HRESULT jsdisp_next_index(jsdisp_t*,unsigned,unsigned,struct property_info*); +HRESULT jsdisp_fill_indices(jsdisp_t*,unsigned); HRESULT jsdisp_delete_idx(jsdisp_t*,DWORD); HRESULT jsdisp_get_own_property(jsdisp_t*,const WCHAR*,BOOL,property_desc_t*); HRESULT jsdisp_define_property(jsdisp_t*,const WCHAR*,property_desc_t*); diff --git a/dlls/jscript/jsdisp.idl b/dlls/jscript/jsdisp.idl index c55626fae66..a96214a98b6 100644 --- a/dlls/jscript/jsdisp.idl +++ b/dlls/jscript/jsdisp.idl @@ -53,6 +53,7 @@ interface IWineJSDispatch : IDispatchEx void Free(); HRESULT GetPropertyFlags(DISPID id, UINT32 *ret); HRESULT DefineProperty(const WCHAR *name, unsigned int flags, VARIANT *v); + HRESULT UpdateProperty(struct property_info *desc); HRESULT GetScriptGlobal(IWineJSDispatchHost **ret); }
@@ -65,13 +66,13 @@ interface IWineJSDispatchHost : IDispatchEx { HRESULT GetJSDispatch(IWineJSDispatch **ret); HRESULT LookupProperty(const WCHAR *name, DWORD flags, struct property_info *desc); - HRESULT NextProperty(DISPID id, struct property_info *desc); HRESULT GetProperty(DISPID id, LCID lcid, VARIANT *r, EXCEPINFO *ei, IServiceProvider *caller); HRESULT SetProperty(DISPID id, LCID lcid, VARIANT *v, EXCEPINFO *ei, IServiceProvider *caller); HRESULT DeleteProperty(DISPID id); HRESULT ConfigureProperty(DISPID id, UINT32 flags); HRESULT CallFunction(DISPID id, UINT32 iid, DWORD flags, DISPPARAMS *dp, VARIANT *ret, EXCEPINFO *ei, IServiceProvider *caller); HRESULT Construct(LCID lcid, DWORD flags, DISPPARAMS *dp, VARIANT *ret, EXCEPINFO *ei, IServiceProvider *caller); + HRESULT FillProperties(); HRESULT GetOuterDispatch(IWineJSDispatchHost **ret); HRESULT ToString(BSTR *str); } diff --git a/dlls/jscript/string.c b/dlls/jscript/string.c index 968b74f9602..42a2c697fbc 100644 --- a/dlls/jscript/string.c +++ b/dlls/jscript/string.c @@ -1517,16 +1517,6 @@ static HRESULT String_lookup_prop(jsdisp_t *jsdisp, const WCHAR *name, unsigned return jsdisp_index_lookup(&string->dispex, name, jsstr_length(string->str), desc); }
-static HRESULT String_next_prop(jsdisp_t *jsdisp, unsigned id, struct property_info *desc) -{ - StringInstance *string = string_from_jsdisp(jsdisp); - - if(string->dispex.ctx->version < 2) - return S_FALSE; - - return jsdisp_next_index(&string->dispex, jsstr_length(string->str), id, desc); -} - static HRESULT String_prop_get(jsdisp_t *jsdisp, unsigned idx, jsval_t *r) { StringInstance *string = string_from_jsdisp(jsdisp); @@ -1542,6 +1532,16 @@ static HRESULT String_prop_get(jsdisp_t *jsdisp, unsigned idx, jsval_t *r) return S_OK; }
+static HRESULT String_fill_props(jsdisp_t *jsdisp) +{ + StringInstance *string = string_from_jsdisp(jsdisp); + + if(string->dispex.ctx->version < 2) + return S_OK; + + return jsdisp_fill_indices(&string->dispex, jsstr_length(string->str)); +} + static const builtin_prop_t String_props[] = { {L"anchor", String_anchor, PROPF_METHOD|1}, {L"big", String_big, PROPF_METHOD}, @@ -1596,8 +1596,8 @@ static const builtin_info_t StringInst_info = { .props = StringInst_props, .destructor = String_destructor, .lookup_prop = String_lookup_prop, - .next_prop = String_next_prop, .prop_get = String_prop_get, + .fill_props = String_fill_props, };
/* ECMA-262 3rd Edition 15.5.3.2 */ diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 43896729a9e..0290d61f04c 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -2670,21 +2670,6 @@ static HRESULT WINAPI JSDispatchHost_LookupProperty(IWineJSDispatchHost *iface, return get_host_property_descriptor(This, id, desc); }
-static HRESULT WINAPI JSDispatchHost_NextProperty(IWineJSDispatchHost *iface, DISPID id, struct property_info *desc) -{ - DispatchEx *This = impl_from_IWineJSDispatchHost(iface); - DISPID next; - HRESULT hres; - - TRACE("%s (%p)->(%lx)\n", This->info->name, This, id); - - hres = dispex_next_id(This, id, TRUE, &next); - if(hres != S_OK) - return hres; - - return get_host_property_descriptor(This, next, desc); -} - static HRESULT WINAPI JSDispatchHost_GetProperty(IWineJSDispatchHost *iface, DISPID id, LCID lcid, VARIANT *r, EXCEPINFO *ei, IServiceProvider *caller) { @@ -2772,6 +2757,34 @@ static HRESULT WINAPI JSDispatchHost_Construct(IWineJSDispatchHost *iface, LCID return dispex_prop_call(This, DISPID_VALUE, lcid, flags, dp, ret, ei, caller); }
+static HRESULT WINAPI JSDispatchHost_FillProperties(IWineJSDispatchHost *iface) +{ + DispatchEx *This = impl_from_IWineJSDispatchHost(iface); + DISPID id = DISPID_STARTENUM; + struct property_info desc; + HRESULT hres; + + TRACE("%s (%p)->(%lx)\n", This->info->name, This, id); + + for(;;) { + hres = dispex_next_id(This, id, TRUE, &id); + if(FAILED(hres)) + return hres; + if(hres == S_FALSE) + break; + + hres = get_host_property_descriptor(This, id, &desc); + if(FAILED(hres)) + return hres; + + hres = IWineJSDispatch_UpdateProperty(This->jsdisp, &desc); + if(FAILED(hres)) + return hres; + } + + return S_OK; +} + static HRESULT WINAPI JSDispatchHost_GetOuterDispatch(IWineJSDispatchHost *iface, IWineJSDispatchHost **ret) { DispatchEx *This = impl_from_IWineJSDispatchHost(iface); @@ -2807,13 +2820,13 @@ static IWineJSDispatchHostVtbl JSDispatchHostVtbl = { DispatchEx_GetNameSpaceParent, JSDispatchHost_GetJSDispatch, JSDispatchHost_LookupProperty, - JSDispatchHost_NextProperty, JSDispatchHost_GetProperty, JSDispatchHost_SetProperty, JSDispatchHost_DeleteProperty, JSDispatchHost_ConfigureProperty, JSDispatchHost_CallFunction, JSDispatchHost_Construct, + JSDispatchHost_FillProperties, JSDispatchHost_GetOuterDispatch, JSDispatchHost_ToString, }; diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 8913c4e511c..c964fdb9b02 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -3439,12 +3439,11 @@ static HRESULT WINAPI WindowDispEx_LookupProperty(IWineJSDispatchHost *iface, co name, flags, desc); }
-static HRESULT WINAPI WindowDispEx_NextProperty(IWineJSDispatchHost *iface, DISPID id, struct property_info *desc) +static HRESULT WINAPI WindowDispEx_FillProperties(IWineJSDispatchHost *iface) { HTMLOuterWindow *This = impl_from_IWineJSDispatchHost(iface);
- return IWineJSDispatchHost_NextProperty(&This->base.inner_window->event_target.dispex.IWineJSDispatchHost_iface, - id, desc); + return IWineJSDispatchHost_FillProperties(&This->base.inner_window->event_target.dispex.IWineJSDispatchHost_iface); }
static HRESULT WINAPI WindowDispEx_GetProperty(IWineJSDispatchHost *iface, DISPID id, LCID lcid, VARIANT *r, @@ -3531,13 +3530,13 @@ static const IWineJSDispatchHostVtbl WindowDispExVtbl = { WindowDispEx_GetNameSpaceParent, WindowDispEx_GetJSDispatch, WindowDispEx_LookupProperty, - WindowDispEx_NextProperty, WindowDispEx_GetProperty, WindowDispEx_SetProperty, WindowDispEx_DeleteProperty, WindowDispEx_ConfigureProperty, WindowDispEx_CallFunction, WindowDispEx_Construct, + WindowDispEx_FillProperties, WindowDispEx_GetOuterDispatch, WindowDispEx_ToString, };
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/jscript/dispex.c | 6 ++++++ dlls/jscript/jscript.h | 9 +++++---- dlls/jscript/jsdisp.idl | 3 ++- dlls/mshtml/dispex.c | 2 +- dlls/mshtml/htmldoc.c | 3 +++ dlls/mshtml/htmlstorage.c | 1 + dlls/mshtml/htmlwindow.c | 1 + 7 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c index 5c72640a599..110c021b6b8 100644 --- a/dlls/jscript/dispex.c +++ b/dlls/jscript/dispex.c @@ -737,11 +737,15 @@ static HRESULT fill_props(jsdisp_t *obj) HRESULT hres; DWORD i;
+ if(obj->props_filled) + return S_OK; + for(i = 0; i < obj->builtin_info->props_cnt; i++) { hres = find_prop_name(obj, string_hash(obj->builtin_info->props[i].name), obj->builtin_info->props[i].name, FALSE, NULL, &prop); if(FAILED(hres)) return hres; } + hres = S_OK;
if(obj->builtin_info->fill_props) { hres = obj->builtin_info->fill_props(obj); @@ -749,6 +753,8 @@ static HRESULT fill_props(jsdisp_t *obj) return hres; }
+ if(hres == S_OK) + obj->props_filled = TRUE; return S_OK; }
diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 6f4266edd44..4f21cae941b 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -198,10 +198,11 @@ struct jsdisp_t {
LONG ref;
- BOOLEAN has_weak_refs; - BOOLEAN extensible; - BOOLEAN gc_marked; - BOOLEAN is_constructor; + BOOLEAN is_constructor : 1; + BOOLEAN has_weak_refs : 1; + BOOLEAN props_filled : 1; + BOOLEAN extensible : 1; + BOOLEAN gc_marked : 1;
DWORD buf_size; DWORD prop_cnt; diff --git a/dlls/jscript/jsdisp.idl b/dlls/jscript/jsdisp.idl index a96214a98b6..22f22b641a4 100644 --- a/dlls/jscript/jsdisp.idl +++ b/dlls/jscript/jsdisp.idl @@ -39,7 +39,8 @@ const unsigned int PROPF_CONFIGURABLE = 0x1000;
const unsigned int PROPF_PUBLIC_MASK = PROPF_ENUMERABLE | PROPF_WRITABLE | PROPF_CONFIGURABLE;
-const unsigned int HOSTOBJ_CONSTRUCTOR = 0x0001; +const unsigned int HOSTOBJ_CONSTRUCTOR = 0x0001; +const unsigned int HOSTOBJ_VOLATILE_FILL = 0x0002;
interface IWineJSDispatchHost;
diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 0290d61f04c..dc57cfd7703 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -2782,7 +2782,7 @@ static HRESULT WINAPI JSDispatchHost_FillProperties(IWineJSDispatchHost *iface) return hres; }
- return S_OK; + return (This->info->desc->js_flags & HOSTOBJ_VOLATILE_FILL) ? S_FALSE : S_OK; }
static HRESULT WINAPI JSDispatchHost_GetOuterDispatch(IWineJSDispatchHost *iface, IWineJSDispatchHost **ret) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index ca55b8e1d5b..b1ccd40031e 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -5764,6 +5764,7 @@ dispex_static_data_t Document_dispex = { .disp_tid = DispHTMLDocument_tid, .iface_tids = HTMLDocumentNode_iface_tids, .init_info = HTMLDocumentNode_init_dispex_info, + .js_flags = HOSTOBJ_VOLATILE_FILL, };
dispex_static_data_t HTMLDocument_dispex = { @@ -5773,6 +5774,7 @@ dispex_static_data_t HTMLDocument_dispex = { .disp_tid = DispHTMLDocument_tid, .iface_tids = HTMLDocumentNode_iface_tids, .init_info = HTMLDocumentNode_init_dispex_info, + .js_flags = HOSTOBJ_VOLATILE_FILL, .min_compat_mode = COMPAT_MODE_IE11, };
@@ -5906,6 +5908,7 @@ dispex_static_data_t DocumentFragment_dispex = { .disp_tid = DispHTMLDocument_tid, .iface_tids = DocumentFragment_iface_tids, .init_info = DocumentFragment_init_dispex_info, + .js_flags = HOSTOBJ_VOLATILE_FILL, };
static HRESULT create_document_fragment(nsIDOMNode *nsnode, HTMLDocumentNode *doc_node, HTMLDocumentNode **ret) diff --git a/dlls/mshtml/htmlstorage.c b/dlls/mshtml/htmlstorage.c index 632469d0f9b..5f005c644ab 100644 --- a/dlls/mshtml/htmlstorage.c +++ b/dlls/mshtml/htmlstorage.c @@ -1298,6 +1298,7 @@ dispex_static_data_t Storage_dispex = { .vtbl = &Storage_dispex_vtbl, .disp_tid = IHTMLStorage_tid, .iface_tids = HTMLStorage_iface_tids, + .js_flags = HOSTOBJ_VOLATILE_FILL, };
static HRESULT build_session_origin(IUri *uri, BSTR hostname, BSTR *ret) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index c964fdb9b02..615bac697b0 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -4245,6 +4245,7 @@ dispex_static_data_t Window_dispex = { .vtbl = &HTMLWindow_event_target_vtbl.dispex_vtbl, .disp_tid = DispHTMLWindow2_tid, .init_info = HTMLWindow_init_dispex_info, + .js_flags = HOSTOBJ_VOLATILE_FILL, };
static nsresult NSAPI outer_window_traverse(void *ccp, void *p, nsCycleCollectionTraversalCallback *cb)
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Prevent its existence from being flaky during getOwnPropertyNames.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/dispex.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index dc57cfd7703..6adbcbe4beb 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -3046,9 +3046,19 @@ static HRESULT prototype_find_dispid(DispatchEx *dispex, const WCHAR *name, DWOR return hres; }
+static HRESULT prototype_next_dispid(DispatchEx *dispex, DISPID id, DISPID *pid) +{ + if(id == DISPID_STARTENUM) { + HRESULT hres = dispex_get_id(dispex, L"constructor", 0, &id); + if(hres != S_OK) return hres; + } + return S_FALSE; +} + static const dispex_static_data_vtbl_t prototype_dispex_vtbl = { .destructor = prototype_destructor, .find_dispid = prototype_find_dispid, + .next_dispid = prototype_next_dispid, };
HRESULT get_prototype(HTMLInnerWindow *script_global, object_id_t id, DispatchEx **ret)
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Prevent its existence from being flaky during getOwnPropertyNames.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/dispex.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 6adbcbe4beb..dce2af93e42 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -3173,6 +3173,15 @@ static HRESULT stub_constructor_find_dispid(DispatchEx *dispex, const WCHAR *nam return hres; }
+static HRESULT stub_constructor_next_dispid(DispatchEx *dispex, DISPID id, DISPID *pid) +{ + if(id == DISPID_STARTENUM) { + HRESULT hres = dispex_get_id(dispex, L"prototype", 0, &id); + if(hres != S_OK) return hres; + } + return S_FALSE; +} + static const char *stub_constructor_get_name(DispatchEx *dispex) { struct stub_constructor *constr = stub_constructor_from_DispatchEx(dispex); @@ -3182,6 +3191,7 @@ static const char *stub_constructor_get_name(DispatchEx *dispex) static const dispex_static_data_vtbl_t stub_constructor_dispex_vtbl = { .destructor = stub_constructor_destructor, .find_dispid = stub_constructor_find_dispid, + .next_dispid = stub_constructor_next_dispid, .get_name = stub_constructor_get_name, };
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/dispex.c | 6 +- dlls/mshtml/htmldoc.c | 2 +- dlls/mshtml/htmlstorage.c | 2 +- dlls/mshtml/htmlwindow.c | 16 +++- dlls/mshtml/mshtml_private.h | 3 +- dlls/mshtml/tests/documentmode.js | 124 ++++++++++++++++++++++++++++++ 6 files changed, 146 insertions(+), 7 deletions(-)
diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index dce2af93e42..024d7c8fee4 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -2553,7 +2553,7 @@ HRESULT dispex_next_id(DispatchEx *dispex, DISPID id, BOOL enum_all_own_props, D }
if(dispex->info->vtbl->next_dispid) { - hres = dispex->info->vtbl->next_dispid(dispex, id, ret); + hres = dispex->info->vtbl->next_dispid(dispex, id, enum_all_own_props, ret); if(hres != S_FALSE) return hres; } @@ -3046,7 +3046,7 @@ static HRESULT prototype_find_dispid(DispatchEx *dispex, const WCHAR *name, DWOR return hres; }
-static HRESULT prototype_next_dispid(DispatchEx *dispex, DISPID id, DISPID *pid) +static HRESULT prototype_next_dispid(DispatchEx *dispex, DISPID id, BOOL enum_all_own_props, DISPID *pid) { if(id == DISPID_STARTENUM) { HRESULT hres = dispex_get_id(dispex, L"constructor", 0, &id); @@ -3173,7 +3173,7 @@ static HRESULT stub_constructor_find_dispid(DispatchEx *dispex, const WCHAR *nam return hres; }
-static HRESULT stub_constructor_next_dispid(DispatchEx *dispex, DISPID id, DISPID *pid) +static HRESULT stub_constructor_next_dispid(DispatchEx *dispex, DISPID id, BOOL enum_all_own_props, DISPID *pid) { if(id == DISPID_STARTENUM) { HRESULT hres = dispex_get_id(dispex, L"prototype", 0, &id); diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index b1ccd40031e..174e1a784fd 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -5446,7 +5446,7 @@ static HRESULT HTMLDocumentNode_disp_invoke(DispatchEx *dispex, DISPID id, LCID return S_FALSE; }
-static HRESULT HTMLDocumentNode_next_dispid(DispatchEx *dispex, DISPID id, DISPID *pid) +static HRESULT HTMLDocumentNode_next_dispid(DispatchEx *dispex, DISPID id, BOOL enum_all_own_props, DISPID *pid) { DWORD idx = (id == DISPID_STARTENUM) ? 0 : id - MSHTML_DISPID_CUSTOM_MIN + 1; HTMLDocumentNode *This = impl_from_DispatchEx(dispex); diff --git a/dlls/mshtml/htmlstorage.c b/dlls/mshtml/htmlstorage.c index 5f005c644ab..4b4e9341d3a 100644 --- a/dlls/mshtml/htmlstorage.c +++ b/dlls/mshtml/htmlstorage.c @@ -1179,7 +1179,7 @@ static HRESULT HTMLStorage_delete(DispatchEx *dispex, DISPID id) return HTMLStorage_removeItem(&This->IHTMLStorage_iface, This->props[idx]); }
-static HRESULT HTMLStorage_next_dispid(DispatchEx *dispex, DISPID id, DISPID *pid) +static HRESULT HTMLStorage_next_dispid(DispatchEx *dispex, DISPID id, BOOL enum_all_own_props, DISPID *pid) { DWORD idx = (id == DISPID_STARTENUM) ? 0 : id - MSHTML_DISPID_CUSTOM_MIN + 1; HTMLStorage *This = impl_from_DispatchEx(dispex); diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 615bac697b0..59ccffc0fa6 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -3990,10 +3990,24 @@ static HRESULT HTMLWindow_delete(DispatchEx *dispex, DISPID id) return hres; }
-static HRESULT HTMLWindow_next_dispid(DispatchEx *dispex, DISPID id, DISPID *pid) +static HRESULT HTMLWindow_next_dispid(DispatchEx *dispex, DISPID id, BOOL enum_all_own_props, DISPID *pid) { DWORD idx = (id == DISPID_STARTENUM) ? 0 : id - MSHTML_DISPID_CUSTOM_MIN + 1; HTMLInnerWindow *This = impl_from_DispatchEx(dispex); + HRESULT hres; + unsigned i; + + if(id == DISPID_STARTENUM && enum_all_own_props) { + if(!This->static_props_filled) { + for(i = 0; i < ARRAYSIZE(constructor_names); i++) { + hres = dispex_get_id(&This->event_target.dispex, constructor_names[i], 0, &id); + if(FAILED(hres) && hres != DISP_E_UNKNOWNNAME) + return hres; + } + + This->static_props_filled = TRUE; + } + }
while(idx < This->global_prop_cnt && This->global_props[idx].type != GLOBAL_DISPEXVAR) idx++; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 573a0b6bf63..c02f4515c7d 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -398,7 +398,7 @@ typedef struct { /* These are called when the object implements GetMemberName, InvokeEx, DeleteMemberByDispID and GetNextDispID for custom props */ HRESULT (*invoke)(DispatchEx*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*); HRESULT (*delete)(DispatchEx*,DISPID); - HRESULT (*next_dispid)(DispatchEx*,DISPID,DISPID*); + HRESULT (*next_dispid)(DispatchEx*,DISPID,BOOL,DISPID*); HRESULT (*get_prop_desc)(DispatchEx*,DISPID,struct property_info*);
/* Similar to invoke, but allows overriding all dispids */ @@ -782,6 +782,7 @@ struct HTMLInnerWindow { IHTMLStorage *local_storage; IWineMSHTMLConsole *console;
+ BOOL static_props_filled; BOOL performance_initialized; VARIANT performance;
diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index e35b978db46..8c76e264d81 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -4077,3 +4077,127 @@ sync_test("constructors", function() { ok(!HTMLMetaElement.prototype.hasOwnProperty("constructor"), "constructor still a property of HTMLMetaElement.prototype"); HTMLMetaElement.prototype.constructor = old; }); + +async_test("window own props", function() { + if(!Object.getOwnPropertyNames) { + next_test(); + return; + } + var iframe = document.createElement("iframe"); + + iframe.onload = function() { + iframe.contentWindow.testprop = "foobar"; + + test_own_props(iframe.contentWindow, "window", [ + ["ANGLE_instanced_arrays",11], "ActiveXObject", ["AesGcmEncryptResult",11], ["AnimationEvent",10], ["ApplicationCache",10], "Array", ["ArrayBuffer",10], "Attr", + "Audio", ["AudioTrack",10], ["AudioTrackList",10], "BeforeUnloadEvent", ["Blob",10], "BookmarkCollection", "Boolean", "CDATASection", "CSSFontFaceRule", "CSSImportRule", + ["CSSKeyframeRule",10], ["CSSKeyframesRule",10], "CSSMediaRule", "CSSNamespaceRule", "CSSPageRule", "CSSRule", "CSSRuleList", "CSSStyleDeclaration", "CSSStyleRule", + "CSSStyleSheet", "CanvasGradient", "CanvasPattern", "CanvasPixelArray", "CanvasRenderingContext2D", "CharacterData", "ClientRect", "ClientRectList", ["CloseEvent",10], + "CollectGarbage", "Comment", "CompositionEvent", ["Console",10], "ControlRangeCollection", "Coordinates", ["Crypto",11], ["CryptoOperation",11], "CustomEvent", + ["DOMError",10], "DOMException", "DOMImplementation", "DOMParser", ["DOMSettableTokenList",10], ["DOMStringList",10], ["DOMStringMap",11], ["DOMTokenList",10], + "DataTransfer", ["DataView",10], "Date", "Debug", ["DeviceAcceleration",11], ["DeviceMotionEvent",11], ["DeviceOrientationEvent",11], ["DeviceRotationRate",11], + "Document", "DocumentFragment", "DocumentType", "DragEvent", ["EXT_texture_filter_anisotropic",11], "Element", "Enumerator", "Error", ["ErrorEvent",10], "EvalError", + "Event", "EventException", ["File",10], ["FileList",10], ["FileReader",10], ["Float32Array",10], ["Float64Array",10], "FocusEvent", ["FormData",10], "Function", + "Geolocation", ["HTMLAllCollection",11], "HTMLAnchorElement", "HTMLAppletElement", "HTMLAreaElement", "HTMLAreasCollection", "HTMLAudioElement", "HTMLBGSoundElement", + "HTMLBRElement", "HTMLBaseElement", "HTMLBaseFontElement", "HTMLBlockElement", "HTMLBodyElement", "HTMLButtonElement", "HTMLCanvasElement", "HTMLCollection", + "HTMLDDElement", "HTMLDListElement", "HTMLDTElement", ["HTMLDataListElement",10], "HTMLDirectoryElement", "HTMLDivElement", ["HTMLDocument",11], "HTMLElement", + "HTMLEmbedElement", "HTMLFieldSetElement", "HTMLFontElement", "HTMLFormElement", "HTMLFrameElement", "HTMLFrameSetElement", "HTMLHRElement", "HTMLHeadElement", + "HTMLHeadingElement", "HTMLHtmlElement", "HTMLIFrameElement", "HTMLImageElement", "HTMLInputElement", "HTMLIsIndexElement", "HTMLLIElement", "HTMLLabelElement", + "HTMLLegendElement", "HTMLLinkElement", "HTMLMapElement", "HTMLMarqueeElement", "HTMLMediaElement", "HTMLMenuElement", "HTMLMetaElement", "HTMLModElement", + "HTMLNextIdElement", "HTMLOListElement", "HTMLObjectElement", "HTMLOptGroupElement", "HTMLOptionElement", "HTMLParagraphElement", "HTMLParamElement", "HTMLPhraseElement", + "HTMLPreElement", ["HTMLProgressElement",10], "HTMLQuoteElement", "HTMLScriptElement", "HTMLSelectElement", "HTMLSourceElement", "HTMLSpanElement", "HTMLStyleElement", + "HTMLTableCaptionElement", "HTMLTableCellElement", "HTMLTableColElement", "HTMLTableDataCellElement", "HTMLTableElement", "HTMLTableHeaderCellElement", + "HTMLTableRowElement", "HTMLTableSectionElement", "HTMLTextAreaElement", "HTMLTitleElement", ["HTMLTrackElement",10], "HTMLUListElement", "HTMLUnknownElement", + "HTMLVideoElement", "History", ["IDBCursor",10], ["IDBCursorWithValue",10], ["IDBDatabase",10], ["IDBFactory",10], ["IDBIndex",10], ["IDBKeyRange",10], + ["IDBObjectStore",10], ["IDBOpenDBRequest",10], ["IDBRequest",10], ["IDBTransaction",10], ["IDBVersionChangeEvent",10], "Image", "ImageData", "Infinity", + ["Int16Array",10], ["Int32Array",10], ["Int8Array",10], ["Intl",11], "JSON", ["Key",11], ["KeyOperation",11], ["KeyPair",11], "KeyboardEvent", "Location", + "MSBehaviorUrnsCollection", ["MSBlobBuilder",10], ["MSCSSMatrix",10], "MSCSSProperties", "MSCSSRuleList", "MSCompatibleInfo", "MSCompatibleInfoCollection", + "MSCurrentStyleCSSProperties", "MSEventObj", ["MSGesture",10], ["MSGestureEvent",10], ["MSGraphicsTrust",11], ["MSInputMethodContext",11], ["MSManipulationEvent",10], + ["MSMediaKeyError",11], ["MSMediaKeyMessageEvent",11], ["MSMediaKeyNeededEvent",11], ["MSMediaKeySession",11], ["MSMediaKeys",11], "MSMimeTypesCollection", + ["MSNamespaceInfo",0,9], ["MSNamespaceInfoCollection",0,9], "MSPluginsCollection", ["MSPointerEvent",10], ["MSPopupWindow",0,10], ["MSRangeCollection",10], + ["MSSelection",0,10], "MSSiteModeEvent", ["MSStream",10], ["MSStreamReader",10], "MSStyleCSSProperties", ["Map",11], "Math", "MediaError", "MediaList", + ["MediaQueryList",10], ["MediaSource",11], ["MessageChannel",10], "MessageEvent", ["MessagePort",10], ["MimeType",11], ["MimeTypeArray",11], "MouseEvent", + "MouseWheelEvent", "MutationEvent", ["MutationObserver",11], ["MutationRecord",11], "NaN", "NamedNodeMap", "Navigator", "Node", "NodeFilter", "NodeIterator", "NodeList", + "Number", ["OES_element_index_uint",11], ["OES_standard_derivatives",11], ["OES_texture_float",11], ["OES_texture_float_linear",11], "Object", "Option", + ["PageTransitionEvent",11], "Performance", "PerformanceEntry", "PerformanceMark", "PerformanceMeasure", "PerformanceNavigation", ["PerformanceNavigationTiming",11], + "PerformanceResourceTiming", "PerformanceTiming", ["Plugin",11], ["PluginArray",11], ["PointerEvent",11], ["PopStateEvent",10], "Position", "PositionError", + "ProcessingInstruction", ["ProgressEvent",10], "Range", "RangeError", "RangeException", "ReferenceError", "RegExp", "SVGAElement", "SVGAngle", "SVGAnimatedAngle", + "SVGAnimatedBoolean", "SVGAnimatedEnumeration", "SVGAnimatedInteger", "SVGAnimatedLength", "SVGAnimatedLengthList", "SVGAnimatedNumber", "SVGAnimatedNumberList", + "SVGAnimatedPreserveAspectRatio", "SVGAnimatedRect", "SVGAnimatedString", "SVGAnimatedTransformList", "SVGCircleElement", "SVGClipPathElement", + ["SVGComponentTransferFunctionElement",10], "SVGDefsElement", "SVGDescElement", "SVGElement", "SVGElementInstance", "SVGElementInstanceList", "SVGEllipseElement", + "SVGException", ["SVGFEBlendElement",10], ["SVGFEColorMatrixElement",10], ["SVGFEComponentTransferElement",10], ["SVGFECompositeElement",10], + ["SVGFEConvolveMatrixElement",10], ["SVGFEDiffuseLightingElement",10], ["SVGFEDisplacementMapElement",10], ["SVGFEDistantLightElement",10], ["SVGFEFloodElement",10], + ["SVGFEFuncAElement",10], ["SVGFEFuncBElement",10], ["SVGFEFuncGElement",10], ["SVGFEFuncRElement",10], ["SVGFEGaussianBlurElement",10], ["SVGFEImageElement",10], + ["SVGFEMergeElement",10], ["SVGFEMergeNodeElement",10], ["SVGFEMorphologyElement",10], ["SVGFEOffsetElement",10], ["SVGFEPointLightElement",10], + ["SVGFESpecularLightingElement",10], ["SVGFESpotLightElement",10], ["SVGFETileElement",10], ["SVGFETurbulenceElement",10], ["SVGFilterElement",10], "SVGGElement", + "SVGGradientElement", "SVGImageElement", "SVGLength", "SVGLengthList", "SVGLineElement", "SVGLinearGradientElement", "SVGMarkerElement", "SVGMaskElement", "SVGMatrix", + "SVGMetadataElement", "SVGNumber", "SVGNumberList", "SVGPathElement", "SVGPathSeg", "SVGPathSegArcAbs", "SVGPathSegArcRel", "SVGPathSegClosePath", "SVGPathSegCurvetoCubicAbs", + "SVGPathSegCurvetoCubicRel", "SVGPathSegCurvetoCubicSmoothAbs", "SVGPathSegCurvetoCubicSmoothRel", "SVGPathSegCurvetoQuadraticAbs", "SVGPathSegCurvetoQuadraticRel", + "SVGPathSegCurvetoQuadraticSmoothAbs", "SVGPathSegCurvetoQuadraticSmoothRel", "SVGPathSegLinetoAbs", "SVGPathSegLinetoHorizontalAbs", "SVGPathSegLinetoHorizontalRel", + "SVGPathSegLinetoRel", "SVGPathSegLinetoVerticalAbs", "SVGPathSegLinetoVerticalRel", "SVGPathSegList", "SVGPathSegMovetoAbs", "SVGPathSegMovetoRel", "SVGPatternElement", + "SVGPoint", "SVGPointList", "SVGPolygonElement", "SVGPolylineElement", "SVGPreserveAspectRatio", "SVGRadialGradientElement", "SVGRect", "SVGRectElement", "SVGSVGElement", + "SVGScriptElement", "SVGStopElement", "SVGStringList", "SVGStyleElement", "SVGSwitchElement", "SVGSymbolElement", "SVGTSpanElement", "SVGTextContentElement", "SVGTextElement", + "SVGTextPathElement", "SVGTextPositioningElement", "SVGTitleElement", "SVGTransform", "SVGTransformList", "SVGUnitTypes", "SVGUseElement", "SVGViewElement", "SVGZoomAndPan", + "SVGZoomEvent", "Screen", "ScriptEngine", "ScriptEngineBuildVersion", "ScriptEngineMajorVersion", "ScriptEngineMinorVersion", "Selection", ["Set",11], ["SourceBuffer",11], + ["SourceBufferList",11], "Storage", "StorageEvent", "String", "StyleMedia", "StyleSheet", "StyleSheetList", "StyleSheetPageList", ["SubtleCrypto",11], "SyntaxError", "Text", + "TextEvent", "TextMetrics", "TextRange", "TextRangeCollection", ["TextTrack",10], ["TextTrackCue",10], ["TextTrackCueList",10], ["TextTrackList",10], "TimeRanges", + ["TrackEvent",10], ["TransitionEvent",10], "TreeWalker", "TypeError", "UIEvent", "URIError", ["URL",10], ["Uint16Array",10], ["Uint32Array",10], ["Uint8Array",10], + ["Uint8ClampedArray",11], "VBArray", ["ValidityState",10], ["VideoPlaybackQuality",11], ["WEBGL_compressed_texture_s3tc",11], ["WEBGL_debug_renderer_info",11], ["WeakMap",11], + ["WebGLActiveInfo",11], ["WebGLBuffer",11], ["WebGLContextEvent",11], ["WebGLFramebuffer",11], ["WebGLObject",11], ["WebGLProgram",11], ["WebGLRenderbuffer",11], + ["WebGLRenderingContext",11], ["WebGLShader",11], ["WebGLShaderPrecisionFormat",11], ["WebGLTexture",11], ["WebGLUniformLocation",11], ["WebSocket",10], "WheelEvent", "Window", + ["Worker",10], ["XDomainRequest",0,10], ["XMLDocument",11], "XMLHttpRequest", ["XMLHttpRequestEventTarget",10], "XMLSerializer", "decodeURI", "decodeURIComponent", "encodeURI", + "encodeURIComponent", "escape", "eval", "isFinite", "isNaN", "parseFloat", "parseInt", "testprop", "undefined", "unescape" + ], [ + "ActiveXObject", ["AesGcmEncryptResult",11], ["ANGLE_instanced_arrays",11], ["AnimationEvent",10], ["ApplicationCache",10], "Array", ["ArrayBuffer",10], "Audio", ["AudioTrack",10], + ["AudioTrackList",10], "BeforeUnloadEvent", ["Blob",10], "BookmarkCollection", "Boolean", "CanvasGradient", "CanvasPattern", "CanvasPixelArray", "CanvasRenderingContext2D", + "CDATASection", ["CloseEvent",10], "CollectGarbage", "CompositionEvent", "ControlRangeCollection", "Coordinates", ["Crypto",11], ["CryptoOperation",11], "CSSFontFaceRule", + "CSSImportRule", ["CSSKeyframeRule",10], ["CSSKeyframesRule",10], "CSSMediaRule", "CSSNamespaceRule", "CSSPageRule", "CSSRuleList", "DataTransfer", ["DataView",10], "Date", "Debug", + ["DeviceAcceleration",11], ["DeviceMotionEvent",11], ["DeviceOrientationEvent",11], ["DeviceRotationRate",11], ["DOMError",10], "DOMException", "DOMParser", + ["DOMSettableTokenList",10], ["DOMStringList",10], ["DOMStringMap",11], "DragEvent", "Enumerator", "Error", ["ErrorEvent",10], "EvalError", "EventException", + ["EXT_texture_filter_anisotropic",11], ["File",10], ["FileList",10], ["FileReader",10], ["Float32Array",10], ["Float64Array",10], "FocusEvent", ["FormData",10], "Function", + "Geolocation", ["HTMLAllCollection",11], "HTMLAppletElement", "HTMLAreasCollection", "HTMLAudioElement", "HTMLBaseElement", "HTMLBaseFontElement", "HTMLBGSoundElement", + "HTMLBlockElement", "HTMLBRElement", "HTMLCanvasElement", ["HTMLDataListElement",10], "HTMLDDElement", "HTMLDirectoryElement", "HTMLDivElement", "HTMLDListElement", "HTMLDTElement", + "HTMLFieldSetElement", "HTMLFontElement", "HTMLFrameSetElement", "HTMLHeadingElement", "HTMLHRElement", "HTMLIsIndexElement", "HTMLLegendElement", "HTMLLIElement", "HTMLMapElement", + "HTMLMarqueeElement", "HTMLMediaElement", "HTMLMenuElement", "HTMLModElement", "HTMLNextIdElement", "HTMLOListElement", "HTMLOptGroupElement", "HTMLParagraphElement", + "HTMLParamElement", "HTMLPhraseElement", "HTMLPreElement", ["HTMLProgressElement",10], "HTMLQuoteElement", "HTMLSourceElement", "HTMLSpanElement", "HTMLTableCaptionElement", + "HTMLTableColElement", "HTMLTableHeaderCellElement", "HTMLTableSectionElement", ["HTMLTrackElement",10], "HTMLUListElement", "HTMLVideoElement", ["IDBCursor",10], + ["IDBCursorWithValue",10], ["IDBDatabase",10], ["IDBFactory",10], ["IDBIndex",10], ["IDBKeyRange",10], ["IDBObjectStore",10], ["IDBOpenDBRequest",10], ["IDBRequest",10], + ["IDBTransaction",10], ["IDBVersionChangeEvent",10], "ImageData", "Infinity", ["Int16Array",10], ["Int32Array",10], ["Int8Array",10], ["Intl",11], "JSON", ["Key",11], + ["KeyOperation",11], ["KeyPair",11], "Location", ["Map",11], "Math", "MediaError", "MediaList", ["MediaSource",11], ["MessageChannel",10], ["MessagePort",10], ["MimeType",11], + ["MimeTypeArray",9,10], "MouseWheelEvent", "MSBehaviorUrnsCollection", ["MSBlobBuilder",10], "MSCompatibleInfo", "MSCompatibleInfoCollection", ["MSCSSMatrix",10], ["MSGesture",10], + ["MSGestureEvent",10], ["MSGraphicsTrust",11], ["MSInputMethodContext",11], ["MSManipulationEvent",10], ["MSMediaKeyError",11], ["MSMediaKeyMessageEvent",11], + ["MSMediaKeyNeededEvent",11], ["MSMediaKeys",11], ["MSMediaKeySession",11], "MSMimeTypesCollection", ["MSNamespaceInfo",0,9], "MSPluginsCollection", ["MSPointerEvent",10], + ["MSPopupWindow",0,10], ["MSRangeCollection",10], "MSSiteModeEvent", ["MSStream",10], ["MSStreamReader",10], "MutationEvent", ["MutationRecord",11], "NaN", "NodeFilter", + "NodeIterator", "Number", "Object", ["OES_element_index_uint",11], ["OES_standard_derivatives",11], ["OES_texture_float",11], ["OES_texture_float_linear",11], "PerformanceEntry", + "PerformanceMark", "PerformanceMeasure", ["PerformanceNavigationTiming",11], "PerformanceResourceTiming", ["Plugin",11], ["PluginArray",9,10], ["PointerEvent",11], + ["PopStateEvent",10], "Position", "PositionError", "ProcessingInstruction", "RangeError", "RangeException", "ReferenceError", "RegExp", "ScriptEngine", "ScriptEngineBuildVersion", + "ScriptEngineMajorVersion", "ScriptEngineMinorVersion", "Selection", ["Set",11], ["SourceBuffer",11], ["SourceBufferList",11], "String", "StyleMedia", "StyleSheetPageList", + ["SubtleCrypto",11], "SVGAElement", "SVGAngle", "SVGAnimatedAngle", "SVGAnimatedBoolean", "SVGAnimatedEnumeration", "SVGAnimatedInteger", "SVGAnimatedLength", "SVGAnimatedLengthList", + "SVGAnimatedNumber", "SVGAnimatedNumberList", "SVGAnimatedPreserveAspectRatio", "SVGAnimatedRect", "SVGAnimatedString", "SVGAnimatedTransformList", "SVGClipPathElement", + ["SVGComponentTransferFunctionElement",10], "SVGDefsElement", "SVGDescElement", "SVGElementInstance", "SVGElementInstanceList", "SVGEllipseElement", "SVGException", + ["SVGFEBlendElement",10], ["SVGFEColorMatrixElement",10], ["SVGFEComponentTransferElement",10], ["SVGFECompositeElement",10], ["SVGFEConvolveMatrixElement",10], + ["SVGFEDiffuseLightingElement",10], ["SVGFEDisplacementMapElement",10], ["SVGFEDistantLightElement",10], ["SVGFEFloodElement",10], ["SVGFEFuncAElement",10], ["SVGFEFuncBElement",10], + ["SVGFEFuncGElement",10], ["SVGFEFuncRElement",10], ["SVGFEGaussianBlurElement",10], ["SVGFEImageElement",10], ["SVGFEMergeElement",10], ["SVGFEMergeNodeElement",10], + ["SVGFEMorphologyElement",10], ["SVGFEOffsetElement",10], ["SVGFEPointLightElement",10], ["SVGFESpecularLightingElement",10], ["SVGFESpotLightElement",10], ["SVGFETileElement",10], + ["SVGFETurbulenceElement",10], ["SVGFilterElement",10], "SVGGElement", "SVGGradientElement", "SVGImageElement", "SVGLength", "SVGLengthList", "SVGLinearGradientElement", + "SVGLineElement", "SVGMarkerElement", "SVGMaskElement", "SVGMatrix", "SVGMetadataElement", "SVGNumber", "SVGNumberList", "SVGPathElement", "SVGPathSeg", "SVGPathSegArcAbs", + "SVGPathSegArcRel", "SVGPathSegClosePath", "SVGPathSegCurvetoCubicAbs", "SVGPathSegCurvetoCubicRel", "SVGPathSegCurvetoCubicSmoothAbs", "SVGPathSegCurvetoCubicSmoothRel", + "SVGPathSegCurvetoQuadraticAbs", "SVGPathSegCurvetoQuadraticRel", "SVGPathSegCurvetoQuadraticSmoothAbs", "SVGPathSegCurvetoQuadraticSmoothRel", "SVGPathSegLinetoAbs", + "SVGPathSegLinetoHorizontalAbs", "SVGPathSegLinetoHorizontalRel", "SVGPathSegLinetoRel", "SVGPathSegLinetoVerticalAbs", "SVGPathSegLinetoVerticalRel", "SVGPathSegList", + "SVGPathSegMovetoAbs", "SVGPathSegMovetoRel", "SVGPatternElement", "SVGPoint", "SVGPointList", "SVGPolygonElement", "SVGPolylineElement", "SVGPreserveAspectRatio", + "SVGRadialGradientElement", "SVGRect", "SVGRectElement", "SVGScriptElement", "SVGStopElement", "SVGStringList", "SVGStyleElement", "SVGSwitchElement", "SVGSymbolElement", + "SVGTextElement", "SVGTextPathElement", "SVGTitleElement", "SVGTransform", "SVGTransformList", "SVGUnitTypes", "SVGUseElement", "SVGViewElement", "SVGZoomAndPan", "SVGZoomEvent", + "SyntaxError", "TextEvent", "TextMetrics", "TextRangeCollection", ["TextTrack",10], ["TextTrackCue",10], ["TextTrackCueList",10], ["TextTrackList",10], "TimeRanges", + ["TrackEvent",10], ["TransitionEvent",10], "TreeWalker", "TypeError", ["Uint16Array",10], ["Uint32Array",10], ["Uint8Array",10], ["Uint8ClampedArray",11], "URIError", + ["URL",10], ["ValidityState",10], "VBArray", ["VideoPlaybackQuality",11], ["WeakMap",11], ["WebGLActiveInfo",11], ["WebGLBuffer",11], ["WebGLContextEvent",11], ["WebGLFramebuffer",11], + ["WebGLObject",11], ["WebGLProgram",11], ["WebGLRenderbuffer",11], ["WebGLRenderingContext",11], ["WebGLShader",11], ["WebGLShaderPrecisionFormat",11], ["WebGLTexture",11], + ["WebGLUniformLocation",11], ["WEBGL_compressed_texture_s3tc",11], ["WEBGL_debug_renderer_info",11], ["WebSocket",10], "WheelEvent", ["Worker",10], ["XDomainRequest",9,10], + ["XMLDocument",11], ["XMLHttpRequestEventTarget",10], "XMLSerializer", "decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent", "escape", "eval", "isFinite", "isNaN", + "parseFloat", "parseInt", "undefined", "unescape" + ]); + next_test(); + } + + iframe.src = "about:blank"; + document.body.appendChild(iframe); +});
From: Gabriel Ivăncescu gabrielopcode@gmail.com
fdexEnumAll is useless.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/jscript/dispex.c | 22 +++++++++++++++++++ dlls/jscript/jscript.c | 7 ++++++ dlls/jscript/jscript.h | 1 + dlls/jscript/jsdisp.idl | 1 + dlls/jscript/tests/run.c | 44 ++++++++++++++++++++++++++++++++++++++ dlls/mshtml/htmlwindow.c | 4 ++++ dlls/mshtml/tests/script.c | 25 +++++++++++++++++++++- 7 files changed, 103 insertions(+), 1 deletion(-)
diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c index 110c021b6b8..3b475237970 100644 --- a/dlls/jscript/dispex.c +++ b/dlls/jscript/dispex.c @@ -3632,3 +3632,25 @@ IWineJSDispatchHost *get_host_dispatch(IDispatch *disp) IWineJSDispatchHost_GetOuterDispatch(host_obj->host_iface, &ret); return ret; } + +HRESULT fill_globals(script_ctx_t *ctx, IWineJSDispatchHost *script_global) +{ + jsdisp_t *global = ctx->global; + DISPID id = DISPID_STARTENUM; + struct property_info desc; + HRESULT hres; + + for(;;) { + hres = jsdisp_next_prop(global, id, JSDISP_ENUM_OWN, &id); + if(hres == S_FALSE) + break; + if(FAILED(hres)) + return hres; + + hres = IWineJSDispatchHost_LookupProperty(script_global, get_prop(global, id)->name, fdexNameCaseSensitive, &desc); + if(FAILED(hres)) + return hres; + } + + return S_OK; +} diff --git a/dlls/jscript/jscript.c b/dlls/jscript/jscript.c index 9a74d010ab5..a7f468a677a 100644 --- a/dlls/jscript/jscript.c +++ b/dlls/jscript/jscript.c @@ -1465,12 +1465,19 @@ static HRESULT WINAPI WineJScript_InitHostConstructor(IWineJScript *iface, IWine return init_host_constructor(This->ctx, constr, method_name, ret); }
+static HRESULT WINAPI WineJScript_FillGlobals(IWineJScript *iface, IWineJSDispatchHost *script_global) +{ + JScript *This = impl_from_IWineJScript(iface); + return fill_globals(This->ctx, script_global); +} + static const IWineJScriptVtbl WineJScriptVtbl = { WineJScript_QueryInterface, WineJScript_AddRef, WineJScript_Release, WineJScript_InitHostObject, WineJScript_InitHostConstructor, + WineJScript_FillGlobals, };
HRESULT create_jscript_object(BOOL is_encode, REFIID riid, void **ppv) diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 4f21cae941b..a3009239ba1 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -243,6 +243,7 @@ HRESULT init_dispex(jsdisp_t*,script_ctx_t*,const builtin_info_t*,jsdisp_t*); HRESULT init_dispex_from_constr(jsdisp_t*,script_ctx_t*,const builtin_info_t*,jsdisp_t*); HRESULT init_host_object(script_ctx_t*,IWineJSDispatchHost*,IWineJSDispatch*,UINT32,IWineJSDispatch**); HRESULT init_host_constructor(script_ctx_t*,IWineJSDispatchHost*,const WCHAR*,IWineJSDispatch**); +HRESULT fill_globals(script_ctx_t*,IWineJSDispatchHost*);
HRESULT disp_call(script_ctx_t*,IDispatch*,DISPID,WORD,unsigned,jsval_t*,jsval_t*); HRESULT disp_call_name(script_ctx_t*,IDispatch*,const WCHAR*,WORD,unsigned,jsval_t*,jsval_t*); diff --git a/dlls/jscript/jsdisp.idl b/dlls/jscript/jsdisp.idl index 22f22b641a4..abef1f32f61 100644 --- a/dlls/jscript/jsdisp.idl +++ b/dlls/jscript/jsdisp.idl @@ -87,4 +87,5 @@ interface IWineJScript : IUnknown { HRESULT InitHostObject(IWineJSDispatchHost *host_obj, IWineJSDispatch *prototype, UINT32 flags, IWineJSDispatch **ret); HRESULT InitHostConstructor(IWineJSDispatchHost *constr, const WCHAR *method_name, IWineJSDispatch **ret); + HRESULT FillGlobals(IWineJSDispatchHost *script_global); } diff --git a/dlls/jscript/tests/run.c b/dlls/jscript/tests/run.c index 106fd8c99d4..5d555b05eb0 100644 --- a/dlls/jscript/tests/run.c +++ b/dlls/jscript/tests/run.c @@ -3720,6 +3720,49 @@ static void test_members(void) IActiveScript_Release(script); }
+static void test_enum(void) +{ + DISPID id = DISPID_STARTENUM; + IActiveScriptParse *parser; + IActiveScript *engine; + IDispatchEx *dispex; + IDispatch *disp; + HRESULT hres; + + engine = create_script(); + + hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser); + ok(hres == S_OK, "Could not get IActiveScriptParse: %08lx\n", hres); + + hres = IActiveScriptParse_InitNew(parser); + ok(hres == S_OK, "InitNew failed: %08lx\n", hres); + IActiveScriptParse_Release(parser); + + hres = IActiveScript_SetScriptSite(engine, &ActiveScriptSite); + ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres); + + hres = IActiveScript_SetScriptState(engine, SCRIPTSTATE_STARTED); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08lx\n", hres); + + hres = IActiveScript_GetScriptDispatch(engine, NULL, &disp); + ok(hres == S_OK, "GetScriptDispatch failed: %08lx\n", hres); + ok(disp != NULL, "script disp == NULL\n"); + + hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex); + ok(hres == S_OK, "Could not get IDispatchEx iface: %08lx\n", hres); + IDispatch_Release(disp); + + hres = IDispatchEx_GetNextDispID(dispex, 0, id, &id); + ok(hres == S_FALSE, "GetNextDispID returned: %08lx\n", hres); + + id = DISPID_STARTENUM; + hres = IDispatchEx_GetNextDispID(dispex, fdexEnumAll, id, &id); + ok(hres == S_FALSE, "GetNextDispID returned: %08lx\n", hres); + + IDispatchEx_Release(dispex); + close_script(engine); +} + static void test_destructors(void) { static const WCHAR cyclic_refs[] = L"(function() {\n" @@ -4379,6 +4422,7 @@ static BOOL run_tests(void) test_script_exprs(); test_invokeex(); test_members(); + test_enum(); test_destructors(); test_eval(); test_error_reports(); diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 59ccffc0fa6..3a7d998f090 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -4007,6 +4007,10 @@ static HRESULT HTMLWindow_next_dispid(DispatchEx *dispex, DISPID id, BOOL enum_a
This->static_props_filled = TRUE; } + + hres = IWineJScript_FillGlobals(This->jscript, &This->event_target.dispex.IWineJSDispatchHost_iface); + if(FAILED(hres)) + return hres; }
while(idx < This->global_prop_cnt && This->global_props[idx].type != GLOBAL_DISPEXVAR) diff --git a/dlls/mshtml/tests/script.c b/dlls/mshtml/tests/script.c index f454de86711..2c0c907a9f4 100644 --- a/dlls/mshtml/tests/script.c +++ b/dlls/mshtml/tests/script.c @@ -319,11 +319,15 @@ fail:
static void test_sp_caller(IServiceProvider *sp) { + BOOL seen_doc, seen_undefined; IOleCommandTarget *cmdtarget; IServiceProvider *caller; IHTMLWindow2 *window; + IDispatchEx *dispex; HRESULT hres; VARIANT var; + DISPID id; + BSTR str;
hres = IServiceProvider_QueryService(sp, &SID_GetCaller, &IID_IServiceProvider, (void**)&caller); ok(hres == S_OK, "QueryService(SID_GetCaller) returned: %08lx\n", hres); @@ -343,8 +347,27 @@ static void test_sp_caller(IServiceProvider *sp) hres = IDispatch_QueryInterface(V_DISPATCH(&var), &IID_IHTMLWindow2, (void**)&window); ok(hres == S_OK, "QueryInterface(IHTMLWindow2) failed: %08lx\n", hres); ok(window != NULL, "window is NULL\n"); - IHTMLWindow2_Release(window); VariantClear(&var); + + hres = IHTMLWindow2_QueryInterface(window, &IID_IDispatchEx, (void**)&dispex); + ok(hres == S_OK, "Could not get IDispatchEx iface: %08lx\n", hres); + IHTMLWindow2_Release(window); + + for(id = DISPID_STARTENUM, seen_doc = FALSE, seen_undefined = FALSE;;) { + hres = IDispatchEx_GetNextDispID(dispex, fdexEnumAll, id, &id); + if(hres == S_FALSE) break; + ok(hres == S_OK, "GetNextDispID failed: %08lx\n", hres); + + hres = IDispatchEx_GetMemberName(dispex, id, &str); + ok(hres == S_OK, "GetMemberName failed: %08lx\n", hres); + if(!wcscmp(str, L"document")) seen_doc = TRUE; + if(!wcscmp(str, L"undefined")) seen_undefined = TRUE; + SysFreeString(str); + } + ok(seen_doc, "document was not enumerated from window\n"); + ok(!seen_undefined, "undefined was enumerated from window\n"); + + IDispatchEx_Release(dispex); }
static void test_script_vars(unsigned argc, VARIANTARG *argv)
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Even if the props are not enumerable.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlwindow.c | 3 +- dlls/mshtml/tests/documentmode.js | 85 +++++++++++++++---------------- 2 files changed, 42 insertions(+), 46 deletions(-)
diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 3a7d998f090..c608ab1c881 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -4013,7 +4013,8 @@ static HRESULT HTMLWindow_next_dispid(DispatchEx *dispex, DISPID id, BOOL enum_a return hres; }
- while(idx < This->global_prop_cnt && This->global_props[idx].type != GLOBAL_DISPEXVAR) + while(idx < This->global_prop_cnt && This->global_props[idx].type != GLOBAL_DISPEXVAR && + (!enum_all_own_props || This->global_props[idx].type != GLOBAL_SCRIPTVAR || global_prop_still_exists(This, &This->global_props[idx]) != S_OK)) idx++; if(idx >= This->global_prop_cnt) return S_FALSE; diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 8c76e264d81..d41f82647f0 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -4148,52 +4148,47 @@ async_test("window own props", function() { ["Worker",10], ["XDomainRequest",0,10], ["XMLDocument",11], "XMLHttpRequest", ["XMLHttpRequestEventTarget",10], "XMLSerializer", "decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent", "escape", "eval", "isFinite", "isNaN", "parseFloat", "parseInt", "testprop", "undefined", "unescape" ], [ - "ActiveXObject", ["AesGcmEncryptResult",11], ["ANGLE_instanced_arrays",11], ["AnimationEvent",10], ["ApplicationCache",10], "Array", ["ArrayBuffer",10], "Audio", ["AudioTrack",10], - ["AudioTrackList",10], "BeforeUnloadEvent", ["Blob",10], "BookmarkCollection", "Boolean", "CanvasGradient", "CanvasPattern", "CanvasPixelArray", "CanvasRenderingContext2D", - "CDATASection", ["CloseEvent",10], "CollectGarbage", "CompositionEvent", "ControlRangeCollection", "Coordinates", ["Crypto",11], ["CryptoOperation",11], "CSSFontFaceRule", - "CSSImportRule", ["CSSKeyframeRule",10], ["CSSKeyframesRule",10], "CSSMediaRule", "CSSNamespaceRule", "CSSPageRule", "CSSRuleList", "DataTransfer", ["DataView",10], "Date", "Debug", - ["DeviceAcceleration",11], ["DeviceMotionEvent",11], ["DeviceOrientationEvent",11], ["DeviceRotationRate",11], ["DOMError",10], "DOMException", "DOMParser", - ["DOMSettableTokenList",10], ["DOMStringList",10], ["DOMStringMap",11], "DragEvent", "Enumerator", "Error", ["ErrorEvent",10], "EvalError", "EventException", - ["EXT_texture_filter_anisotropic",11], ["File",10], ["FileList",10], ["FileReader",10], ["Float32Array",10], ["Float64Array",10], "FocusEvent", ["FormData",10], "Function", - "Geolocation", ["HTMLAllCollection",11], "HTMLAppletElement", "HTMLAreasCollection", "HTMLAudioElement", "HTMLBaseElement", "HTMLBaseFontElement", "HTMLBGSoundElement", - "HTMLBlockElement", "HTMLBRElement", "HTMLCanvasElement", ["HTMLDataListElement",10], "HTMLDDElement", "HTMLDirectoryElement", "HTMLDivElement", "HTMLDListElement", "HTMLDTElement", - "HTMLFieldSetElement", "HTMLFontElement", "HTMLFrameSetElement", "HTMLHeadingElement", "HTMLHRElement", "HTMLIsIndexElement", "HTMLLegendElement", "HTMLLIElement", "HTMLMapElement", - "HTMLMarqueeElement", "HTMLMediaElement", "HTMLMenuElement", "HTMLModElement", "HTMLNextIdElement", "HTMLOListElement", "HTMLOptGroupElement", "HTMLParagraphElement", - "HTMLParamElement", "HTMLPhraseElement", "HTMLPreElement", ["HTMLProgressElement",10], "HTMLQuoteElement", "HTMLSourceElement", "HTMLSpanElement", "HTMLTableCaptionElement", - "HTMLTableColElement", "HTMLTableHeaderCellElement", "HTMLTableSectionElement", ["HTMLTrackElement",10], "HTMLUListElement", "HTMLVideoElement", ["IDBCursor",10], - ["IDBCursorWithValue",10], ["IDBDatabase",10], ["IDBFactory",10], ["IDBIndex",10], ["IDBKeyRange",10], ["IDBObjectStore",10], ["IDBOpenDBRequest",10], ["IDBRequest",10], - ["IDBTransaction",10], ["IDBVersionChangeEvent",10], "ImageData", "Infinity", ["Int16Array",10], ["Int32Array",10], ["Int8Array",10], ["Intl",11], "JSON", ["Key",11], - ["KeyOperation",11], ["KeyPair",11], "Location", ["Map",11], "Math", "MediaError", "MediaList", ["MediaSource",11], ["MessageChannel",10], ["MessagePort",10], ["MimeType",11], - ["MimeTypeArray",9,10], "MouseWheelEvent", "MSBehaviorUrnsCollection", ["MSBlobBuilder",10], "MSCompatibleInfo", "MSCompatibleInfoCollection", ["MSCSSMatrix",10], ["MSGesture",10], - ["MSGestureEvent",10], ["MSGraphicsTrust",11], ["MSInputMethodContext",11], ["MSManipulationEvent",10], ["MSMediaKeyError",11], ["MSMediaKeyMessageEvent",11], - ["MSMediaKeyNeededEvent",11], ["MSMediaKeys",11], ["MSMediaKeySession",11], "MSMimeTypesCollection", ["MSNamespaceInfo",0,9], "MSPluginsCollection", ["MSPointerEvent",10], - ["MSPopupWindow",0,10], ["MSRangeCollection",10], "MSSiteModeEvent", ["MSStream",10], ["MSStreamReader",10], "MutationEvent", ["MutationRecord",11], "NaN", "NodeFilter", - "NodeIterator", "Number", "Object", ["OES_element_index_uint",11], ["OES_standard_derivatives",11], ["OES_texture_float",11], ["OES_texture_float_linear",11], "PerformanceEntry", - "PerformanceMark", "PerformanceMeasure", ["PerformanceNavigationTiming",11], "PerformanceResourceTiming", ["Plugin",11], ["PluginArray",9,10], ["PointerEvent",11], - ["PopStateEvent",10], "Position", "PositionError", "ProcessingInstruction", "RangeError", "RangeException", "ReferenceError", "RegExp", "ScriptEngine", "ScriptEngineBuildVersion", - "ScriptEngineMajorVersion", "ScriptEngineMinorVersion", "Selection", ["Set",11], ["SourceBuffer",11], ["SourceBufferList",11], "String", "StyleMedia", "StyleSheetPageList", - ["SubtleCrypto",11], "SVGAElement", "SVGAngle", "SVGAnimatedAngle", "SVGAnimatedBoolean", "SVGAnimatedEnumeration", "SVGAnimatedInteger", "SVGAnimatedLength", "SVGAnimatedLengthList", - "SVGAnimatedNumber", "SVGAnimatedNumberList", "SVGAnimatedPreserveAspectRatio", "SVGAnimatedRect", "SVGAnimatedString", "SVGAnimatedTransformList", "SVGClipPathElement", - ["SVGComponentTransferFunctionElement",10], "SVGDefsElement", "SVGDescElement", "SVGElementInstance", "SVGElementInstanceList", "SVGEllipseElement", "SVGException", - ["SVGFEBlendElement",10], ["SVGFEColorMatrixElement",10], ["SVGFEComponentTransferElement",10], ["SVGFECompositeElement",10], ["SVGFEConvolveMatrixElement",10], - ["SVGFEDiffuseLightingElement",10], ["SVGFEDisplacementMapElement",10], ["SVGFEDistantLightElement",10], ["SVGFEFloodElement",10], ["SVGFEFuncAElement",10], ["SVGFEFuncBElement",10], - ["SVGFEFuncGElement",10], ["SVGFEFuncRElement",10], ["SVGFEGaussianBlurElement",10], ["SVGFEImageElement",10], ["SVGFEMergeElement",10], ["SVGFEMergeNodeElement",10], + ["AesGcmEncryptResult",11], ["ANGLE_instanced_arrays",11], ["AnimationEvent",10], ["ApplicationCache",10], ["ArrayBuffer",9,9], "Audio", ["AudioTrack",10], ["AudioTrackList",10], + "BeforeUnloadEvent", ["Blob",10], "BookmarkCollection", "CanvasGradient", "CanvasPattern", "CanvasPixelArray", "CanvasRenderingContext2D", "CDATASection", ["CloseEvent",10], + "CompositionEvent", "ControlRangeCollection", "Coordinates", ["Crypto",11], ["CryptoOperation",11], "CSSFontFaceRule", "CSSImportRule", ["CSSKeyframeRule",10], ["CSSKeyframesRule",10], + "CSSMediaRule", "CSSNamespaceRule", "CSSPageRule", "CSSRuleList", "DataTransfer", ["DataView",9,9], "Debug", ["DeviceAcceleration",11], ["DeviceMotionEvent",11], + ["DeviceOrientationEvent",11], ["DeviceRotationRate",11], ["DOMError",10], "DOMException", "DOMParser", ["DOMSettableTokenList",10], ["DOMStringList",10], ["DOMStringMap",11], + "DragEvent", ["ErrorEvent",10], "EventException", ["EXT_texture_filter_anisotropic",11], ["File",10], ["FileList",10], ["FileReader",10], ["Float32Array",10], ["Float64Array",10], + "FocusEvent", ["FormData",10], "Geolocation", "GetObject", ["HTMLAllCollection",11], "HTMLAppletElement", "HTMLAreasCollection", "HTMLAudioElement", "HTMLBaseElement", + "HTMLBaseFontElement", "HTMLBGSoundElement", "HTMLBlockElement", "HTMLBRElement", "HTMLCanvasElement", ["HTMLDataListElement",10], "HTMLDDElement", "HTMLDirectoryElement", + "HTMLDivElement", "HTMLDListElement", "HTMLDTElement", "HTMLFieldSetElement", "HTMLFontElement", "HTMLFrameSetElement", "HTMLHeadingElement", "HTMLHRElement", "HTMLIsIndexElement", + "HTMLLegendElement", "HTMLLIElement", "HTMLMapElement", "HTMLMarqueeElement", "HTMLMediaElement", "HTMLMenuElement", "HTMLModElement", "HTMLNextIdElement", "HTMLOListElement", + "HTMLOptGroupElement", "HTMLParagraphElement", "HTMLParamElement", "HTMLPhraseElement", "HTMLPreElement", ["HTMLProgressElement",10], "HTMLQuoteElement", "HTMLSourceElement", + "HTMLSpanElement", "HTMLTableCaptionElement", "HTMLTableColElement", "HTMLTableHeaderCellElement", "HTMLTableSectionElement", ["HTMLTrackElement",10], "HTMLUListElement", + "HTMLVideoElement", ["IDBCursor",10], ["IDBCursorWithValue",10], ["IDBDatabase",10], ["IDBFactory",10], ["IDBIndex",10], ["IDBKeyRange",10], ["IDBObjectStore",10], ["IDBOpenDBRequest",10], + ["IDBRequest",10], ["IDBTransaction",10], ["IDBVersionChangeEvent",10], "ImageData", ["Int16Array",10], ["Int32Array",10], ["Int8Array",10], ["Intl",11], ["Key",11], ["KeyOperation",11], + ["KeyPair",11], "Location", "MediaError", "MediaList", ["MediaSource",11], ["MessageChannel",10], ["MessagePort",10], ["MimeType",11], ["MimeTypeArray",9,10], "MouseWheelEvent", + "MSBehaviorUrnsCollection", ["MSBlobBuilder",10], "MSCompatibleInfo", "MSCompatibleInfoCollection", ["MSCSSMatrix",10], ["MSGesture",10], ["MSGestureEvent",10], ["MSGraphicsTrust",11], + ["MSInputMethodContext",11], ["MSManipulationEvent",10], ["MSMediaKeyError",11], ["MSMediaKeyMessageEvent",11], ["MSMediaKeyNeededEvent",11], ["MSMediaKeys",11], ["MSMediaKeySession",11], + "MSMimeTypesCollection", ["MSNamespaceInfo",0,9], "MSPluginsCollection", ["MSPointerEvent",10], ["MSPopupWindow",0,10], ["MSRangeCollection",10], "MSSiteModeEvent", ["MSStream",10], + ["MSStreamReader",10], "MutationEvent", ["MutationRecord",11], "NodeFilter", "NodeIterator", ["OES_element_index_uint",11], ["OES_standard_derivatives",11], ["OES_texture_float",11], + ["OES_texture_float_linear",11], "PerformanceEntry", "PerformanceMark", "PerformanceMeasure", ["PerformanceNavigationTiming",11], "PerformanceResourceTiming", ["Plugin",11], + ["PluginArray",9,10], ["PointerEvent",11], ["PopStateEvent",10], "Position", "PositionError", "ProcessingInstruction", "RangeException", "RegExpError", "Selection", ["SourceBuffer",11], + ["SourceBufferList",11], "StyleMedia", "StyleSheetPageList", ["SubtleCrypto",11], "SVGAElement", "SVGAngle", "SVGAnimatedAngle", "SVGAnimatedBoolean", "SVGAnimatedEnumeration", + "SVGAnimatedInteger", "SVGAnimatedLength", "SVGAnimatedLengthList", "SVGAnimatedNumber", "SVGAnimatedNumberList", "SVGAnimatedPreserveAspectRatio", "SVGAnimatedRect", "SVGAnimatedString", + "SVGAnimatedTransformList", "SVGClipPathElement", ["SVGComponentTransferFunctionElement",10], "SVGDefsElement", "SVGDescElement", "SVGElementInstance", "SVGElementInstanceList", + "SVGEllipseElement", "SVGException", ["SVGFEBlendElement",10], ["SVGFEColorMatrixElement",10], ["SVGFEComponentTransferElement",10], ["SVGFECompositeElement",10], + ["SVGFEConvolveMatrixElement",10], ["SVGFEDiffuseLightingElement",10], ["SVGFEDisplacementMapElement",10], ["SVGFEDistantLightElement",10], ["SVGFEFloodElement",10], ["SVGFEFuncAElement",10], + ["SVGFEFuncBElement",10], ["SVGFEFuncGElement",10], ["SVGFEFuncRElement",10], ["SVGFEGaussianBlurElement",10], ["SVGFEImageElement",10], ["SVGFEMergeElement",10], ["SVGFEMergeNodeElement",10], ["SVGFEMorphologyElement",10], ["SVGFEOffsetElement",10], ["SVGFEPointLightElement",10], ["SVGFESpecularLightingElement",10], ["SVGFESpotLightElement",10], ["SVGFETileElement",10], - ["SVGFETurbulenceElement",10], ["SVGFilterElement",10], "SVGGElement", "SVGGradientElement", "SVGImageElement", "SVGLength", "SVGLengthList", "SVGLinearGradientElement", - "SVGLineElement", "SVGMarkerElement", "SVGMaskElement", "SVGMatrix", "SVGMetadataElement", "SVGNumber", "SVGNumberList", "SVGPathElement", "SVGPathSeg", "SVGPathSegArcAbs", - "SVGPathSegArcRel", "SVGPathSegClosePath", "SVGPathSegCurvetoCubicAbs", "SVGPathSegCurvetoCubicRel", "SVGPathSegCurvetoCubicSmoothAbs", "SVGPathSegCurvetoCubicSmoothRel", - "SVGPathSegCurvetoQuadraticAbs", "SVGPathSegCurvetoQuadraticRel", "SVGPathSegCurvetoQuadraticSmoothAbs", "SVGPathSegCurvetoQuadraticSmoothRel", "SVGPathSegLinetoAbs", - "SVGPathSegLinetoHorizontalAbs", "SVGPathSegLinetoHorizontalRel", "SVGPathSegLinetoRel", "SVGPathSegLinetoVerticalAbs", "SVGPathSegLinetoVerticalRel", "SVGPathSegList", - "SVGPathSegMovetoAbs", "SVGPathSegMovetoRel", "SVGPatternElement", "SVGPoint", "SVGPointList", "SVGPolygonElement", "SVGPolylineElement", "SVGPreserveAspectRatio", - "SVGRadialGradientElement", "SVGRect", "SVGRectElement", "SVGScriptElement", "SVGStopElement", "SVGStringList", "SVGStyleElement", "SVGSwitchElement", "SVGSymbolElement", - "SVGTextElement", "SVGTextPathElement", "SVGTitleElement", "SVGTransform", "SVGTransformList", "SVGUnitTypes", "SVGUseElement", "SVGViewElement", "SVGZoomAndPan", "SVGZoomEvent", - "SyntaxError", "TextEvent", "TextMetrics", "TextRangeCollection", ["TextTrack",10], ["TextTrackCue",10], ["TextTrackCueList",10], ["TextTrackList",10], "TimeRanges", - ["TrackEvent",10], ["TransitionEvent",10], "TreeWalker", "TypeError", ["Uint16Array",10], ["Uint32Array",10], ["Uint8Array",10], ["Uint8ClampedArray",11], "URIError", - ["URL",10], ["ValidityState",10], "VBArray", ["VideoPlaybackQuality",11], ["WeakMap",11], ["WebGLActiveInfo",11], ["WebGLBuffer",11], ["WebGLContextEvent",11], ["WebGLFramebuffer",11], - ["WebGLObject",11], ["WebGLProgram",11], ["WebGLRenderbuffer",11], ["WebGLRenderingContext",11], ["WebGLShader",11], ["WebGLShaderPrecisionFormat",11], ["WebGLTexture",11], - ["WebGLUniformLocation",11], ["WEBGL_compressed_texture_s3tc",11], ["WEBGL_debug_renderer_info",11], ["WebSocket",10], "WheelEvent", ["Worker",10], ["XDomainRequest",9,10], - ["XMLDocument",11], ["XMLHttpRequestEventTarget",10], "XMLSerializer", "decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent", "escape", "eval", "isFinite", "isNaN", - "parseFloat", "parseInt", "undefined", "unescape" + ["SVGFETurbulenceElement",10], ["SVGFilterElement",10], "SVGGElement", "SVGGradientElement", "SVGImageElement", "SVGLength", "SVGLengthList", "SVGLinearGradientElement", "SVGLineElement", + "SVGMarkerElement", "SVGMaskElement", "SVGMatrix", "SVGMetadataElement", "SVGNumber", "SVGNumberList", "SVGPathElement", "SVGPathSeg", "SVGPathSegArcAbs", "SVGPathSegArcRel", + "SVGPathSegClosePath", "SVGPathSegCurvetoCubicAbs", "SVGPathSegCurvetoCubicRel", "SVGPathSegCurvetoCubicSmoothAbs", "SVGPathSegCurvetoCubicSmoothRel", "SVGPathSegCurvetoQuadraticAbs", + "SVGPathSegCurvetoQuadraticRel", "SVGPathSegCurvetoQuadraticSmoothAbs", "SVGPathSegCurvetoQuadraticSmoothRel", "SVGPathSegLinetoAbs", "SVGPathSegLinetoHorizontalAbs", + "SVGPathSegLinetoHorizontalRel", "SVGPathSegLinetoRel", "SVGPathSegLinetoVerticalAbs", "SVGPathSegLinetoVerticalRel", "SVGPathSegList", "SVGPathSegMovetoAbs", "SVGPathSegMovetoRel", + "SVGPatternElement", "SVGPoint", "SVGPointList", "SVGPolygonElement", "SVGPolylineElement", "SVGPreserveAspectRatio", "SVGRadialGradientElement", "SVGRect", "SVGRectElement", + "SVGScriptElement", "SVGStopElement", "SVGStringList", "SVGStyleElement", "SVGSwitchElement", "SVGSymbolElement", "SVGTextElement", "SVGTextPathElement", "SVGTitleElement", + "SVGTransform", "SVGTransformList", "SVGUnitTypes", "SVGUseElement", "SVGViewElement", "SVGZoomAndPan", "SVGZoomEvent", "TextEvent", "TextMetrics", "TextRangeCollection", ["TextTrack",10], + ["TextTrackCue",10], ["TextTrackCueList",10], ["TextTrackList",10], "TimeRanges", ["TrackEvent",10], ["TransitionEvent",10], "TreeWalker", ["Uint16Array",10], ["Uint32Array",10], + ["Uint8Array",10], ["Uint8ClampedArray",11], ["URL",10], ["ValidityState",10], ["VideoPlaybackQuality",11], ["WebGLActiveInfo",11], ["WebGLBuffer",11], ["WebGLContextEvent",11], + ["WebGLFramebuffer",11], ["WebGLObject",11], ["WebGLProgram",11], ["WebGLRenderbuffer",11], ["WebGLRenderingContext",11], ["WebGLShader",11], ["WebGLShaderPrecisionFormat",11], + ["WebGLTexture",11], ["WebGLUniformLocation",11], ["WEBGL_compressed_texture_s3tc",11], ["WEBGL_debug_renderer_info",11], ["WebSocket",10], "WheelEvent", ["Worker",10], + ["XDomainRequest",9,10], ["XMLDocument",11], ["XMLHttpRequestEventTarget",10], "XMLSerializer" ]); next_test(); }
This merge request was approved by Jacek Caban.