mshtml: Actually set the return value when removing an attribute.

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-11-16 19:58:17 +02:00 committed by Alexandre Julliard
parent 6b2c20c6a1
commit c74d8e1744
2 changed files with 6 additions and 3 deletions

View file

@ -1202,8 +1202,12 @@ static HRESULT WINAPI HTMLElement_removeAttribute(IHTMLElement *iface, BSTR strA
TRACE("(%p)->(%s %x %p)\n", This, debugstr_w(strAttributeName), lFlags, pfSuccess);
if(dispex_compat_mode(&This->node.event_target.dispex) >= COMPAT_MODE_IE8)
return element_remove_attribute(This, strAttributeName);
if(dispex_compat_mode(&This->node.event_target.dispex) >= COMPAT_MODE_IE8) {
*pfSuccess = element_has_attribute(This, strAttributeName);
if(*pfSuccess)
return element_remove_attribute(This, strAttributeName);
return S_OK;
}
hres = IDispatchEx_GetDispID(&This->node.event_target.dispex.IDispatchEx_iface, strAttributeName,
lFlags&ATTRFLAG_CASESENSITIVE ? fdexNameCaseSensitive : fdexNameCaseInsensitive, &id);

View file

@ -1094,7 +1094,6 @@ sync_test("elem_attr", function() {
r = elem.getAttribute("onclick");
ok(r === (v < 8 ? func : null), "onclick attr = " + r);
r = elem.removeAttribute("onclick");
todo_wine_if(v === 8).
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);