Commit 7918196e authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added IHTMLStyle::[get|put]_filter implementation.

parent 4d822f44
......@@ -50,6 +50,8 @@ static const WCHAR attrCursor[] =
{'c','u','r','s','o','r',0};
static const WCHAR attrDisplay[] =
{'d','i','s','p','l','a','y',0};
static const WCHAR attrFilter[] =
{'f','i','l','e','t','e','r',0};
static const WCHAR attrFontFamily[] =
{'f','o','n','t','-','f','a','m','i','l','y',0};
static const WCHAR attrFontSize[] =
......@@ -99,6 +101,7 @@ static const struct{
{attrColor, DISPID_IHTMLSTYLE_COLOR},
{attrCursor, DISPID_IHTMLSTYLE_CURSOR},
{attrDisplay, DISPID_IHTMLSTYLE_DISPLAY},
{attrFilter, DISPID_IHTMLSTYLE_FILTER},
{attrFontFamily, DISPID_IHTMLSTYLE_FONTFAMILY},
{attrFontSize, DISPID_IHTMLSTYLE_FONTSIZE},
{attrFontStyle, DISPID_IHTMLSTYLE_FONTSTYLE},
......@@ -1873,15 +1876,21 @@ static HRESULT WINAPI HTMLStyle_get_clip(IHTMLStyle *iface, BSTR *p)
static HRESULT WINAPI HTMLStyle_put_filter(IHTMLStyle *iface, BSTR v)
{
HTMLStyle *This = HTMLSTYLE_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
WARN("(%p)->(%s)\n", This, debugstr_w(v));
/* FIXME: Handle MS-style filters */
return set_style_attr(This, STYLEID_FILTER, v, 0);
}
static HRESULT WINAPI HTMLStyle_get_filter(IHTMLStyle *iface, BSTR *p)
{
HTMLStyle *This = HTMLSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
WARN("(%p)->(%p)\n", This, p);
/* FIXME: Handle MS-style filters */
return get_style_attr(This, STYLEID_FILTER, p);
}
static HRESULT WINAPI HTMLStyle_setAttribute(IHTMLStyle *iface, BSTR strAttributeName,
......
......@@ -39,6 +39,7 @@ typedef enum {
STYLEID_COLOR,
STYLEID_CURSOR,
STYLEID_DISPLAY,
STYLEID_FILTER,
STYLEID_FONT_FAMILY,
STYLEID_FONT_SIZE,
STYLEID_FONT_STYLE,
......
......@@ -2266,6 +2266,16 @@ static void test_default_style(IHTMLStyle *style)
ok(!strcmp_wa(str, "center"), "textAlign = %s\n", dbgstr_w(V_BSTR(&v)));
SysFreeString(str);
str = (void*)0xdeadbeef;
hres = IHTMLStyle_get_filter(style, &str);
ok(hres == S_OK, "get_filter failed: %08x\n", hres);
ok(!str, "filter != NULL\n");
str = a2bstr("alpha(opacity=100)");
hres = IHTMLStyle_put_filter(style, str);
ok(hres == S_OK, "put_filter failed: %08x\n", hres);
SysFreeString(str);
V_VT(&v) = VT_EMPTY;
hres = IHTMLStyle_get_zIndex(style, &v);
ok(hres == S_OK, "get_zIndex failed: %08x\n", hres);
......
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