Zhenbo Li : mshtml: Added IHTMLStyle:: textTransform property implementation.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Aug 8 15:27:05 CDT 2014


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

Author: Zhenbo Li <litimetal at gmail.com>
Date:   Thu Jul 31 12:22:25 2014 +0800

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 3ac9727..580b73c 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 030d8a1..6edde7b 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 3c68f61..62a6336 100644
--- a/dlls/mshtml/tests/style.c
+++ b/dlls/mshtml/tests/style.c
@@ -1249,6 +1249,22 @@ static void test_body_style(IHTMLStyle *style)
     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);
     ok(!str, "filter != NULL\n");




More information about the wine-cvs mailing list