Commit 53e9acbf authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: style attribute is a special case for setAttribute and removeAttribute.

parent 96f62817
......@@ -28,6 +28,7 @@
#include "winreg.h"
#include "ole2.h"
#include "shlwapi.h"
#include "mshtmdid.h"
#include "wine/debug.h"
......@@ -621,6 +622,11 @@ static HRESULT WINAPI HTMLElement_setAttribute(IHTMLElement *iface, BSTR strAttr
if(FAILED(hres))
return hres;
if(dispid == DISPID_IHTMLELEMENT_STYLE) {
TRACE("Ignoring call on style attribute\n");
return S_OK;
}
dispParams.cArgs = 1;
dispParams.cNamedArgs = 1;
dispParams.rgdispidNamedArgs = &dispidNamed;
......@@ -675,6 +681,24 @@ static HRESULT WINAPI HTMLElement_removeAttribute(IHTMLElement *iface, BSTR strA
if(FAILED(hres))
return hres;
if(id == DISPID_IHTMLELEMENT_STYLE) {
IHTMLStyle *style;
TRACE("Special case: style\n");
hres = IHTMLElement_get_style(&This->IHTMLElement_iface, &style);
if(FAILED(hres))
return hres;
hres = IHTMLStyle_put_cssText(style, NULL);
IHTMLStyle_Release(style);
if(FAILED(hres))
return hres;
*pfSuccess = VARIANT_TRUE;
return S_OK;
}
return remove_attribute(&This->node.dispex, id, pfSuccess);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment