-- v2: jscript: Add stub implementations for typed array constructors. jscript: Don't expose DataView and ArrayBuffer objects in IE9 mode. jscript: Move SCRIPTLANGUAGEVERSION_ declarations to jsdisp.idl.
From: Jacek Caban jacek@codeweavers.com
Makes it easier to run individual tests such as documentmode.js. --- dlls/mshtml/tests/script.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/mshtml/tests/script.c b/dlls/mshtml/tests/script.c index 2c0c907a9f4..2703ba68e4e 100644 --- a/dlls/mshtml/tests/script.c +++ b/dlls/mshtml/tests/script.c @@ -5298,7 +5298,9 @@ START_TEST(script) detect_locale(); if(argc > 2) { init_protocol_handler(); - run_script_as_http_with_mode(argv[2], NULL, "11"); + run_script_as_http_with_mode(argv[2], + argc > 4 ? argv[4] : NULL, + argc > 3 ? argv[3] : "11"); }else if(check_ie()) { if(winetest_interactive || ! is_ie_hardened()) { if(register_script_engine()) {
From: Gabriel Ivăncescu gabrielopcode@gmail.com
--- dlls/jscript/dispex.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c index c5e1fb7e8a9..897df1a0773 100644 --- a/dlls/jscript/dispex.c +++ b/dlls/jscript/dispex.c @@ -108,7 +108,7 @@ static inline BOOL is_function_prop(dispex_prop_t *prop) return ret; }
-static DWORD get_flags(jsdisp_t *This, dispex_prop_t *prop) +static BOOL is_enumerable(jsdisp_t *This, dispex_prop_t *prop) { if(prop->type == PROP_PROTREF) { dispex_prop_t *parent = NULL; @@ -118,13 +118,13 @@ static DWORD get_flags(jsdisp_t *This, dispex_prop_t *prop)
if(!parent || parent->type == PROP_DELETED) { prop->type = PROP_DELETED; - return 0; + return FALSE; }
- return get_flags(This->prototype, parent); + return is_enumerable(This->prototype, parent); }
- return prop->flags; + return !!(prop->flags & PROPF_ENUMERABLE); }
static const builtin_prop_t *find_builtin_prop(jsdisp_t *This, const WCHAR *name, BOOL case_insens) @@ -3170,7 +3170,7 @@ HRESULT jsdisp_next_prop(jsdisp_t *obj, DISPID id, enum jsdisp_enum_type enum_ty continue; if(enum_type != JSDISP_ENUM_ALL && iter->type == PROP_PROTREF) continue; - if(enum_type != JSDISP_ENUM_OWN && !(get_flags(obj, iter) & PROPF_ENUMERABLE)) + if(enum_type != JSDISP_ENUM_OWN && !is_enumerable(obj, iter)) continue; *ret = prop_to_id(obj, iter); return S_OK;
From: Jacek Caban jacek@codeweavers.com
--- dlls/jscript/jscript.h | 13 ------------- dlls/jscript/jsdisp.idl | 4 ++++ dlls/mshtml/script.c | 5 ----- 3 files changed, 4 insertions(+), 18 deletions(-)
diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 0540bce380d..5e6685547ab 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -35,19 +35,6 @@ #include "wine/list.h" #include "wine/rbtree.h"
-/* - * This is Wine jscript extension for ES5 compatible mode. Native IE9+ implements - * a separated JavaScript enging in side MSHTML. We implement its features here - * and enable it when HTML flag is specified in SCRIPTPROP_INVOKEVERSIONING property. - */ -#define SCRIPTLANGUAGEVERSION_HTML 0x400 - -/* - * This is Wine jscript extension for ES5 and ES6 compatible mode. Allowed only in HTML mode. - */ -#define SCRIPTLANGUAGEVERSION_ES5 0x102 -#define SCRIPTLANGUAGEVERSION_ES6 0x103 - typedef struct _jsval_t jsval_t; typedef struct _jsstr_t jsstr_t; typedef struct _jsexcept_t jsexcept_t; diff --git a/dlls/jscript/jsdisp.idl b/dlls/jscript/jsdisp.idl index 22349ecb50c..f45640d7ee7 100644 --- a/dlls/jscript/jsdisp.idl +++ b/dlls/jscript/jsdisp.idl @@ -78,6 +78,10 @@ interface IWineJSDispatchHost : IDispatchEx HRESULT ToString(BSTR *str); }
+const unsigned int SCRIPTLANGUAGEVERSION_HTML = 0x400; +const unsigned int SCRIPTLANGUAGEVERSION_ES5 = 0x102; +const unsigned int SCRIPTLANGUAGEVERSION_ES6 = 0x103; + [ object, uuid(d359f2fe-5531-741b-a41a-5cf92edc971d), diff --git a/dlls/mshtml/script.c b/dlls/mshtml/script.c index 487fa148b5c..52ce05c5179 100644 --- a/dlls/mshtml/script.c +++ b/dlls/mshtml/script.c @@ -62,11 +62,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
#endif
-/* See jscript.h in jscript.dll. */ -#define SCRIPTLANGUAGEVERSION_HTML 0x400 -#define SCRIPTLANGUAGEVERSION_ES5 0x102 -#define SCRIPTLANGUAGEVERSION_ES6 0x103 - struct ScriptHost { IActiveScriptSite IActiveScriptSite_iface; IActiveScriptSiteInterruptPoll IActiveScriptSiteInterruptPoll_iface;
From: Jacek Caban jacek@codeweavers.com
--- dlls/jscript/arraybuf.c | 2 +- dlls/jscript/jsdisp.idl | 3 ++- dlls/mshtml/script.c | 15 ++++++++++++--- dlls/mshtml/tests/documentmode.js | 4 ++-- 4 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/dlls/jscript/arraybuf.c b/dlls/jscript/arraybuf.c index fc01773338f..cb3eef271de 100644 --- a/dlls/jscript/arraybuf.c +++ b/dlls/jscript/arraybuf.c @@ -700,7 +700,7 @@ HRESULT init_arraybuf_constructors(script_ctx_t *ctx) HRESULT hres; unsigned i;
- if(ctx->version < SCRIPTLANGUAGEVERSION_ES5) + if(ctx->version < SCRIPTLANGUAGEVERSION_ES5_1) return S_OK;
if(!(arraybuf = calloc(1, FIELD_OFFSET(ArrayBufferInstance, buf[0])))) diff --git a/dlls/jscript/jsdisp.idl b/dlls/jscript/jsdisp.idl index f45640d7ee7..a9941b98070 100644 --- a/dlls/jscript/jsdisp.idl +++ b/dlls/jscript/jsdisp.idl @@ -80,7 +80,8 @@ interface IWineJSDispatchHost : IDispatchEx
const unsigned int SCRIPTLANGUAGEVERSION_HTML = 0x400; const unsigned int SCRIPTLANGUAGEVERSION_ES5 = 0x102; -const unsigned int SCRIPTLANGUAGEVERSION_ES6 = 0x103; +const unsigned int SCRIPTLANGUAGEVERSION_ES5_1 = 0x103; +const unsigned int SCRIPTLANGUAGEVERSION_ES6 = 0x104;
[ object, diff --git a/dlls/mshtml/script.c b/dlls/mshtml/script.c index 52ce05c5179..786c49990d3 100644 --- a/dlls/mshtml/script.c +++ b/dlls/mshtml/script.c @@ -151,10 +151,19 @@ static BOOL init_script_engine(ScriptHost *script_host, IActiveScript *script) compat_mode = lock_document_mode(script_host->window->doc); script_mode = compat_mode < COMPAT_MODE_IE8 ? SCRIPTLANGUAGEVERSION_5_7 : SCRIPTLANGUAGEVERSION_5_8; if(IsEqualGUID(&script_host->guid, &CLSID_JScript)) { - if(compat_mode >= COMPAT_MODE_IE11) - script_mode = SCRIPTLANGUAGEVERSION_ES6; - else if(compat_mode >= COMPAT_MODE_IE9) + switch(compat_mode) { + case COMPAT_MODE_IE9: script_mode = SCRIPTLANGUAGEVERSION_ES5; + break; + case COMPAT_MODE_IE10: + script_mode = SCRIPTLANGUAGEVERSION_ES5_1; + break; + case COMPAT_MODE_IE11: + script_mode = SCRIPTLANGUAGEVERSION_ES6; + break; + default: + break; + } script_mode |= SCRIPTLANGUAGEVERSION_HTML; } V_VT(&var) = VT_I4; diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 6cacb0f2303..ace0bcad06e 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -4626,10 +4626,10 @@ 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" ], [ - ["AesGcmEncryptResult",11], ["ANGLE_instanced_arrays",11], ["AnimationEvent",10], ["ApplicationCache",10], ["ArrayBuffer",9,9], "Audio", ["AudioTrack",10], ["AudioTrackList",10], + ["AesGcmEncryptResult",11], ["ANGLE_instanced_arrays",11], ["AnimationEvent",10], ["ApplicationCache",10], "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], + "CSSMediaRule", "CSSNamespaceRule", "CSSPageRule", "CSSRuleList", "DataTransfer", "Debug", ["DeviceAcceleration",11], ["DeviceMotionEvent",11], ["DeviceOrientationEvent",11], ["DeviceRotationRate",11], ["DOMError",10], "DOMException", ["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",
From: Gabriel Ivăncescu gabrielopcode@gmail.com
--- dlls/jscript/arraybuf.c | 111 ++++++++++++++++++++++++++++++ dlls/jscript/jscript.h | 16 ++++- dlls/jscript/object.c | 8 +++ dlls/mshtml/tests/documentmode.js | 34 +++++++-- dlls/mshtml/tests/es5.js | 8 +++ 5 files changed, 172 insertions(+), 5 deletions(-)
diff --git a/dlls/jscript/arraybuf.c b/dlls/jscript/arraybuf.c index cb3eef271de..82df57243eb 100644 --- a/dlls/jscript/arraybuf.c +++ b/dlls/jscript/arraybuf.c @@ -684,6 +684,108 @@ static const builtin_info_t DataViewConstr_info = { .call = Function_value, };
+/* NOTE: Keep in sync with the JSCLASS ordering of typed arrays */ +#define ALL_TYPED_ARRAYS \ + X(Int8Array) \ + X(Int16Array) \ + X(Int32Array) \ + X(Uint8Array) \ + X(Uint16Array) \ + X(Uint32Array) \ + X(Float32Array) \ + X(Float64Array) + +enum { +#define X(name) name ##_desc_idx, +ALL_TYPED_ARRAYS +#undef X +}; + +static HRESULT TypedArray_get_buffer(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r) +{ + FIXME("%p\n", jsthis); + return E_NOTIMPL; +} + +static HRESULT TypedArray_get_byteLength(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r) +{ + FIXME("%p\n", jsthis); + return E_NOTIMPL; +} + +static HRESULT TypedArray_get_byteOffset(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r) +{ + FIXME("%p\n", jsthis); + return E_NOTIMPL; +} + +static HRESULT TypedArray_get_length(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r) +{ + FIXME("%p\n", jsthis); + return E_NOTIMPL; +} + +#define X(name) \ +static HRESULT name##_set(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) \ +{ \ + FIXME("\n"); \ + return E_NOTIMPL; \ +} \ + \ +static HRESULT name##_subarray(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) \ +{ \ + FIXME("\n"); \ + return E_NOTIMPL; \ +} \ + \ +static const builtin_prop_t name##_props[] = { \ + {L"buffer", NULL, 0, TypedArray_get_buffer}, \ + {L"byteLength", NULL, 0, TypedArray_get_byteLength}, \ + {L"byteOffset", NULL, 0, TypedArray_get_byteOffset}, \ + {L"length", NULL, 0, TypedArray_get_length}, \ + {L"set", name##_set, PROPF_METHOD|2}, \ + {L"subarray", name##_subarray, PROPF_METHOD|2}, \ +}; \ + \ +static const builtin_info_t name##_info = \ +{ \ + .class = FIRST_TYPEDARRAY_JSCLASS + name ##_desc_idx, \ + .props_cnt = ARRAY_SIZE(name##_props), \ + .props = name##_props, \ +}; \ + \ +static HRESULT name ## Constr_value(script_ctx_t *ctx, jsval_t jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) \ +{ \ + FIXME("\n"); \ + return E_NOTIMPL; \ +} +ALL_TYPED_ARRAYS +#undef X + +static const builtin_info_t TypedArrayConstr_info = { + .class = JSCLASS_FUNCTION, + .call = Function_value, +}; + +static HRESULT init_typed_array_constructor(script_ctx_t *ctx, builtin_invoke_t func, const WCHAR *name, + const builtin_info_t *info, unsigned int type_idx) +{ + jsdisp_t *prototype; + HRESULT hres; + + hres = create_dispex(ctx, info, ctx->object_prototype, &prototype); + if(FAILED(hres)) + return hres; + + hres = create_builtin_constructor(ctx, func, name, &TypedArrayConstr_info, PROPF_CONSTR|1, prototype, &ctx->typedarr_constr[type_idx]); + jsdisp_release(prototype); + if(FAILED(hres)) + return hres; + + return jsdisp_define_data_property(ctx->global, name, PROPF_CONFIGURABLE | PROPF_WRITABLE, + jsval_obj(ctx->typedarr_constr[type_idx])); +} + HRESULT init_arraybuf_constructors(script_ctx_t *ctx) { static const struct { @@ -766,6 +868,15 @@ HRESULT init_arraybuf_constructors(script_ctx_t *ctx)
hres = jsdisp_define_data_property(ctx->global, L"DataView", PROPF_CONFIGURABLE | PROPF_WRITABLE, jsval_obj(ctx->dataview_constr)); + if(FAILED(hres)) + return hres; + +#define X(name) \ + hres = init_typed_array_constructor(ctx, name##Constr_value, L"" #name, &name##_info, name##_desc_idx); \ + if(FAILED(hres)) \ + return hres; + ALL_TYPED_ARRAYS +#undef X
return hres; } diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 5e6685547ab..5a8910565b3 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -100,12 +100,25 @@ typedef enum { JSCLASS_JSON, JSCLASS_ARRAYBUFFER, JSCLASS_DATAVIEW, + JSCLASS_INT8ARRAY, + JSCLASS_INT16ARRAY, + JSCLASS_INT32ARRAY, + JSCLASS_UINT8ARRAY, + JSCLASS_UINT16ARRAY, + JSCLASS_UINT32ARRAY, + JSCLASS_FLOAT32ARRAY, + JSCLASS_FLOAT64ARRAY, JSCLASS_MAP, JSCLASS_SET, JSCLASS_WEAKMAP, JSCLASS_HOST, + + FIRST_TYPEDARRAY_JSCLASS = JSCLASS_INT8ARRAY, + LAST_TYPEDARRAY_JSCLASS = JSCLASS_FLOAT64ARRAY, } jsclass_t;
+enum { NUM_TYPEDARRAY_TYPES = LAST_TYPEDARRAY_JSCLASS - FIRST_TYPEDARRAY_JSCLASS + 1 }; + jsdisp_t *iface_to_jsdisp(IDispatch*);
typedef HRESULT (*builtin_invoke_t)(script_ctx_t*,jsval_t,WORD,unsigned,jsval_t*,jsval_t*); @@ -420,11 +433,12 @@ struct _script_ctx_t { jsdisp_t *vbarray_constr; jsdisp_t *arraybuf_constr; jsdisp_t *dataview_constr; + jsdisp_t *typedarr_constr[NUM_TYPEDARRAY_TYPES]; jsdisp_t *map_prototype; jsdisp_t *set_prototype; jsdisp_t *weakmap_prototype; }; - jsdisp_t *global_objects[25]; + jsdisp_t *global_objects[25 + NUM_TYPEDARRAY_TYPES]; }; }; C_ASSERT(RTL_SIZEOF_THROUGH_FIELD(script_ctx_t, weakmap_prototype) == RTL_SIZEOF_THROUGH_FIELD(script_ctx_t, global_objects)); diff --git a/dlls/jscript/object.c b/dlls/jscript/object.c index a1ba990695b..bda4d28ecef 100644 --- a/dlls/jscript/object.c +++ b/dlls/jscript/object.c @@ -53,6 +53,14 @@ HRESULT Object_toString(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned a L"[object Object]", L"[object ArrayBuffer]", L"[object Object]", + L"[object Int8Array]", + L"[object Int16Array]", + L"[object Int32Array]", + L"[object Uint8Array]", + L"[object Uint16Array]", + L"[object Uint32Array]", + L"[object Float32Array]", + L"[object Float64Array]", L"[object Object]", L"[object Object]", L"[object Object]", diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index ace0bcad06e..be141928453 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -4556,6 +4556,32 @@ sync_test("constructors", function() { HTMLMetaElement.prototype.constructor = old; });
+sync_test("typed arrays", function() { + if (document.documentMode < 10) + return; + + function check(constr) { + ok(Object.getPrototypeOf(constr) === Function.prototype, "unexpected " + constr + " porototype " + Object.getPrototypeOf(constr)); + ok(Object.getPrototypeOf(constr.prototype) === Object.prototype, + "unexpected " + constr + " porototype's prototype " + Object.getPrototypeOf(constr.prototype)); + test_own_props(constr, constr, + ["BYTES_PER_ELEMENT", "arguments", "caller", "length", "prototype"], + ["BYTES_PER_ELEMENT", "arguments", "caller"]); + test_own_props(constr.prototype, constr + ".prototype", + ["BYTES_PER_ELEMENT", "buffer", "byteLength", "byteOffset", "constructor", "length", "set", "subarray"], + ["BYTES_PER_ELEMENT"]); + } + + check(Int8Array); + check(Int16Array); + check(Int32Array); + check(Uint8Array); + check(Uint16Array); + check(Uint32Array); + check(Float32Array); + check(Float64Array); +}); + async_test("window own props", function() { if(!Object.getOwnPropertyNames) { next_test(); @@ -4631,7 +4657,7 @@ async_test("window own props", function() { "CompositionEvent", "ControlRangeCollection", "Coordinates", ["Crypto",11], ["CryptoOperation",11], "CSSFontFaceRule", "CSSImportRule", ["CSSKeyframeRule",10], ["CSSKeyframesRule",10], "CSSMediaRule", "CSSNamespaceRule", "CSSPageRule", "CSSRuleList", "DataTransfer", "Debug", ["DeviceAcceleration",11], ["DeviceMotionEvent",11], ["DeviceOrientationEvent",11], ["DeviceRotationRate",11], ["DOMError",10], "DOMException", ["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], + "DragEvent", ["ErrorEvent",10], "EventException", ["EXT_texture_filter_anisotropic",11], ["File",10], ["FileList",10], ["FileReader",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", @@ -4639,7 +4665,7 @@ async_test("window own props", function() { "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], + ["IDBRequest",10], ["IDBTransaction",10], ["IDBVersionChangeEvent",10], "ImageData", ["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], @@ -4662,8 +4688,8 @@ async_test("window own props", function() { "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], + ["TextTrackCue",10], ["TextTrackCueList",10], ["TextTrackList",10], "TimeRanges", ["TrackEvent",10], ["TransitionEvent",10], "TreeWalker", + ["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], ["XMLHttpRequestEventTarget",10], "XMLSerializer" diff --git a/dlls/mshtml/tests/es5.js b/dlls/mshtml/tests/es5.js index 402be2f9d9a..ef2c80a2c07 100644 --- a/dlls/mshtml/tests/es5.js +++ b/dlls/mshtml/tests/es5.js @@ -2186,7 +2186,12 @@ sync_test("globals override", function() { "Error", "escape", "EvalError", + "Float32Array", + "Float64Array", "Function", + "Int8Array", + "Int16Array", + "Int32Array", "isFinite", "isNaN", "JSON", @@ -2206,6 +2211,9 @@ sync_test("globals override", function() { "String", "SyntaxError", "TypeError", + "Uint8Array", + "Uint16Array", + "Uint32Array", "unescape", "URIError", "VBArray",
This looks fine in principle, although I can't review it properly today so please wait until monday.
So the goal was to get rid of the looping through the array of descriptors/info, right? As I see it expands now to initialize each constructor "manually" via macro. Or is there something else I'm missing?
On Fri Oct 31 17:23:58 2025 +0000, Gabriel Ivăncescu wrote:
This looks fine in principle, although I can't review it properly today so please wait until monday. So the goal was to get rid of the looping through the array of descriptors/info, right? As I see it expands now to initialize each constructor "manually" via macro. Or is there something else I'm missing?
That’s not the goal on its own. There’s nothing wrong with looping itself, but to make that possible you needed to use multiple macros to generate multiple arrays. If we avoid looping and instead use a single macro to glue everything together, we don’t need any of that.
On Fri Oct 31 17:23:58 2025 +0000, Jacek Caban wrote:
That’s not the goal on its own. There’s nothing wrong with looping itself, but to make that possible you needed to use multiple macros to generate multiple arrays. If we avoid looping and instead use a single macro to glue everything together, we don’t need any of that.
I see, so it's better to keep it in just one (or two) macro expansions. I also tested with my changes on top, looks good to me.
This merge request was approved by Gabriel Ivăncescu.