Alistair Leslie-Hughes : mshtml: Implement IHTMLStyle_put_borderLeftColor.
Alexandre Julliard
julliard at winehq.org
Wed Feb 9 15:30:14 CST 2011
Module: wine
Branch: master
Commit: 1492a12c221af22f618b41db3530f4c7d6555835
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1492a12c221af22f618b41db3530f4c7d6555835
Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date: Sat Feb 5 03:42:29 2011 +1100
mshtml: Implement IHTMLStyle_put_borderLeftColor.
---
dlls/mshtml/htmlstyle.c | 6 ++++--
dlls/mshtml/tests/dom.c | 18 ++++++++++++++++++
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index d2c79c8..51e3fd3 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -1595,8 +1595,10 @@ static HRESULT WINAPI HTMLStyle_get_borderBottomColor(IHTMLStyle *iface, VARIANT
static HRESULT WINAPI HTMLStyle_put_borderLeftColor(IHTMLStyle *iface, VARIANT v)
{
HTMLStyle *This = impl_from_IHTMLStyle(iface);
- FIXME("(%p)->(v%d)\n", This, V_VT(&v));
- return E_NOTIMPL;
+
+ TRACE("(%p)->(v%d)\n", This, V_VT(&v));
+
+ return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_COLOR, &v, ATTR_HEX_INT);
}
static HRESULT WINAPI HTMLStyle_get_borderLeftColor(IHTMLStyle *iface, VARIANT *p)
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index 031ecc7..b699b19 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -5499,6 +5499,24 @@ static void test_default_style(IHTMLStyle *style)
hres = IHTMLStyle_put_borderBottomColor(style, vDefault);
ok(hres == S_OK, "put_borderBottomColor: %08x\n", hres);
+ /* borderLeftColor */
+ hres = IHTMLStyle_get_borderLeftColor(style, &vDefault);
+ ok(hres == S_OK, "get_borderBottomColor: %08x\n", hres);
+
+ V_VT(&v) = VT_BSTR;
+ V_BSTR(&v) = a2bstr("cyan");
+ hres = IHTMLStyle_put_borderLeftColor(style, v);
+ ok(hres == S_OK, "put_borderLeftColor: %08x\n", hres);
+ VariantClear(&v);
+
+ hres = IHTMLStyle_get_borderLeftColor(style, &v);
+ ok(hres == S_OK, "get_borderLeftColor: %08x\n", hres);
+ ok(!strcmp_wa(V_BSTR(&v), "cyan"), "expected cyan = %s\n", wine_dbgstr_w(V_BSTR(&v)));
+ VariantClear(&v);
+
+ hres = IHTMLStyle_put_borderLeftColor(style, vDefault);
+ ok(hres == S_OK, "put_borderLeftColor: %08x\n", hres);
+
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