Gabriel Ivăncescu : mshtml: Fix style attribute removal in IE8 mode.
Alexandre Julliard
julliard at winehq.org
Wed Dec 1 15:23:51 CST 2021
Module: wine
Branch: master
Commit: f807f74194a3d0ca01953418f16e2e24ad95db50
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f807f74194a3d0ca01953418f16e2e24ad95db50
Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date: Wed Dec 1 15:41:53 2021 +0200
mshtml: Fix style attribute removal in IE8 mode.
put_cssText implicitly sets the attribute, which must be removed since IE8
specially checks it.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mshtml/htmlelem.c | 3 +++
dlls/mshtml/tests/documentmode.js | 1 -
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c
index 6d99e657ff8..a205728e280 100644
--- a/dlls/mshtml/htmlelem.c
+++ b/dlls/mshtml/htmlelem.c
@@ -1277,6 +1277,9 @@ static HRESULT WINAPI HTMLElement_removeAttribute(IHTMLElement *iface, BSTR strA
if(FAILED(hres))
return hres;
+ if(compat_mode >= COMPAT_MODE_IE8)
+ element_remove_attribute(This, strAttributeName);
+
*pfSuccess = VARIANT_TRUE;
return S_OK;
}
diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js
index cf3fdfa617e..256418679bb 100644
--- a/dlls/mshtml/tests/documentmode.js
+++ b/dlls/mshtml/tests/documentmode.js
@@ -1257,7 +1257,6 @@ sync_test("elem_attr", function() {
r = elem.style;
ok(r === style, "removed elem.style = " + r);
r = elem.getAttribute("style");
- todo_wine_if(v === 8).
ok(r === (v < 8 ? style : null), "style attr after removal = " + r);
elem.setAttribute("style", "opacity: 1.0");
r = elem.getAttribute("style");
More information about the wine-cvs
mailing list