Alistair Leslie-Hughes : mshtml: Implement IHTMLStyle_get_backgroundColor.
Alexandre Julliard
julliard at winehq.org
Fri Feb 6 09:56:26 CST 2009
Module: wine
Branch: master
Commit: 6421c47986d05b03e4ddf97eaa9b8b70e917e44d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6421c47986d05b03e4ddf97eaa9b8b70e917e44d
Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date: Wed Feb 4 16:01:05 2009 +1100
mshtml: Implement IHTMLStyle_get_backgroundColor.
---
dlls/mshtml/htmlstyle.c | 6 ++++--
dlls/mshtml/tests/dom.c | 6 ++++++
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index 2d6703a..2e9be16 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -770,8 +770,10 @@ static HRESULT WINAPI HTMLStyle_put_backgroundColor(IHTMLStyle *iface, VARIANT v
static HRESULT WINAPI HTMLStyle_get_backgroundColor(IHTMLStyle *iface, VARIANT *p)
{
HTMLStyle *This = HTMLSTYLE_THIS(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ TRACE("(%p)->(%p)\n", This, p);
+
+ V_VT(p) = VT_BSTR;
+ return get_style_attr(This, STYLEID_BACKGROUND_COLOR, &V_BSTR(p));
}
static HRESULT WINAPI HTMLStyle_put_backgroundImage(IHTMLStyle *iface, BSTR v)
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index 5118d63..ae24bcf 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -2982,6 +2982,12 @@ static void test_default_style(IHTMLStyle *style)
test_border_styles(style, str);
SysFreeString(str);
+ hres = IHTMLStyle_get_backgroundColor(style, &v);
+ ok(hres == S_OK, "get_backgroundColor: %08x\n", hres);
+ ok(V_VT(&v) == VT_BSTR, "type failed: %d\n", V_VT(&v));
+ ok(!V_BSTR(&v), "str=%s\n", dbgstr_w(V_BSTR(&v)));
+ VariantClear(&v);
+
hres = IHTMLStyle_QueryInterface(style, &IID_IHTMLStyle2, (void**)&style2);
ok(hres == S_OK, "Could not get IHTMLStyle2 iface: %08x\n", hres);
if(SUCCEEDED(hres)) {
More information about the wine-cvs
mailing list