Could I get some feedback on this patch please?
Best Regards Alistair Leslie-Hughes
--------------------------------------------------------------------------------
From 60473b955b3b35feb089ad1cbf1320ce9f971020 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes leslie_alistair@hotmail.com Date: Thu, 5 Mar 2009 20:44:38 +1100 Subject: [PATCH] Implement IHTMLStyle get/put borderLeftWidth To: wine-patches wine-patches@winehq.org
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 7641701..10f90e1 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -59,6 +59,8 @@ static const WCHAR attrBorderLeft[] = {'b','o','r','d','e','r','-','l','e','f','t',0}; static const WCHAR attrBorderLeftStyle[] =
{'b','o','r','d','e','r','-','l','e','f','t','-','s','t','y','l','e',0}; +static const WCHAR attrBorderLeftWidth[] =
{'b','o','r','d','e','r','-','l','e','f','t','-','w','i','d','t','h',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[] = @@ -138,6 +140,7 @@ static const struct{ {attrBorderColor, DISPID_IHTMLSTYLE_BORDERCOLOR}, {attrBorderLeft, DISPID_IHTMLSTYLE_BORDERLEFT}, {attrBorderLeftStyle, DISPID_IHTMLSTYLE_BORDERLEFTSTYLE},
- {attrBorderLeftWidth, DISPID_IHTMLSTYLE_BORDERLEFTWIDTH}, {attrBorderRightStyle, DISPID_IHTMLSTYLE_BORDERRIGHTSTYLE}, {attrBorderRightWidth, DISPID_IHTMLSTYLE_BORDERRIGHTWIDTH}, {attrBorderStyle, DISPID_IHTMLSTYLE_BORDERSTYLE},
@@ -1571,15 +1574,15 @@ static HRESULT WINAPI HTMLStyle_get_borderBottomWidth(IHTMLStyle *iface, VARIANT static HRESULT WINAPI HTMLStyle_put_borderLeftWidth(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_LEFT_WIDTH,
&v, 0); }
static HRESULT WINAPI HTMLStyle_get_borderLeftWidth(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_LEFT_WIDTH,
p, 0); }
static HRESULT WINAPI HTMLStyle_put_borderStyle(IHTMLStyle *iface, BSTR v) diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index 596f579..b900e67 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -47,6 +47,7 @@ typedef enum { STYLEID_BORDER_COLOR, STYLEID_BORDER_LEFT, STYLEID_BORDER_LEFT_STYLE,
- STYLEID_BORDER_LEFT_WIDTH, STYLEID_BORDER_RIGHT_STYLE, STYLEID_BORDER_RIGHT_WIDTH, STYLEID_BORDER_STYLE,
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index f95b753..be877b2 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -3587,6 +3587,25 @@ static void test_default_style(IHTMLStyle *style) ok(hres == S_OK, "put_borderBottomWidth: %08x\n", hres); VariantClear(&vDefault);
- /* borderLeftWidth */
- hres = IHTMLStyle_get_borderLeftWidth(style, &vDefault);
- ok(hres == S_OK, "get_borderLeftWidth: %08x\n", hres);
- V_VT(&v) = VT_BSTR;
- V_BSTR(&v) = a2bstr("10");
- hres = IHTMLStyle_put_borderLeftWidth(style, v);
- ok(hres == S_OK, "put_borderLeftWidth: %08x\n", hres);
- VariantClear(&v);
- hres = IHTMLStyle_get_borderLeftWidth(style, &v);
- ok(hres == S_OK, "get_borderLeftWidth: %08x\n", hres);
- ok(!strcmp_wa(V_BSTR(&v), "10px"), "expected 10px = %s\n",
dbgstr_w(V_BSTR(&v)));
- VariantClear(&v);
- hres = IHTMLStyle_put_borderLeftWidth(style, vDefault);
- ok(hres == S_OK, "put_borderLeftWidth: %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)) { -- 1.5.4.3
--------------------------------------------------------------------------------