Alistair Leslie-Hughes : mshtml: Implement IHTMLStyle_put_textDecorationUnderline.

Alexandre Julliard julliard at winehq.org
Fri Feb 13 08:59:29 CST 2009


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

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Sun Feb  8 20:06:57 2009 +1100

mshtml: Implement IHTMLStyle_put_textDecorationUnderline.

---

 dlls/mshtml/htmlstyle.c |    6 ++++--
 dlls/mshtml/tests/dom.c |   11 +++++++++++
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index 86f2ca0..18d3e31 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -925,8 +925,10 @@ static HRESULT WINAPI HTMLStyle_get_textDecorationNone(IHTMLStyle *iface, VARIAN
 static HRESULT WINAPI HTMLStyle_put_textDecorationUnderline(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 ? valUnderline : emptyW, 0);
 }
 
 static HRESULT WINAPI HTMLStyle_get_textDecorationUnderline(IHTMLStyle *iface, VARIANT_BOOL *p)
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index feafcd1..bcb14ef 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -2561,6 +2561,17 @@ static void test_default_style(IHTMLStyle *style)
     ok(hres == S_OK, "get_textDecorationUnderline failed: %08x\n", hres);
     ok(b == VARIANT_FALSE, "textDecorationUnderline = %x\n", b);
 
+    hres = IHTMLStyle_put_textDecorationUnderline(style, VARIANT_TRUE);
+    ok(hres == S_OK, "get_textDecorationUnderline failed: %08x\n", hres);
+    ok(b == VARIANT_FALSE, "textDecorationUnderline = %x\n", b);
+
+    hres = IHTMLStyle_get_textDecorationUnderline(style, &b);
+    ok(hres == S_OK, "get_textDecorationUnderline failed: %08x\n", hres);
+    ok(b == VARIANT_TRUE, "textDecorationUnderline = %x\n", b);
+
+    hres = IHTMLStyle_put_textDecorationUnderline(style, VARIANT_FALSE);
+    ok(hres == S_OK, "get_textDecorationUnderline failed: %08x\n", hres);
+
     b = 0xfefe;
     hres = IHTMLStyle_get_textDecorationLineThrough(style, &b);
     ok(hres == S_OK, "get_textDecorationLineThrough failed: %08x\n", hres);




More information about the wine-cvs mailing list