From b9f9a358e5fe904a5ea2c181590cb39a7a9dd492 Mon Sep 17 00:00:00 2001 From: Zhenbo Li Date: Thu, 31 Jul 2014 12:22:25 +0800 Subject: [PATCH] mshtml: Added IHTMLStyle:: textTransform property implementation. --- dlls/mshtml/htmlstyle.c | 15 +++++++++++---- dlls/mshtml/htmlstyle.h | 1 + dlls/mshtml/tests/style.c | 16 ++++++++++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 3ac97274eff..580b73ceb7e 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -172,6 +172,8 @@ static const WCHAR attrTextDecoration[] = {'t','e','x','t','-','d','e','c','o','r','a','t','i','o','n',0}; static const WCHAR attrTextIndent[] = {'t','e','x','t','-','i','n','d','e','n','t',0}; +static const WCHAR attrTextTransform[] = + {'t','e','x','t','-','t','r','a','n','s','f','o','r','m',0}; static const WCHAR attrTop[] = {'t','o','p',0}; static const WCHAR attrVerticalAlign[] = @@ -266,6 +268,7 @@ static const style_tbl_entry_t style_tbl[] = { {attrTextAlign, DISPID_IHTMLSTYLE_TEXTALIGN}, {attrTextDecoration, DISPID_IHTMLSTYLE_TEXTDECORATION}, {attrTextIndent, DISPID_IHTMLSTYLE_TEXTINDENT}, + {attrTextTransform, DISPID_IHTMLSTYLE_TEXTTRANSFORM}, {attrTop, DISPID_IHTMLSTYLE_TOP}, {attrVerticalAlign, DISPID_IHTMLSTYLE_VERTICALALIGN}, {attrVisibility, DISPID_IHTMLSTYLE_VISIBILITY}, @@ -1450,15 +1453,19 @@ static HRESULT WINAPI HTMLStyle_get_verticalAlign(IHTMLStyle *iface, VARIANT *p) static HRESULT WINAPI HTMLStyle_put_textTransform(IHTMLStyle *iface, BSTR v) { HTMLStyle *This = impl_from_IHTMLStyle(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + return set_style_attr(This, STYLEID_TEXT_TRANSFORM, v, 0); } static HRESULT WINAPI HTMLStyle_get_textTransform(IHTMLStyle *iface, BSTR *p) { HTMLStyle *This = impl_from_IHTMLStyle(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return get_style_attr(This, STYLEID_TEXT_TRANSFORM, p); } static HRESULT WINAPI HTMLStyle_put_textAlign(IHTMLStyle *iface, BSTR v) diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index 030d8a1026c..6edde7b7224 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -101,6 +101,7 @@ typedef enum { STYLEID_TEXT_ALIGN, STYLEID_TEXT_DECORATION, STYLEID_TEXT_INDENT, + STYLEID_TEXT_TRANSFORM, STYLEID_TOP, STYLEID_VERTICAL_ALIGN, STYLEID_VISIBILITY, diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c index 3c68f613c89..62a63364682 100644 --- a/dlls/mshtml/tests/style.c +++ b/dlls/mshtml/tests/style.c @@ -1248,6 +1248,22 @@ static void test_body_style(IHTMLStyle *style) ok(!strcmp_wa(str, "center"), "textAlign = %s\n", wine_dbgstr_w(V_BSTR(&v))); SysFreeString(str); + str = (void*)0xdeadbeef; + hres = IHTMLStyle_get_textTransform(style, &str); + ok(hres == S_OK, "get_textTransform failed: %08x\n", hres); + ok(!str, "textTransform != NULL\n"); + + str = a2bstr("lowercase"); + hres = IHTMLStyle_put_textTransform(style, str); + ok(hres == S_OK, "put_textTransform failed: %08x\n", hres); + SysFreeString(str); + + str = NULL; + hres = IHTMLStyle_get_textTransform(style, &str); + ok(hres == S_OK, "get_textTransform failed: %08x\n", hres); + ok(!strcmp_wa(str, "lowercase"), "textTransform = %s\n", wine_dbgstr_w(V_BSTR(&v))); + SysFreeString(str); + str = (void*)0xdeadbeef; hres = IHTMLStyle_get_filter(style, &str); ok(hres == S_OK, "get_filter failed: %08x\n", hres);