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

Alexandre Julliard julliard at winehq.org
Thu Jan 15 08:51:20 CST 2009


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

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Tue Jan 13 18:38:32 2009 +1100

mshtml: Implement IHTMLStyle get/put borderBottomStyle.

---

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

diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index 3c79ac4..1553007 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -43,6 +43,8 @@ static const WCHAR attrBackgroundImage[] =
     {'b','a','c','k','g','r','o','u','n','d','-','i','m','a','g','e',0};
 static const WCHAR attrBorder[] =
     {'b','o','r','d','e','r',0};
+static const WCHAR attrBorderBottomStyle[] =
+    {'b','o','r','d','e','r','-','b','o','t','t','o','m','-','s','t','y','l','e',0};
 static const WCHAR attrBorderLeft[] =
     {'b','o','r','d','e','r','-','l','e','f','t',0};
 static const WCHAR attrBorderLeftStyle[] =
@@ -106,6 +108,7 @@ static const struct{
     {attrBackgroundColor,      DISPID_IHTMLSTYLE_BACKGROUNDCOLOR},
     {attrBackgroundImage,      DISPID_IHTMLSTYLE_BACKGROUNDIMAGE},
     {attrBorder,               DISPID_IHTMLSTYLE_BORDER},
+    {attrBorderBottomStyle,    DISPID_IHTMLSTYLE_BORDERBOTTOMSTYLE},
     {attrBorderLeft,           DISPID_IHTMLSTYLE_BORDERLEFT},
     {attrBorderLeftStyle,      DISPID_IHTMLSTYLE_BORDERLEFTSTYLE},
     {attrBorderWidth,          DISPID_IHTMLSTYLE_BORDERWIDTH},
@@ -1488,15 +1491,19 @@ static HRESULT WINAPI HTMLStyle_get_borderRightStyle(IHTMLStyle *iface, BSTR *p)
 static HRESULT WINAPI HTMLStyle_put_borderBottomStyle(IHTMLStyle *iface, BSTR v)
 {
     HTMLStyle *This = HTMLSTYLE_THIS(iface);
-    FIXME("(%p)->(%s)\n", This, debugstr_w(v));
-    return E_NOTIMPL;
+    TRACE("(%p)->(%s)\n", This, debugstr_w(v));
+
+    if(!is_valid_border_style(v))
+        return E_INVALIDARG;
+
+    return set_style_attr(This, STYLEID_BORDER_BOTTOM_STYLE, v, 0);
 }
 
 static HRESULT WINAPI HTMLStyle_get_borderBottomStyle(IHTMLStyle *iface, BSTR *p)
 {
     HTMLStyle *This = HTMLSTYLE_THIS(iface);
-    FIXME("(%p)->(%p)\n", This, p);
-    return E_NOTIMPL;
+    TRACE("(%p)->(%p)\n", This, p);
+    return get_style_attr(This, STYLEID_BORDER_BOTTOM_STYLE, p);
 }
 
 static HRESULT WINAPI HTMLStyle_put_borderLeftStyle(IHTMLStyle *iface, BSTR v)
diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h
index 6ea5136..6538f7a 100644
--- a/dlls/mshtml/htmlstyle.h
+++ b/dlls/mshtml/htmlstyle.h
@@ -35,6 +35,7 @@ typedef enum {
     STYLEID_BACKGROUND_COLOR,
     STYLEID_BACKGROUND_IMAGE,
     STYLEID_BORDER,
+    STYLEID_BORDER_BOTTOM_STYLE,
     STYLEID_BORDER_LEFT,
     STYLEID_BORDER_LEFT_STYLE,
     STYLEID_BORDER_WIDTH,
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index 3e9da25..c67b758 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -2892,6 +2892,10 @@ static void test_default_style(IHTMLStyle *style)
     test_border_styles(style, str);
     SysFreeString(str);
 
+    str = a2bstr("borderbottomstyle");
+    test_border_styles(style, str);
+    SysFreeString(str);
+
     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