Module: wine Branch: master Commit: 53e9acbf28c68d3558372597311dda14b4fe0345 URL: http://source.winehq.org/git/wine.git/?a=commit;h=53e9acbf28c68d355837259731...
Author: Jacek Caban jacek@codeweavers.com Date: Fri Nov 28 16:19:35 2014 +0100
mshtml: style attribute is a special case for setAttribute and removeAttribute.
---
dlls/mshtml/htmlelem.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index e302f2a..48fff3f 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -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); }