Alistair Leslie-Hughes : mshtml: Implement IHTMLStyle get/ put borderRightWidth.

Alexandre Julliard julliard at winehq.org
Fri Mar 6 09:49:50 CST 2009


Module: wine
Branch: master
Commit: e266672c47c2a9639758472520918b30c9c7dc28
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e266672c47c2a9639758472520918b30c9c7dc28

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Thu Mar  5 20:35:50 2009 +1100

mshtml: Implement IHTMLStyle get/put borderRightWidth.

---

 dlls/mshtml/htmlstyle.c |   11 +++++++----
 dlls/mshtml/htmlstyle.h |    1 +
 dlls/mshtml/tests/dom.c |   19 +++++++++++++++++++
 3 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index 7c08a5e..3b40920 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -59,6 +59,8 @@ static const WCHAR attrBorderLeftStyle[] =
     {'b','o','r','d','e','r','-','l','e','f','t','-','s','t','y','l','e',0};
 static const WCHAR attrBorderRightStyle[] =
     {'b','o','r','d','e','r','-','r','i','g','h','t','-','s','t','y','l','e',0};
+static const WCHAR attrBorderRightWidth[] =
+    {'b','o','r','d','e','r','-','r','i','g','h','t','-','w','i','d','t','h',0};
 static const WCHAR attrBorderStyle[] =
     {'b','o','r','d','e','r','-','s','t','y','l','e',0};
 static const WCHAR attrBorderTopStyle[] =
@@ -134,6 +136,7 @@ static const struct{
     {attrBorderLeft,           DISPID_IHTMLSTYLE_BORDERLEFT},
     {attrBorderLeftStyle,      DISPID_IHTMLSTYLE_BORDERLEFTSTYLE},
     {attrBorderRightStyle,     DISPID_IHTMLSTYLE_BORDERRIGHTSTYLE},
+    {attrBorderRightWidth,     DISPID_IHTMLSTYLE_BORDERRIGHTWIDTH},
     {attrBorderStyle,          DISPID_IHTMLSTYLE_BORDERSTYLE},
     {attrBorderTopStyle,       DISPID_IHTMLSTYLE_BORDERTOPSTYLE},
     {attrBorderTopWidth,       DISPID_IHTMLSTYLE_BORDERTOPWIDTH},
@@ -1536,15 +1539,15 @@ static HRESULT WINAPI HTMLStyle_get_borderTopWidth(IHTMLStyle *iface, VARIANT *p
 static HRESULT WINAPI HTMLStyle_put_borderRightWidth(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));
+    return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_WIDTH, &v, 0);
 }
 
 static HRESULT WINAPI HTMLStyle_get_borderRightWidth(IHTMLStyle *iface, VARIANT *p)
 {
     HTMLStyle *This = HTMLSTYLE_THIS(iface);
-    FIXME("(%p)->(%p)\n", This, p);
-    return E_NOTIMPL;
+    TRACE("(%p)->(%p)\n", This, p);
+    return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_WIDTH, p, 0);
 }
 
 static HRESULT WINAPI HTMLStyle_put_borderBottomWidth(IHTMLStyle *iface, VARIANT v)
diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h
index 92cfcbb..0a268a3 100644
--- a/dlls/mshtml/htmlstyle.h
+++ b/dlls/mshtml/htmlstyle.h
@@ -47,6 +47,7 @@ typedef enum {
     STYLEID_BORDER_LEFT,
     STYLEID_BORDER_LEFT_STYLE,
     STYLEID_BORDER_RIGHT_STYLE,
+    STYLEID_BORDER_RIGHT_WIDTH,
     STYLEID_BORDER_STYLE,
     STYLEID_BORDER_TOP_STYLE,
     STYLEID_BORDER_TOP_WIDTH,
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index 5aaec99..b8d452e 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -3486,6 +3486,25 @@ static void test_default_style(IHTMLStyle *style)
     ok(hres == S_OK, "put_borderTopWidth: %08x\n", hres);
     VariantClear(&vDefault);
 
+    /* borderRightWidth */
+    hres = IHTMLStyle_get_borderRightWidth(style, &vDefault);
+    ok(hres == S_OK, "get_borderRightWidth: %08x\n", hres);
+
+    V_VT(&v) = VT_BSTR;
+    V_BSTR(&v) = a2bstr("10");
+    hres = IHTMLStyle_put_borderRightWidth(style, v);
+    ok(hres == S_OK, "put_borderRightWidth: %08x\n", hres);
+    VariantClear(&v);
+
+    hres = IHTMLStyle_get_borderRightWidth(style, &v);
+    ok(hres == S_OK, "get_borderRightWidth: %08x\n", hres);
+    ok(!strcmp_wa(V_BSTR(&v), "10px"), "expected 10px = %s\n", dbgstr_w(V_BSTR(&v)));
+    VariantClear(&v);
+
+    hres = IHTMLStyle_put_borderRightWidth(style, vDefault);
+    ok(hres == S_OK, "put_borderRightWidth: %08x\n", hres);
+    VariantClear(&vDefault);
+
     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