Alistair Leslie-Hughes : mshtml: Implement IHTMLStyle get/ put textDecorationBlink.

Alexandre Julliard julliard at winehq.org
Mon Mar 2 09:01:58 CST 2009


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

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Sun Mar  1 20:06:29 2009 +1100

mshtml: Implement IHTMLStyle get/put textDecorationBlink.

---

 dlls/mshtml/htmlstyle.c |   14 ++++++++++----
 dlls/mshtml/tests/dom.c |   16 ++++++++++++++++
 2 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index 14de764..a7eff56 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -160,6 +160,8 @@ static const WCHAR styleNone[] =
     {'n','o','n','e',0};
 static const WCHAR valOverline[] =
     {'o','v','e','r','l','i','n','e',0};
+static const WCHAR valBlink[] =
+    {'b','l','i','n','k',0};
 
 static const WCHAR px_formatW[] = {'%','d','p','x',0};
 static const WCHAR emptyW[] = {0};
@@ -1010,15 +1012,19 @@ static HRESULT WINAPI HTMLStyle_get_textDecorationLineThrough(IHTMLStyle *iface,
 static HRESULT WINAPI HTMLStyle_put_textDecorationBlink(IHTMLStyle *iface, VARIANT_BOOL v)
 {
     HTMLStyle *This = HTMLSTYLE_THIS(iface);
-    FIXME("(%p)->(%x)\n", This, v);
-    return E_NOTIMPL;
+
+    TRACE("(%p)->(%x)\n", This, v);
+
+    return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? valBlink : emptyW, 0);
 }
 
 static HRESULT WINAPI HTMLStyle_get_textDecorationBlink(IHTMLStyle *iface, VARIANT_BOOL *p)
 {
     HTMLStyle *This = HTMLSTYLE_THIS(iface);
-    FIXME("(%p)->(%p)\n", This, p);
-    return E_NOTIMPL;
+
+    TRACE("(%p)->(%p)\n", This, p);
+
+    return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valBlink, p);
 }
 
 static HRESULT WINAPI HTMLStyle_put_verticalAlign(IHTMLStyle *iface, VARIANT v)
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index bf37cfc..c0fb009 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -2782,6 +2782,22 @@ static void test_default_style(IHTMLStyle *style)
     hres = IHTMLStyle_put_textDecorationOverline(style, VARIANT_FALSE);
     ok(hres == S_OK, "put_textDecorationOverline failed: %08x\n", hres);
 
+    b = 0xfefe;
+    hres = IHTMLStyle_get_textDecorationBlink(style, &b);
+    ok(hres == S_OK, "get_textDecorationBlink failed: %08x\n", hres);
+    ok(b == VARIANT_FALSE, "textDecorationBlink = %x\n", b);
+
+    hres = IHTMLStyle_put_textDecorationBlink(style, VARIANT_TRUE);
+    ok(hres == S_OK, "put_textDecorationBlink failed: %08x\n", hres);
+    ok(b == VARIANT_FALSE, "textDecorationBlink = %x\n", b);
+
+    hres = IHTMLStyle_get_textDecorationBlink(style, &b);
+    ok(hres == S_OK, "get_textDecorationBlink failed: %08x\n", hres);
+    ok(b == VARIANT_TRUE, "textDecorationBlink = %x\n", b);
+
+    hres = IHTMLStyle_put_textDecorationBlink(style, VARIANT_FALSE);
+    ok(hres == S_OK, "textDecorationBlink failed: %08x\n", hres);
+
     hres = IHTMLStyle_get_posWidth(style, NULL);
     ok(hres == E_POINTER, "get_posWidth failed: %08x\n", hres);
 




More information about the wine-cvs mailing list