[PATCH v12 5/7] mshtml: Fix style attribute removal in IE8 mode.

Gabriel Ivăncescu gabrielopcode at gmail.com
Wed Dec 1 07:41:53 CST 2021


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>
---
 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 b776511..862b0eb 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 cf3fdfa..2564186 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");
-- 
2.31.1




More information about the wine-devel mailing list