[PATCH v12 6/7] mshtml: Set the builtin prop to NULL even when removeAttribute returns false in IE8 mode.
Gabriel Ivăncescu
gabrielopcode at gmail.com
Wed Dec 1 07:41:54 CST 2021
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---
dlls/mshtml/dispex.c | 8 ++++++--
dlls/mshtml/tests/documentmode.js | 1 -
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c
index 9f56a56..e473d7b 100644
--- a/dlls/mshtml/dispex.c
+++ b/dlls/mshtml/dispex.c
@@ -1470,9 +1470,13 @@ HRESULT remove_attribute(DispatchEx *This, DISPID id, VARIANT_BOOL *success)
if(FAILED(hres)) {
VARIANT *ref;
hres = dispex_get_dprop_ref(This, func->name, FALSE, &ref);
- if(FAILED(hres) || V_VT(ref) != VT_BSTR)
+ if(FAILED(hres) || V_VT(ref) != VT_BSTR) {
*success = VARIANT_FALSE;
- else
+ if(dispex_compat_mode(This) >= COMPAT_MODE_IE8) {
+ V_VT(&var) = VT_NULL;
+ builtin_propput(This, func, &dp, NULL);
+ }
+ }else
VariantClear(ref);
}
return S_OK;
diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js
index 2564186..63c0df5 100644
--- a/dlls/mshtml/tests/documentmode.js
+++ b/dlls/mshtml/tests/documentmode.js
@@ -1185,7 +1185,6 @@ sync_test("elem_attr", function() {
ok(r === (v < 8 ? func : null), "onclick attr = " + r);
r = elem.removeAttribute("onclick");
ok(r === (v < 9 ? false : undefined), "removeAttribute returned " + r);
- todo_wine_if(v === 8).
ok(elem.onclick === (v != 8 ? func : null), "removed onclick = " + elem.onclick);
elem.onclick_test = func;
--
2.31.1
More information about the wine-devel
mailing list