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@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Gabriel Ivăncescu 2021-12-01 15:41:53 +02:00 committed by Alexandre Julliard
parent 6f37e50a1d
commit f807f74194
2 changed files with 3 additions and 1 deletions

View File

@ -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;
}

View File

@ -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");