Module: wine Branch: master Commit: a1d04f704d44229726bd72904ce765b08c4837b5 URL: https://source.winehq.org/git/wine.git/?a=commit;h=a1d04f704d44229726bd72904...
Author: Jacek Caban jacek@codeweavers.com Date: Thu Nov 5 17:50:32 2020 +0100
mshtml: Ignore attempts to set read only builtin properties in IE9+ mode.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/mshtml/dispex.c | 4 ++++ dlls/mshtml/tests/es5.js | 5 +++++ 2 files changed, 9 insertions(+)
diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index dab44991bf5..f4cc2b76f2a 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -1101,6 +1101,10 @@ static HRESULT builtin_propput(DispatchEx *This, func_info_t *func, DISPPARAMS * }
if(!func->put_vtbl_off) { + if(dispex_compat_mode(This) >= COMPAT_MODE_IE9) { + WARN("No setter\n"); + return S_OK; + } FIXME("No setter\n"); return E_FAIL; } diff --git a/dlls/mshtml/tests/es5.js b/dlls/mshtml/tests/es5.js index ded25df5128..09ea9e0d657 100644 --- a/dlls/mshtml/tests/es5.js +++ b/dlls/mshtml/tests/es5.js @@ -949,3 +949,8 @@ sync_test("preventExtensions", function() {
ok(Object.preventExtensions.length === 1, "Object.preventExtensions.length = " + Object.preventExtensions.length); }); + +sync_test("head_setter", function() { + document.head = ""; + ok(typeof(document.head) === "object", "typeof(document.head) = " + typeof(document.head)); +});