mshtml: Implement IHTMLCurrentStyle_get_marginBottom.
authorAlistair Leslie-Hughes <leslie_alistair@hotmail.com>
Wed, 16 Sep 2009 05:48:43 +0000 (15:48 +1000)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 16 Sep 2009 19:37:39 +0000 (14:37 -0500)
dlls/mshtml/htmlcurstyle.c
dlls/mshtml/htmlstyle.c
dlls/mshtml/htmlstyle.h
dlls/mshtml/tests/dom.c

index 3418b22a6107446ca6d0a6c876fd0a49452e84de..44f623b18d0ff528e09bdca9bb9646dd32b33634 100644 (file)
@@ -452,8 +452,8 @@ static HRESULT WINAPI HTMLCurrentStyle_get_marginRight(IHTMLCurrentStyle *iface,
 static HRESULT WINAPI HTMLCurrentStyle_get_marginBottom(IHTMLCurrentStyle *iface, VARIANT *p)
 {
     HTMLCurrentStyle *This = HTMLCURSTYLE_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_MARGIN_BOTTOM, p, 0);
 }
 
 static HRESULT WINAPI HTMLCurrentStyle_get_marginLeft(IHTMLCurrentStyle *iface, VARIANT *p)
index 649e4b1c44e97e06b161b416cce7ec62ae61fed2..1a6f61014e11fa3722381b87db3b307cc094d86c 100644 (file)
@@ -107,6 +107,8 @@ static const WCHAR attrLetterSpacing[] =
     {'l','e','t','t','e','r','-','s','p','a','c','i','n','g',0};
 static const WCHAR attrMargin[] =
     {'m','a','r','g','i','n',0};
+static const WCHAR attrMarginBottom[] =
+    {'m','a','r','g','i','n','-','b','o','t','t','o','m',0};
 static const WCHAR attrMarginLeft[] =
     {'m','a','r','g','i','n','-','l','e','f','t',0};
 static const WCHAR attrMarginRight[] =
@@ -186,6 +188,7 @@ static const struct{
     {attrLeft,                 DISPID_IHTMLSTYLE_LEFT},
     {attrLetterSpacing,        DISPID_IHTMLSTYLE_LETTERSPACING},
     {attrMargin,               DISPID_IHTMLSTYLE_MARGIN},
+    {attrMarginBottom,         DISPID_IHTMLSTYLE_MARGINBOTTOM},
     {attrMarginLeft,           DISPID_IHTMLSTYLE_MARGINLEFT},
     {attrMarginRight,          DISPID_IHTMLSTYLE_MARGINRIGHT},
     {attrMarginTop,            DISPID_IHTMLSTYLE_MARGINTOP},
index bb4c6c7d8a8356bb759309634d1c54eb9da1e534..08305fd0785e05a08bb0b80efa61d73d7484fcf4 100644 (file)
@@ -71,6 +71,7 @@ typedef enum {
     STYLEID_LEFT,
     STYLEID_LETTER_SPACING,
     STYLEID_MARGIN,
+    STYLEID_MARGIN_BOTTOM,
     STYLEID_MARGIN_LEFT,
     STYLEID_MARGIN_RIGHT,
     STYLEID_MARGIN_TOP,
index e9e246d832a41e06ec1c1ca641022f962da8d2b0..fd8e57d96380dda78d9d5097a4072f980f6f7baa 100644 (file)
@@ -2781,6 +2781,11 @@ static void test_current_style(IHTMLCurrentStyle *current_style)
     ok(hres == S_OK, "get_marginTop failed: %08x\n", hres);
     ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v));
     VariantClear(&v);
+
+    hres = IHTMLCurrentStyle_get_marginBottom(current_style, &v);
+    ok(hres == S_OK, "get_marginBottom failed: %08x\n", hres);
+    ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v));
+    VariantClear(&v);
 }
 
 static void test_style2(IHTMLStyle2 *style2)