Alistair Leslie-Hughes : mshtml: Implement IHTMLCurrentStyle_get_marginBottom.

Alexandre Julliard julliard at winehq.org
Wed Sep 16 16:00:20 CDT 2009


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

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Wed Sep 16 15:48:43 2009 +1000

mshtml: Implement IHTMLCurrentStyle_get_marginBottom.

---

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

diff --git a/dlls/mshtml/htmlcurstyle.c b/dlls/mshtml/htmlcurstyle.c
index 3418b22..44f623b 100644
--- a/dlls/mshtml/htmlcurstyle.c
+++ b/dlls/mshtml/htmlcurstyle.c
@@ -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)
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index 649e4b1..1a6f610 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -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},
diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h
index bb4c6c7..08305fd 100644
--- a/dlls/mshtml/htmlstyle.h
+++ b/dlls/mshtml/htmlstyle.h
@@ -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,
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index e9e246d..fd8e57d 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -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)




More information about the wine-cvs mailing list