Jacek Caban : mshtml: Added put_backgroundColor implementation.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Nov 17 11:49:13 CST 2006
Module: wine
Branch: master
Commit: c8c9a5fb2029eb85ed98f3f402d9d7d4e29698cf
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c8c9a5fb2029eb85ed98f3f402d9d7d4e29698cf
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Nov 17 13:06:30 2006 +0100
mshtml: Added put_backgroundColor implementation.
---
dlls/mshtml/htmlstyle.c | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index e9c6529..738fd79 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -46,6 +46,8 @@ typedef struct {
#define HTMLSTYLE(x) ((IHTMLStyle*) &(x)->lpHTMLStyleVtbl);
+static const WCHAR attrBackgroundColor[] =
+ {'b','a','c','k','g','r','o','u','n','d','-','c','o','l','o','r',0};
static const WCHAR attrFontFamily[] =
{'f','o','n','t','-','f','a','m','i','l','y',0};
@@ -276,8 +278,24 @@ static HRESULT WINAPI HTMLStyle_get_back
static HRESULT WINAPI HTMLStyle_put_backgroundColor(IHTMLStyle *iface, VARIANT v)
{
HTMLStyle *This = HTMLSTYLE_THIS(iface);
- FIXME("(%p)->(v%d)\n", This, V_VT(&v));
- return E_NOTIMPL;
+
+ TRACE("(%p)->(v%d)\n", This, V_VT(&v));
+
+ switch(V_VT(&v)) {
+ case VT_BSTR:
+ return set_style_attr(This, attrBackgroundColor, V_BSTR(&v));
+ case VT_I4: {
+ WCHAR value[10];
+ static const WCHAR format[] = {'#','%','0','6','x',0};
+
+ wsprintfW(value, format, V_I4(&v));
+ return set_style_attr(This, attrBackgroundColor, value);
+ }
+ default:
+ FIXME("unsupported vt %d\n", V_VT(&v));
+ }
+
+ return S_OK;
}
static HRESULT WINAPI HTMLStyle_get_backgroundColor(IHTMLStyle *iface, VARIANT *p)
More information about the wine-cvs
mailing list