Commit 87e11729 authored by Zhenbo Li's avatar Zhenbo Li Committed by Alexandre Julliard

mshtml: Added IHTMLStyle::backgroundAttachment property implementation.

parent 90014d15
......@@ -37,6 +37,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
static const WCHAR attrBackground[] =
{'b','a','c','k','g','r','o','u','n','d',0};
static const WCHAR attrBackgroundAttachment[] =
{'b','a','c','k','g','r','o','u','n','d','-','a','t','t','a','c','h','m','e','n','t',0};
static const WCHAR attrBackgroundColor[] =
{'b','a','c','k','g','r','o','u','n','d','-','c','o','l','o','r',0};
static const WCHAR attrBackgroundImage[] =
......@@ -205,6 +207,7 @@ typedef struct {
static const style_tbl_entry_t style_tbl[] = {
{attrBackground, DISPID_IHTMLSTYLE_BACKGROUND},
{attrBackgroundAttachment, DISPID_IHTMLSTYLE_BACKGROUNDATTACHMENT},
{attrBackgroundColor, DISPID_IHTMLSTYLE_BACKGROUNDCOLOR},
{attrBackgroundImage, DISPID_IHTMLSTYLE_BACKGROUNDIMAGE},
{attrBackgroundPosition, DISPID_IHTMLSTYLE_BACKGROUNDPOSITION},
......@@ -1077,15 +1080,19 @@ static HRESULT WINAPI HTMLStyle_get_backgroundRepeat(IHTMLStyle *iface, BSTR *p)
static HRESULT WINAPI HTMLStyle_put_backgroundAttachment(IHTMLStyle *iface, BSTR v)
{
HTMLStyle *This = impl_from_IHTMLStyle(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
return set_style_attr(This, STYLEID_BACKGROUND_ATTACHMENT, v, 0);
}
static HRESULT WINAPI HTMLStyle_get_backgroundAttachment(IHTMLStyle *iface, BSTR *p)
{
HTMLStyle *This = impl_from_IHTMLStyle(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_style_attr(This, STYLEID_BACKGROUND_ATTACHMENT, p);
}
static HRESULT WINAPI HTMLStyle_put_backgroundPosition(IHTMLStyle *iface, BSTR v)
......
......@@ -34,6 +34,7 @@ struct HTMLStyle {
/* NOTE: Make sure to keep in sync with style_tbl in htmlstyle.c */
typedef enum {
STYLEID_BACKGROUND,
STYLEID_BACKGROUND_ATTACHMENT,
STYLEID_BACKGROUND_COLOR,
STYLEID_BACKGROUND_IMAGE,
STYLEID_BACKGROUND_POSITION,
......
......@@ -1545,6 +1545,16 @@ static void test_body_style(IHTMLStyle *style)
ok(!strcmp_wa(V_BSTR(&v), "red"), "str=%s\n", wine_dbgstr_w(V_BSTR(&v)));
VariantClear(&v);
str = a2bstr("fixed");
hres = IHTMLStyle_put_backgroundAttachment(style, str);
ok(hres == S_OK, "put_backgroundAttachment failed: %08x\n", hres);
SysFreeString(str);
hres = IHTMLStyle_get_backgroundAttachment(style, &str);
ok(hres == S_OK, "get_backgroundAttachment failed: %08x\n", hres);
ok(!strcmp_wa(str, "fixed"), "ret = %s\n", wine_dbgstr_w(str));
SysFreeString(str);
/* padding */
hres = IHTMLStyle_get_padding(style, &str);
ok(hres == S_OK, "get_padding 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